Skip to content

Commit 30c2c41

Browse files
committed
remove images option
1 parent 40cf295 commit 30c2c41

File tree

15 files changed

+21
-108
lines changed

15 files changed

+21
-108
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- uses: actions/[email protected]
1616
with:
1717
node-version: ${{ matrix.node-version }}
18-
- run: npm run test:prepare && npm install-test
18+
- run: npm install-test
1919
env:
2020
CI: true

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ faucet-pipeline-static version history
22
======================================
33

44

5+
v2.0.0
6+
------
7+
8+
_?_
9+
10+
breaking changes:
11+
12+
* support for legacy node versions is dropped
13+
* the `compact: images` option has been removed
14+
15+
changes for end users:
16+
17+
* guard against disappearing files
18+
19+
no significant changes for developers
20+
21+
522
v1.2.0
623
------
724

index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
let { readFile, stat } = require("fs").promises;
22
let path = require("path");
33
let FileFinder = require("faucet-pipeline-core/lib/util/files/finder");
4+
let { abort } = require("faucet-pipeline-core/lib/util");
45

56
module.exports = {
67
key: "static",
@@ -45,11 +46,7 @@ function determinePlugins(compact, copyConfig) {
4546
}
4647

4748
if(copyConfig.compact === "images") {
48-
return {
49-
jpg: require("imagemin-mozjpeg")({ quality: 80 }),
50-
png: require("imagemin-pngquant")(),
51-
svg: require("imagemin-svgo")()
52-
};
49+
abort("images compaction option has been removed - see https://www.faucet-pipeline.org/static"); // eslint-disable-line max-len
5350
}
5451

5552
return copyConfig.compact || {};

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "faucet-pipeline-static",
3-
"version": "1.2.0",
3+
"version": "2.0.0",
44
"description": "static files for faucet-pipeline",
55
"main": "index.js",
66
"scripts": {
77
"test": "npm-run-all --parallel lint test:cli",
88
"test:cli": "./test/run",
9-
"test:prepare": "./test/prepare",
109
"lint": "eslint --cache index.js test && echo ✓"
1110
},
1211
"repository": {
@@ -24,9 +23,6 @@
2423
},
2524
"devDependencies": {
2625
"eslint-config-fnd": "^1.8.0",
27-
"imagemin-mozjpeg": "^8.0.0",
28-
"imagemin-pngquant": "^8.0.0",
29-
"imagemin-svgo": "^7.1.0",
3026
"json-diff": "^0.5.4",
3127
"npm-run-all": "^4.1.5",
3228
"release-util-fnd": "^2.0.0"

test/prepare

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

test/run

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -82,44 +82,4 @@ begin "$root/test_match_multiple"
8282
assert_missing "./dist/nope.json"
8383
end
8484

85-
begin "$root/test_compact_undefined"
86-
faucet --compact
87-
assert_identical src/test.txt dist/test.txt
88-
assert_identical src/example.jpg dist/example.jpg
89-
assert_identical src/example.png dist/example.png
90-
assert_identical src/example.gif dist/example.gif
91-
assert_identical src/example.svg dist/example.svg
92-
assert_identical src/example.webp dist/example.webp
93-
end
94-
95-
begin "$root/test_compact_images"
96-
faucet
97-
assert_identical src/test.txt dist/test.txt
98-
assert_identical src/example.jpg dist/example.jpg
99-
assert_identical src/example.png dist/example.png
100-
assert_identical src/example.gif dist/example.gif
101-
assert_identical src/example.svg dist/example.svg
102-
assert_identical src/example.webp dist/example.webp
103-
end
104-
105-
begin "$root/test_compact_images"
106-
faucet --compact
107-
assert_identical src/test.txt dist/test.txt
108-
assert_smaller_size src/example.jpg dist/example.jpg
109-
assert_smaller_size src/example.png dist/example.png
110-
assert_identical src/example.gif dist/example.gif
111-
assert_smaller_size src/example.svg dist/example.svg
112-
assert_identical src/example.webp dist/example.webp
113-
end
114-
115-
begin "$root/test_compact_custom"
116-
faucet --compact
117-
assert_identical src/test.txt dist/test.txt
118-
assert_identical src/example.jpg dist/example.jpg
119-
assert_identical src/example.png dist/example.png
120-
assert_identical src/example.gif dist/example.gif
121-
assert_smaller_size src/example.svg dist/example.svg
122-
assert_identical src/example.webp dist/example.webp
123-
end
124-
12585
echo; echo "SUCCESS: all tests passed"

test/test_compact_custom/faucet.config.js

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

test/test_compact_custom/src/.keep

Whitespace-only changes.

test/test_compact_custom/src/test.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/test_compact_images/faucet.config.js

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

0 commit comments

Comments
 (0)