Skip to content

Commit

Permalink
[build] 0.1.1
Browse files Browse the repository at this point in the history
what:
why:
how:
  • Loading branch information
toxic-johann committed Jul 18, 2017
1 parent fdc0da9 commit 4579904
Show file tree
Hide file tree
Showing 10 changed files with 32,863 additions and 18 deletions.
11 changes: 11 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
__mocks__/
__tests__/
build/
coverage/
demo/
doc/
flow/
node_modules/
tool/
.babelrc
.flowconfig
6 changes: 5 additions & 1 deletion build/rollup.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import flow from 'rollup-plugin-flow-no-whitespace';
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
const babelConfig = {
common: {
presets: [
Expand Down Expand Up @@ -79,7 +80,10 @@ export default function (mode) {
moduleDirectory: ['src', 'node_modules']
}
}),
commonjs()
commonjs(),
replace({
'process.env.PLAYER_VERSION': `'${version}'`
})
]
};
};
8 changes: 2 additions & 6 deletions build/rollup.config.dev.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import base from './rollup.config.base';
import serve from 'rollup-plugin-serve';
import livereload from 'rollup-plugin-livereload';
import replace from 'rollup-plugin-replace';
import {camelize} from 'toxic-utils';
const {name, version} = require('../package.json');
const {name} = require('../package.json');
const config = base('iife');
config.plugins.push(
serve(),
livereload(),
replace({
'process.env.PLAYER_VERSION': `'${version}'`
})
livereload()
);
export default Object.assign(config, {
format: 'umd',
Expand Down
2 changes: 1 addition & 1 deletion build/rollup.config.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ config.plugins.push(uglify());
export default Object.assign(config, {
format: 'umd',
dest: 'lib/index.min.js',
moduleName: camelize(name)
moduleName: camelize(name, true)
});
2 changes: 1 addition & 1 deletion build/rollup.config.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import {camelize} from 'toxic-utils';
export default Object.assign(base('umd'), {
format: 'umd',
dest: 'lib/index.browser.js',
moduleName: camelize(name)
moduleName: camelize(name, true)
});
Loading

0 comments on commit 4579904

Please sign in to comment.