-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: Update to videojs-generate-rollup-config ~5.0.0, use env options, and @babel/runtime
#289
Conversation
@@ -124,18 +124,16 @@ const packageJSON = (current, context) => { | |||
'ie 11' | |||
], | |||
'scripts': _.assign({}, current.scripts, { | |||
'prebuild': 'npm run clean', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we used to do this prebuild, but since we have multiple different types of "build" now, it doesn't make sense.
'build:js': 'rollup -c scripts/rollup.config.js', | ||
'clean': 'shx rm -rf ./dist ./test/dist', | ||
'postclean': 'shx mkdir -p ./dist ./test/dist', | ||
'clean': 'shx rm -rf ./dist ./test/dist && shx mkdir -p ./dist ./test/dist', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well do it in one command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, I don't think&&
will work on Windows, will it?
generators/app/package-json.js
Outdated
'prebuild': 'npm run clean', | ||
'build': 'npm-run-all -p build:*', | ||
'build-test': "npm-run-all -s clean -p 'build:!(js)' 'build:js -- --environment TEST_BUNDLE_ONLY'", | ||
'build-prod': "npm-run-all -s clean -p 'build:!(js)' 'build:js -- --environment NO_TEST_BUNDLE'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build:!(js)
is run all build commands except for js, then we run it separately with an environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know npm-run-all supported segation like that, nice.
'lint': 'vjsstandard', | ||
'prepublishOnly': 'npm-run-all build test:verify', | ||
'prepublishOnly': 'npm-run-all build-prod && vjsverify --verbose', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify
can no longer be run on test
so it only makes sense in pre-publish.
4bef566
to
be47d3b
Compare
be47d3b
to
54dfed0
Compare
f102dd7
to
70b6996
Compare
48f6203
to
bb48b6c
Compare
@babel/runtime
}, | ||
"devDependencies": { | ||
"@videojs/generator-helpers": "~1.1.1", | ||
"@videojs/generator-helpers": "~1.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This provides cross-env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about Windows.
'build:js': 'rollup -c scripts/rollup.config.js', | ||
'clean': 'shx rm -rf ./dist ./test/dist', | ||
'postclean': 'shx mkdir -p ./dist ./test/dist', | ||
'clean': 'shx rm -rf ./dist ./test/dist && shx mkdir -p ./dist ./test/dist', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, I don't think&&
will work on Windows, will it?
Use new environment variable options from
videojs-generate-rollup-config
@~4.0.0
and@babel/runtime
fromvideojs-generate-rollup-config
@~5.0.0
.See: https://github.com/videojs/videojs-generate-rollup-config/blob/master/CHANGELOG.md
Depends upon: videojs/generator-helpers#2