Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.

Commit dd05b47

Browse files
committed
Update dependencies
1 parent 4304fb8 commit dd05b47

File tree

6 files changed

+1040
-786
lines changed

6 files changed

+1040
-786
lines changed

.jestconfig

Lines changed: 0 additions & 15 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
language: node_js
22
node_js:
3+
- '4'
34
- '6'
5+
- 'latest'

jest.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
coverageDirectory: 'coverage',
3+
moduleDirectories: ['node_modules'],
4+
moduleNameMapper: { // eslint-disable-next-line max-len
5+
'^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|bmp|ico|yml)$': '<rootDir>/__mocks__/fileMock.js',
6+
'^.+\\.(css|scss|sass)$': '<rootDir>/__mocks__/styleMock.js',
7+
},
8+
modulePaths: [
9+
'src',
10+
],
11+
collectCoverageFrom: [
12+
'src/**/*.js',
13+
],
14+
testRegex: '(/__tests__/.*\\.test.js)$',
15+
};

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-starter",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Starter kit for npm modules in es2015",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -20,7 +20,7 @@
2020
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/npm-starter.js",
2121
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/npm-starter.min.js",
2222
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
23-
"test": "cross-env BABEL_ENV=commonjs jest --config .jestconfig",
23+
"test": "cross-env BABEL_ENV=commonjs jest --config jest.config.js",
2424
"test:cov": "npm test -- --coverage",
2525
"test:watch": "npm test -- --watch",
2626
"prepublish": "npm run clean && npm run check && npm run build --kill --print"
@@ -44,19 +44,19 @@
4444
"homepage": "https://github.com/nusmodifications/npm-starter",
4545
"npmName": "npm-starter",
4646
"devDependencies": {
47-
"babel-cli": "^6.16.0",
48-
"babel-core": "^6.22.1",
49-
"babel-eslint": "^7.0.0",
50-
"babel-jest": "^18.0.0",
51-
"babel-loader": "^6.2.5",
52-
"babel-plugin-transform-es2015-modules-commonjs": "^6.16.0",
53-
"babel-preset-es2015": "^6.16.0",
54-
"cross-env": "^3.1.3",
55-
"eslint": "^3.8.0",
56-
"eslint-config-airbnb-base": "^11.0.1",
47+
"babel-cli": "^6.24.1",
48+
"babel-core": "^6.24.1",
49+
"babel-eslint": "^7.2.3",
50+
"babel-jest": "^20.0.3",
51+
"babel-loader": "^7.0.0",
52+
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
53+
"babel-preset-es2015": "^6.24.1",
54+
"cross-env": "^5.0.0",
55+
"eslint": "^3.19.0",
56+
"eslint-config-airbnb-base": "^11.2.0",
5757
"eslint-plugin-import": "^2.0.1",
58-
"jest": "^18.1.0",
59-
"rimraf": "^2.5.4",
60-
"webpack": "^1.13.2"
58+
"jest": "^20.0.3",
59+
"rimraf": "^2.6.1",
60+
"webpack": "^2.5.1"
6161
}
6262
}

webpack.config.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
'use strict';
2-
31
const webpack = require('webpack');
42

53
const env = process.env.NODE_ENV;
64
const config = {
7-
resolve: {
8-
root: ['lib'],
9-
extensions: ['', '.js'],
10-
moduleDirectories: ['node_modules'],
11-
},
5+
entry: './src',
126
output: {
137
library: 'npm-starter',
148
libraryTarget: 'umd',
@@ -17,13 +11,13 @@ const config = {
1711
loaders: [
1812
{
1913
test: /\.js$/,
20-
exclude: /node_modules/,
21-
loader: 'babel',
14+
include: /src/,
15+
loader: 'babel-loader',
2216
query: {
23-
cacheDirectory: true
17+
cacheDirectory: true,
2418
},
2519
},
26-
]
20+
],
2721
},
2822
plugins: [
2923
new webpack.DefinePlugin({
@@ -42,11 +36,10 @@ if (env === 'production') {
4236
drop_console: true,
4337
},
4438
mangle: {
45-
screw_ie8 : true,
39+
screw_ie8: true,
4640
keep_fnames: true,
4741
},
48-
})
49-
);
42+
}));
5043
}
5144

5245
module.exports = config;

0 commit comments

Comments
 (0)