Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile ES2015 modules with ES5 target #889

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "3.1.9",
"description": "Simple, scalable state management.",
"main": "lib/mobx.js",
"module": "lib/es2015/mobx.js",
"jsnext:main": "lib/es2015/mobx.js",
"umd:main": "lib/mobx.umd.js",
"typings": "lib/mobx.d.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/single-file-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fs.writeFileSync('.build/mobx.ts', allContents, { encoding: 'utf8', flag: 'a' })

[
'tsc -m commonjs -t es5 -d --removeComments --outDir lib .build/mobx.ts',
// 'tsc -m es2015 -t es2015 -d --removeComments --outDir lib/es2015 .build/mobx.ts',
'tsc -m es2015 -t es5 -d --removeComments --outDir lib/es2015 .build/mobx.ts',
'browserify -s mobx -e lib/mobx.js -o lib/mobx.umd.js',
`uglifyjs -m sort,toplevel -c --screw-ie8 --preamble "/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */" --source-map lib/mobx.min.js.map -o lib/mobx.min.js lib/mobx.js`,
`uglifyjs -m sort,toplevel -c --screw-ie8 --preamble "/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */" --source-map lib/mobx.umd.min.js.map -o lib/mobx.umd.min.js lib/mobx.umd.js`,
Expand Down