Skip to content

Commit d7666c0

Browse files
author
Sergii Shvager
committed
Upgraded to [email protected]
1 parent 080228a commit d7666c0

File tree

7 files changed

+3965
-1852
lines changed

7 files changed

+3965
-1852
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
coverage
44
dist
55
*.log
6+
.idea

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A webpack block that splits vendor javascript into separated bundle.
1313
## Usage
1414

1515
```js
16-
const { createConfig, env } = require('@webpack-blocks/webpack2')
16+
const { createConfig, env } = require('webpack-blocks')
1717
const splitVendor = require('webpack-blocks-split-vendor')
1818

1919
module.exports = createConfig([
@@ -55,7 +55,7 @@ Returns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Ref
5555

5656
### Exclude
5757

58-
Type: ([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)> | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp)>)
58+
Type: ([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) \| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp))>)
5959

6060
### Options
6161

package.json

+8-6
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,28 @@
5353
"webpack-md5-hash": "^0.0.5"
5454
},
5555
"devDependencies": {
56-
"@webpack-blocks/webpack2": "^0.4.0",
5756
"babel-cli": "^6.18.0",
5857
"babel-eslint": "^7.1.1",
5958
"babel-jest": "^20.0.2",
6059
"babel-plugin-transform-flow-strip-types": "^6.21.0",
61-
"babel-preset-env": "^1.1.8",
60+
"babel-preset-env": "^1.6.1",
6261
"babel-preset-stage-2": "^6.18.0",
6362
"documentation": "4.0.0-rc.0",
64-
"eslint": "^3.14.0",
63+
"eslint": "^4.11.0",
6564
"eslint-config-airbnb-base": "^11.0.1",
6665
"eslint-plugin-flowtype": "^2.29.2",
6766
"eslint-plugin-flowtype-errors": "^3.0.0",
6867
"eslint-plugin-import": "^2.2.0",
69-
"flow-bin": "^0.50.0",
68+
"flow-bin": "^0.59.0",
7069
"jest-cli": "^20.0.2",
7170
"npm-watch": "^0.2.0",
7271
"opn-cli": "^3.1.0",
73-
"rimraf": "^2.6.1"
72+
"rimraf": "^2.6.1",
73+
"webpack": "^3.8.1",
74+
"webpack-blocks": "^1.0.0-rc.2"
7475
},
7576
"peerDependencies": {
76-
"@webpack-blocks/webpack2": "^0.4.0"
77+
"webpack-blocks": "1.x",
78+
"webpack": "2.x || 3.x"
7779
}
7880
}

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @flow
2-
import { webpack, group, env, addPlugins, setOutput } from '@webpack-blocks/webpack2'
2+
import { group, env, addPlugins, setOutput } from 'webpack-blocks'
3+
import webpack from 'webpack'
34
import WebpackMd5Hash from 'webpack-md5-hash'
45
import { isVendor } from './utils'
56
import type { Options } from './types'

src/types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
/** */
3-
export type Exclude = string | RegExp | string[] | RegExp[]
3+
export type Exclude = string | RegExp | Array<string | RegExp>
44

55
/** */
66
export type Options = {

test/index.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import splitVendor from '../src'
22

33
describe('splitVendor', () => {
44
it('returns webpack block with passed string name', () => {
5-
const block = splitVendor('foo')()
5+
const block = splitVendor('foo')()()
66
expect(block.plugins[0].chunkNames[0]).toBe('foo')
77
})
88

99
it('returns webpack block with passed object name', () => {
10-
const block = splitVendor({ name: 'foo' })()
10+
const block = splitVendor({ name: 'foo' })()()
1111
expect(block.plugins[0].chunkNames[0]).toBe('foo')
1212
})
1313

1414
it('returns webpack block with default name', () => {
15-
const block = splitVendor()()
15+
const block = splitVendor()()()
1616
expect(block.plugins[0].chunkNames[0]).toBe('vendor')
1717
})
1818
})

0 commit comments

Comments
 (0)