Skip to content

Commit 8ae3689

Browse files
chore(release): 3.0.0 (#34)
1 parent c7d965c commit 8ae3689

File tree

11 files changed

+5506
-4518
lines changed

11 files changed

+5506
-4518
lines changed

.travis.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ git:
66
branches:
77
only:
88
- master
9-
- /^greenkeeper/.*$/
109

1110
language: node_js
1211

@@ -19,22 +18,18 @@ cache:
1918
matrix:
2019
fast_finish: true
2120
include:
22-
- node_js: '10'
21+
- node_js: "12"
2322
script: npm run $JOB_PART
2423
env: JOB_PART=pretest
25-
- node_js: '10'
24+
- node_js: "12"
2625
script: npm run $JOB_PART
27-
env: JOB_PART=test-only
28-
- node_js: '9'
26+
env: JOB_PART=test:only
27+
- node_js: "10"
2928
script: npm run $JOB_PART
30-
env: JOB_PART=test-only
31-
- node_js: '8'
29+
env: JOB_PART=test:only
30+
- node_js: "8"
3231
script: npm run $JOB_PART
33-
env: JOB_PART=test-only
34-
- node_js: '6'
35-
script: npm run $JOB_PART
36-
env: JOB_PART=test-only
37-
sudo: required
32+
env: JOB_PART=test:only
3833

3934
before_install:
4035
- npm i -g npm@latest

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to [Semantic Versioning](http://semver.org).
66

7+
## 3.0.0 - 2019-06-25
8+
9+
- Changed: minimum require node version is >= 8.9.0.
10+
- Changed: update `execa` to version `2` (some arguments was be renamed, please look [`execa` documentation](https://github.com/sindresorhus/execa)).
11+
712
## 2.1.2 - 2018-08-29
813

914
- Chore: minimum required `execa` version is now `^1.0.0`.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2018 itgalaxy inc.
3+
Copyright (c) 2017-present itgalaxy inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 85 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![Travis Build Status](https://img.shields.io/travis/itgalaxy/execa-webpack-plugin/master.svg?label=build)](https://travis-ci.org/itgalaxy/execa-webpack-plugin)
55
[![dependencies Status](https://david-dm.org/itgalaxy/execa-webpack-plugin/status.svg)](https://david-dm.org/itgalaxy/execa-webpack-plugin)
66
[![devDependencies Status](https://david-dm.org/itgalaxy/execa-webpack-plugin/dev-status.svg)](https://david-dm.org/itgalaxy/execa-webpack-plugin?type=dev)
7-
[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/execa-webpack-plugin.svg)](https://greenkeeper.io)
87

98
A better `child_process` for `webpack`.
109

@@ -55,92 +54,116 @@ List of [events](https://webpack.js.org/api/compiler-hooks/).
5554
Name of event contain - `on` + event name (first character in upper case).
5655
Examples: `onBeforeRun`, `onRun`, `onWatchRun`, `onCompile` and etc.
5756

57+
**webpack.config.js**
58+
5859
```js
59-
[
60-
new ExecaPlugin({
61-
onBeforeRun: [
62-
{
63-
args: ["build"],
64-
cmd: "del"
65-
}
66-
],
67-
onCompile: [
68-
{
69-
args: ["check"],
70-
cmd: "command"
71-
}
72-
],
73-
// Support nested command
74-
onDone: [
75-
{
76-
args: [
60+
module.exports = {
61+
plugins: [
62+
[
63+
new ExecaPlugin({
64+
onBeforeRun: [
7765
{
78-
args: ["arg"],
79-
cmd: "command-return-argument"
80-
},
81-
"other-argument",
66+
args: ["build"],
67+
cmd: "del"
68+
}
69+
],
70+
onCompile: [
8271
{
83-
args: ["arg"],
84-
cmd: "command-return-other-argument"
72+
args: ["check"],
73+
cmd: "command"
8574
}
8675
],
87-
cmd: "command"
88-
}
76+
// Support nested command
77+
onDone: [
78+
{
79+
args: [
80+
{
81+
args: ["arg"],
82+
cmd: "command-return-argument"
83+
},
84+
"other-argument",
85+
{
86+
args: ["arg"],
87+
cmd: "command-return-other-argument"
88+
}
89+
],
90+
cmd: "command"
91+
}
92+
]
93+
})
8994
]
90-
})
91-
];
95+
]
96+
};
9297
```
9398

9499
### `bail`
95100

101+
Fail out on the first error instead of tolerating it. To enable it:
102+
103+
**webpack.config.js**
104+
96105
```js
97-
[
98-
new ExecaPlugin({
99-
bail: true,
100-
onBeforeRun: [
101-
{
102-
args: ["build"],
103-
cmd: "del"
104-
}
106+
module.exports = {
107+
plugins: [
108+
[
109+
new ExecaPlugin({
110+
bail: true,
111+
onBeforeRun: [
112+
{
113+
args: ["build"],
114+
cmd: "del"
115+
}
116+
]
117+
})
105118
]
106-
})
107-
];
119+
]
120+
};
108121
```
109122

110123
### `dev`
111124

112125
If you want to run command(s) in `watch` mode every time you can set `dev` option to false.
113126

127+
**webpack.config.js**
128+
114129
```js
115-
[
116-
new ExecaPlugin({
117-
dev: false,
118-
onBeforeRun: [
119-
{
120-
args: ["build"],
121-
cmd: "del"
122-
}
123-
]
124-
})
125-
];
130+
module.exports = {
131+
plugins: [
132+
new ExecaPlugin({
133+
dev: false,
134+
onBeforeRun: [
135+
{
136+
args: ["build"],
137+
cmd: "del"
138+
}
139+
]
140+
})
141+
]
142+
};
126143
```
127144

128145
### `logLevel`
129146

130-
Supports log [levels](https://github.com/webpack-contrib/webpack-log#level).
147+
Logging for commands.
148+
149+
Supported logger levels [levels](https://github.com/webpack-contrib/webpack-log#level).
150+
151+
**webpack.config.js**
131152

132153
```js
133-
[
134-
new ExecaPlugin({
135-
logLevel: "info",
136-
onBeforeRun: [
137-
{
138-
args: ["build"],
139-
cmd: "del"
140-
}
141-
]
142-
})
143-
];
154+
module.exports = {
155+
plugins: [
156+
new ExecaPlugin({
157+
logLevel: "info",
158+
onBeforeRun: [
159+
{
160+
args: ["build"],
161+
cmd: "del"
162+
}
163+
]
164+
})
165+
]
166+
};
144167
```
145168

146169
## Thanks

__tests__/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ exports[`execa-webpack-plugin should throw error invalid \`onFooBar\` option (no
1212

1313
exports[`execa-webpack-plugin should throw error on \`on*\` options are empty (no events) 1`] = `"Known events not found"`;
1414

15-
exports[`execa-webpack-plugin should throw error with \`bail: true\` option (async event) 1`] = `[Error: spawn not-found ENOENT]`;
15+
exports[`execa-webpack-plugin should throw error with \`bail: true\` option (async event) 1`] = `[Error: Command failed with exit code 2 (ENOENT): not-found]`;
1616

17-
exports[`execa-webpack-plugin should throw error with \`bail: true\` option (sync event) 1`] = `[Error: spawnSync not-found ENOENT]`;
17+
exports[`execa-webpack-plugin should throw error with \`bail: true\` option (sync event) 1`] = `[Error: Command failed with exit code 2 (ENOENT): not-found]`;
1818

1919
exports[`execa-webpack-plugin should works and output 'stdout' and 'stderr' with \`logLevel: 'info'\` command (async event): errors 1`] = `Array []`;
2020

0 commit comments

Comments
 (0)