Skip to content

Commit

Permalink
fix build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Sep 12, 2018
1 parent 7cb0f22 commit df08e90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "scenejs",
"version": "1.0.0-beta3",
"description": "Javascript Animation Library",
"main": "dist/scene.js",
"module": "dist/esm",
"main": "dist/common/scene.js",
"module": "dist/esm/index.js",
"sideEffects": false,
"types": "declaration/index.d.ts",
"directories": {
Expand All @@ -15,7 +15,8 @@
"test": "karma start",
"test:chrome": "karma start --chrome",
"build": "webpack && npm run release:latest && npm run build:esm",
"build:esm": "BABEL_ENV=esm babel ./src --out-dir ./dist/esm --ignore ./src/index.umd.ts --extensions '.ts' && npm run build:version",
"build:esm": "tsc -p tsconfig.json --outDir ./dist/esm --module es2015 && npm run build:replace && npm run build:version",
"build:replace": "replace-in-file '/** @class */' '/*#__PURE__*/' dist/*/*.js",
"build:version": "replace-in-file '#__VERSION__#' $npm_package_version dist/esm/index.js",
"deploy": "gh-pages -d ./demo --dest=./ --add",
"coveralls": "cat ./coverage/lcov.info | coveralls",
Expand Down
3 changes: 2 additions & 1 deletion src/index.umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import Scene, * as others from "./index";
for (const name in others) {
(Scene as any)[name] = (others as any)[name];
}
export = Scene;

module.exports = Scene;
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repository: ${pkg.repository.url}

const config = {
entry: {
"common/scene": `./src/index.ts`,
"scene": `./src/index.umd.ts`,
"scene.min": `./src/index.umd.ts`,
},
Expand Down

0 comments on commit df08e90

Please sign in to comment.