Skip to content

Commit

Permalink
build(rollup): [wip] Begin writing build scripts with rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcowman2 committed Nov 16, 2018
1 parent ae20d89 commit 8f323b2
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 6 deletions.
117 changes: 117 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Expand Up @@ -19,17 +19,16 @@
"gamedev",
"typescript"
],
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/types/index.d.ts",
"browser": "dist/index.umd.js",
"files": [
"dist/"
],
"scripts": {
"test": "nyc mocha",
"build-cjs": "tsc -m commonjs --outDir dist/cjs -d --declarationDir dist/types",
"build-esm": "tsc -m es6 --moduleResolution node --outDir dist/esm",
"build": "npm run build-cjs && npm run build-esm",
"build": "rollup -c",
"publish-coverage": "nyc report --reporter=text-lcov | coveralls",
"check-coverage": "nyc check-coverage --lines 99 --functions 99 --branches 99",
"lint": "node node_modules/tslint/bin/tslint -c tslint.json --format stylish 'src/**/*.ts'",
Expand Down
15 changes: 15 additions & 0 deletions rollup.config.js
@@ -0,0 +1,15 @@
import typescript from "rollup-plugin-typescript";
import pkg from "./package.json";

export default {
input: "./src/index.ts",
plugins: [
typescript()
],
output: [
{
file: pkg.main,
// format: "cjs"
}
]
}
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -34,4 +34,4 @@ export {
export { GameOptions, GameMetadata } from "./config";
export { GameInstance, buildGameInstance } from "./state";
export { OutputLineType, OutputLine, InstanceOutput } from "./output";
export { loadConfig } from "./load-config";
// export { loadConfig } from "./load-config";

0 comments on commit 8f323b2

Please sign in to comment.