Skip to content

Commit 49bbde4

Browse files
committed
Auto run
1 parent 011172b commit 49bbde4

8 files changed

+60
-38
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ node_js:
1212
- '8'
1313
script:
1414
- npm run test:ci
15+
after_success:
16+
- npm run test:ci-coveralls
1517
matrix:
1618
fast_finish: true

dist/get-own-non-enumerable-keys-x.js

Lines changed: 41 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/get-own-non-enumerable-keys-x.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/get-own-non-enumerable-keys-x.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/get-own-non-enumerable-keys-x.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"security-fix": "npm run security -- fix",
4141
"start": "nodemon --exec \"npm run build\" --watch src",
4242
"test": "npm run clean:coverage && jest",
43-
"test:ci": "npm run test -- --ci --maxWorkers=2 --coverage --coverageReporters=text-lcov | coveralls",
43+
"test:ci": "npm run test -- --ci --maxWorkers=2",
44+
"test:ci-coveralls": "npm run test:ci -- --coverage --coverageReporters=text-lcov | coveralls",
4445
"test:coverage": "npm run test -- --coverage"
4546
},
4647
"license": "MIT",
@@ -114,6 +115,7 @@
114115
"webpack": "^4.39.1",
115116
"webpack-bundle-analyzer": "^3.4.1",
116117
"webpack-cli": "^3.3.6",
118+
"webpack-global-object-x": "^1.0.0",
117119
"webpack-merge": "^4.2.1"
118120
},
119121
"engines": {

webpack.config.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,9 @@ const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
1212
const eslintFriendlyFormatter = require('eslint-friendly-formatter');
1313
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
1414
const camelCase = require('lodash/camelCase');
15+
const globalObject = require('webpack-global-object-x');
1516
const PACKAGE = require('./package.json');
1617

17-
const getGlobal = function() {
18-
'use strict';
19-
20-
if (typeof self !== 'undefined') {
21-
return self;
22-
}
23-
24-
if (typeof window !== 'undefined') {
25-
return window;
26-
}
27-
28-
if (typeof global !== 'undefined') {
29-
return global;
30-
}
31-
32-
return Function('return this')();
33-
};
34-
3518
const filename = PACKAGE.name.replace('@xotic750/', '');
3619
const library = camelCase(filename);
3720
const dist = path.resolve(__dirname, 'dist');
@@ -203,7 +186,7 @@ module.exports = function generateConfig(env) {
203186
*/
204187
output: {
205188
// https://github.com/webpack/webpack/issues/6525
206-
globalObject: `(${getGlobal.toString()}())`,
189+
globalObject: `(${globalObject.toString()}())`,
207190
library,
208191
libraryTarget: 'umd',
209192
path: dist,

0 commit comments

Comments
 (0)