Skip to content

Commit ed99877

Browse files
committed
apply csp patch
1 parent e9fcaa9 commit ed99877

File tree

11 files changed

+4719
-53
lines changed

11 files changed

+4719
-53
lines changed

build/build.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var rollup = require('rollup')
44
var uglify = require('uglify-js')
55
var babel = require('rollup-plugin-babel')
66
var replace = require('rollup-plugin-replace')
7+
var commonjs = require('rollup-plugin-commonjs')
78
var version = process.env.VERSION || require('../package.json').version
89

910
var banner =
@@ -26,8 +27,10 @@ rollup.rollup({
2627
entry: 'src/index.js',
2728
plugins: [
2829
babel({
29-
loose: 'all'
30-
})
30+
loose: 'all',
31+
exclude: 'lib/**'
32+
}),
33+
commonjs()
3134
]
3235
})
3336
.then(function (bundle) {
@@ -45,8 +48,10 @@ rollup.rollup({
4548
'process.env.NODE_ENV': "'development'"
4649
}),
4750
babel({
48-
loose: 'all'
49-
})
51+
loose: 'all',
52+
exclude: 'lib/**'
53+
}),
54+
commonjs()
5055
]
5156
})
5257
.then(function (bundle) {
@@ -66,8 +71,10 @@ rollup.rollup({
6671
'process.env.NODE_ENV': "'production'"
6772
}),
6873
babel({
69-
loose: 'all'
70-
})
74+
loose: 'all',
75+
exclude: 'lib/**'
76+
}),
77+
commonjs()
7178
]
7279
})
7380
.then(function (bundle) {

build/ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ then
66
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
77
npm run build
88
npm run e2e
9-
npm run sauce-all
9+
npm run sauce #csp only need Chrome/FF
1010
else
1111
npm test
1212
fi

build/karma.cover.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function (config) {
1818
options.webpack.module.postLoaders = [
1919
{
2020
test: /\.js$/,
21-
exclude: /test|node_modules/,
21+
exclude: /test|node_modules|lib\//,
2222
loader: 'istanbul-instrumenter'
2323
}
2424
]

build/webpack.dev.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ module.exports = {
1111
},
1212
module: {
1313
loaders: [
14-
{ test: /\.js$/, loader: 'babel' }
14+
{
15+
test: /\.js$/,
16+
loader: 'babel',
17+
exclude: /lib\//
18+
}
1519
]
1620
},
1721
babel: {

build/webpack.test.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
{
1818
test: /\.js$/,
1919
loader: 'babel',
20-
exclude: /test\/unit|node_modules/
20+
exclude: /test\/unit|node_modules|lib\//
2121
}
2222
]
2323
},

0 commit comments

Comments
 (0)