building es2015 modules

this should enable tree-shaking in supporting compilers (like webpack and broserify)
This commit is contained in:
Yotam Mann 2019-07-25 14:49:46 -04:00
parent e3f5940afd
commit d07da6d675
2 changed files with 8 additions and 8 deletions

View file

@ -3,16 +3,16 @@
"version": "14.1.0", "version": "14.1.0",
"description": "A Web Audio framework for making interactive music in the browser.", "description": "A Web Audio framework for making interactive music in the browser.",
"main": "build/Tone.js", "main": "build/Tone.js",
"module": "build/esm/index.js",
"types": "build/esm/index.d.ts",
"files": [ "files": [
"README.md", "README.md",
"LICENSE.md", "LICENSE.md",
"build/Tone.js.map", "build",
"build/Tone.js",
"tone.d.ts",
"Tone" "Tone"
], ],
"scripts": { "scripts": {
"build": "npm run increment-ts && npm run ts:build && npm run webpack:build", "build": "npm run increment-ts && rm -rf build && npm run ts:build && npm run webpack:build",
"codecov": "codecov", "codecov": "codecov",
"collect": "npm run collect:deps", "collect": "npm run collect:deps",
"collect:deps": "node scripts/collect_deps.js", "collect:deps": "node scripts/collect_deps.js",
@ -31,10 +31,10 @@
"test:node": "node ./test/html/node_test.js", "test:node": "node ./test/html/node_test.js",
"tsd": "node ./scripts/generate_docs.js", "tsd": "node ./scripts/generate_docs.js",
"lint": "tslint --project tsconfig.json", "lint": "tslint --project tsconfig.json",
"ts:build": "rm -rf dist && tsc --project tsconfig.build.json", "ts:build": "tsc --project tsconfig.build.json",
"watch:old": "webpack -w --env.production --mode=development", "watch:old": "webpack -w --env.production --mode=development",
"watch": "tsc --watch", "watch": "tsc --watch",
"webpack:build": "rm -rf build && webpack -p --env.production" "webpack:build": "webpack -p --env.production"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -3,12 +3,12 @@
"compilerOptions": { "compilerOptions": {
"strictNullChecks": true, "strictNullChecks": true,
"target": "es5", "target": "es5",
"module": "commonjs", "module": "es2015",
"noImplicitAny": false, "noImplicitAny": false,
"noUnusedLocals": false, "noUnusedLocals": false,
"removeComments": false, "removeComments": false,
"experimentalDecorators": true, "experimentalDecorators": true,
"outDir": "./dist", "outDir": "./build/esm",
"sourceMap": true, "sourceMap": true,
"moduleResolution": "node", "moduleResolution": "node",
"strictPropertyInitialization" : true, "strictPropertyInitialization" : true,