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

feat: Update to videojs-generate-rollup-config ~5.0.0, use env options, and @babel/runtime #289

Merged
merged 8 commits into from
Aug 16, 2019

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Jul 15, 2019

Use new environment variable options from videojs-generate-rollup-config@~4.0.0 and @babel/runtime from videojs-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

@@ -124,18 +124,16 @@ const packageJSON = (current, context) => {
'ie 11'
],
'scripts': _.assign({}, current.scripts, {
'prebuild': 'npm run clean',
Copy link
Contributor Author

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',
Copy link
Contributor Author

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

Copy link
Member

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?

'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'",
Copy link
Contributor Author

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.

Copy link
Member

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',
Copy link
Contributor Author

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.

@brandonocasey brandonocasey force-pushed the feat/new-rollup-env-options branch from 4bef566 to be47d3b Compare July 15, 2019 19:38
@brandonocasey brandonocasey force-pushed the feat/new-rollup-env-options branch from be47d3b to 54dfed0 Compare July 15, 2019 21:36
@brandonocasey brandonocasey force-pushed the feat/new-rollup-env-options branch from f102dd7 to 70b6996 Compare August 16, 2019 05:25
@brandonocasey brandonocasey force-pushed the feat/new-rollup-env-options branch from 48f6203 to bb48b6c Compare August 16, 2019 16:05
@brandonocasey brandonocasey changed the title feat: Update to videojs-generate-rollup-config ~4.0.0 and use new env vars feat: Update to videojs-generate-rollup-config ~5.0.0, use env options, and @babel/runtime Aug 16, 2019
@brandonocasey brandonocasey requested a review from gkatsev August 16, 2019 17:26
},
"devDependencies": {
"@videojs/generator-helpers": "~1.1.1",
"@videojs/generator-helpers": "~1.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This provides cross-env

Copy link
Member

@misteroneill misteroneill left a 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',
Copy link
Member

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?

@brandonocasey brandonocasey merged commit a63fa59 into master Aug 16, 2019
@brandonocasey brandonocasey deleted the feat/new-rollup-env-options branch August 16, 2019 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants