Files
FullScreenPokemon/webpack.config.js
T
Josh Goldberg 18b2b2d30c Large component refactor: BabyIoC refactor (#548)
* First round of converting: tests pass

That's a good thing, right?

* Finished recreating all creation methods

* Removed requireEntrance from createMapsCreator

* babyioc@0.7.2; tests for gameplay.startOptions

* Bumped gamestartr version to 0.7.6

* Added src/index.ts

* Converted sub-components to BabyIoC @components

* Replaced "used by" doc comments with real ones

* Revamped interface factory to have standalone export

* Added maps tests from shenanigans-manager

* Better documented initializaton options in README

* Added Cycling.test.ts

I'm on a plane, why not?

* Replaced .bind when possible

* Extra this. in InterfaceSettings constructor

* Split general menu component into components per menu

Added a whole bunch of tests for the Items and Pause menus.

* Fixed lint issues

* Removing annoying console.warn

* Restored missing component files

* shenanigans-manager@0.2.15

* Bumped shenanigans-manager to ^0.2.16

* Removed node=7 from .travis.yml
2018-01-08 07:53:46 -08:00

53 lines
1.1 KiB
JavaScript

const glob = require("glob");
const path = require("path");
const package = require("./package.json");
const getEntriesAndSources = () => {
return package.shenanigans.entries === undefined
? [
{
entry: `./src/index.js`,
name: package.shenanigans.name,
sources: [
"./**/*.js",
"!./**/*.test.js",
]
}
]
: package.shenanigans.entries;
};
const getExternals = (shenanigans) => {
const output = {};
if (shenanigans.externals === undefined) {
return output;
}
for (const external of shenanigans.externals) {
output[external.name] = external.name;
}
return output;
};
const externals = getExternals(package.shenanigans);
const entriesAndSources = getEntriesAndSources();
const entry = {};
for (const pair of entriesAndSources) {
entry[pair.name] = pair.entry;
}
module.exports = {
entry,
externals,
output: {
filename: "[name].js",
libraryTarget: "amd",
path: path.join(__dirname, "dist"),
}
};