Skip to content

Commit 3562916

Browse files
committed
Merge branch 'release/1.1.1'
2 parents e1a8293 + 0b45259 commit 3562916

File tree

17 files changed

+3315
-1288
lines changed

17 files changed

+3315
-1288
lines changed

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## 1.1.0 - 20.02.2020
4+
## 1.1.1
5+
6+
* [Added] Missing directory handling (displays warning about missing directory and processes the other)
7+
* [Fixed] Option to set `false` for a `scripts` or `styles` path is now working properly
8+
* [Fixed] isProduction constant is now defined based on cli args, not only NODE_ENV
9+
10+
## 1.1.0
511

612
* [Added] Images handling
713
* [Changed] Paths configuration
814

9-
## 1.0.1 - 19.02.2020
15+
## 1.0.1
1016

1117
* [Added] SourceMaps
1218
* [Added] Option tu turn off the DependencyExtractionWebpackPlugin
1319
* [Fixed] RemoveSuperflousAssetsPlugin fixed
1420

15-
## 1.0.0 - 12.02.2020
21+
## 1.0.0
1622

1723
Initial release

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@ All arguments other than listed below will be directly passed to [webpack](https
132132
"mpScriptsConfig": {
133133
"urlLoader": 8192,
134134
"imagemin": {
135-
"svgo": { "plugins": [
136-
{ "removeDoctype": false }
137-
] }
138-
},
135+
"svgo": {
136+
"plugins": [
137+
{ "removeDoctype": false }
138+
]
139+
}
140+
},
139141
"paths": {
140142
"src": "src/assets",
141143
"output": "dist",

bin/mp-scripts.js

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,45 @@
55
/**
66
* External dependencies
77
*/
8-
const spawn = require( 'cross-spawn' );
8+
const spawn = require("cross-spawn");
99

1010
/**
1111
* Internal dependencies
1212
*/
13-
const {
14-
getArgs,
15-
} = require( '../utils' );
16-
17-
const [ script, ...args ] = getArgs();
18-
19-
if ( ! [
20-
'build',
21-
'lint-js',
22-
'lint-style',
23-
'start',
24-
].includes( script ) ) {
25-
if ( undefined === script ) {
26-
console.log('No script specified.');
13+
const { getArgs } = require("../utils");
14+
15+
const [script, ...args] = getArgs();
16+
17+
if (!["build", "lint-js", "lint-style", "start"].includes(script)) {
18+
if (undefined === script) {
19+
console.log("No script specified.");
2720
} else {
2821
console.log('Unknown script "' + script + '".');
2922
}
30-
process.exit( 1 );
23+
process.exit(1);
3124
}
3225

3326
const { signal, status } = spawn.sync(
34-
'node',
35-
[
36-
require.resolve( '../scripts/' + script ),
37-
...args,
38-
],
39-
{ stdio: 'inherit' }
27+
"node",
28+
[require.resolve("../scripts/" + script), ...args],
29+
{ stdio: "inherit" }
4030
);
4131

42-
if ( signal ) {
43-
if ( signal === 'SIGKILL' ) {
32+
if (signal) {
33+
if (signal === "SIGKILL") {
4434
console.log(
45-
'The script failed because the process exited too early. ' +
46-
'This probably means the system ran out of memory or someone called ' +
47-
'`kill -9` on the process.'
35+
"The script failed because the process exited too early. " +
36+
"This probably means the system ran out of memory or someone called " +
37+
"`kill -9` on the process."
4838
);
49-
} else if ( signal === 'SIGTERM' ) {
39+
} else if (signal === "SIGTERM") {
5040
console.log(
51-
'The script failed because the process exited too early. ' +
52-
'Someone might have called `kill` or `killall`, or the system could ' +
53-
'be shutting down.'
41+
"The script failed because the process exited too early. " +
42+
"Someone might have called `kill` or `killall`, or the system could " +
43+
"be shutting down."
5444
);
5545
}
56-
process.exit( 1 );
46+
process.exit(1);
5747
}
5848

59-
process.exit( status );
49+
process.exit(status);

0 commit comments

Comments
 (0)