$ npm install @videojs/babel-config
Currently babel configs are the same for most plugins, and most of them are built using this babel config via babel. We have some libraries though that are should not be built using rollup for nodejs consumption, that are currently doing so. So this config while still consumed by videojs-generate-rollup-config can also be used standalone with babel-cli.
Lead Maintainer: Brandon Casey @brandonocasey
Maintenance Status: Stable
Table of Contents
$ npm install --save-dev @babel/cli @videojs/babel-config
if (config.builds.module) {
delete config.builds.module;
}
{
"build:cjs": "babel-config-cjs -d ./cjs ./src",
"build:es": "babel-config-es -d ./es ./src",
"watch:cjs": "npm run build:cjs -- -w",
"watch:es": "npm run build:es -- -w"
}
main
in package.json
is set to the cjs dist. Something like cjs/index.js
module
in package.json
is set to the es dist. Something like es/index.js
browser
in package.json
is set to the browser dist. Something like dist/project-name.js
es
and cjs
to vjsstandard.ignore
in package.json
es/
and cjs/
are in files
in package.json
/es
and /cjs
to .gitignore
../es
and ./cjs
to the npm script for clean
after mkdir -p
and rm -rf
.shx rm -rf ./dist ./test/dist ./cjs ./es && shx mkdir -p ./dist ./test/dist ./cjs ./es
babel-config-cjs
, babel-config-es
, or babel-config-run
if the TEST_BUNDLE_ONLY
environment variable is set nothing will run! This is to maintain parity with videojs-generate-rollup-config
.babel-config-cjs
binary runs babel cli with --verbose
and --config-file
set to the cjs config exported here.babel-config-es
binary runs babel cli with --verbose
and --config-file
set to the es config exported here.babel-config-run
binary runs babel cli with --verbose
but no config file.const config = require('@videojs/babel-config/cjs.js');
module.export = config
.babel-config-run --config-file <new-config> ...
© 2010 - cnpmjs.org x YWFE | Home | YWFE