Skip to content

Commit 674cdcb

Browse files
committed
Release 0.2.0
1 parent 313f933 commit 674cdcb

File tree

7 files changed

+67
-39
lines changed

7 files changed

+67
-39
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
9+
# Maintain dependencies for npm
10+
- package-ecosystem: "npm"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"

.github/workflows/nodejs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: tests
2+
on:
3+
- push
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node-version:
10+
- 12.x
11+
- 14.x
12+
- 16.x
13+
steps:
14+
- uses: actions/[email protected]
15+
- uses: actions/[email protected]
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- run: npm install-test
19+
env:
20+
CI: true

.travis.yml

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

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
faucet-pipeline-images version history
22
======================================
33

4+
v0.2.0
5+
------
6+
7+
_2021-05-21_
8+
9+
notable changes for end users:
10+
11+
* updated dependencies
12+
13+
notable changes for end developers:
14+
15+
* updated to new PostCSS API
16+
* switched to Github Actions and Dependabot
17+
18+
419
v0.1.1
520
------
621

@@ -13,6 +28,7 @@ notable changes for end users:
1328

1429
no significant changes for developers
1530

31+
1632
v0.1.0
1733
------
1834

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# faucet-pipeline-css
22
[![npm](https://img.shields.io/npm/v/faucet-pipeline-css.svg)](https://www.npmjs.com/package/faucet-pipeline-css)
3-
[![Build Status](https://travis-ci.org/faucet-pipeline/faucet-pipeline-css.svg?branch=master)](https://travis-ci.org/faucet-pipeline/faucet-pipeline-css)
4-
[![Greenkeeper badge](https://badges.greenkeeper.io/faucet-pipeline/faucet-pipeline-css.svg)](https://greenkeeper.io)
53

64
You can find the documentation [here](http://www.faucet-pipeline.org).
75

lib/asset-url.js

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
1-
let postcss = require("postcss");
2-
let helpers = require("postcss-message-helpers");
31
let ASSET_URL_PATTERN = /asset-url\(['"]?(.*?)['"]?\)/;
42

5-
module.exports = postcss.plugin("faucet-pipeline-css", ({ manifest }) => {
6-
return declarationWalker(node => replaceAssetURL(node, manifest));
7-
});
8-
9-
function replaceAssetURL(node, manifest) {
10-
if(!node.value) {
11-
return;
12-
}
13-
14-
if(ASSET_URL_PATTERN.test(node.value)) {
15-
node.value = node.value.replace(ASSET_URL_PATTERN,
16-
(match, url) => `url("${manifest.get(url)}")`);
17-
}
18-
}
19-
20-
function declarationWalker(fn) {
21-
return style => {
22-
style.walkDecls(node => {
23-
helpers.try(() => fn(node), node.source);
24-
});
3+
module.exports = ({ manifest }) => {
4+
return {
5+
postcssPlugin: "postcss-asset-url",
6+
Declaration(decl) {
7+
if(ASSET_URL_PATTERN.test(decl.value)) {
8+
decl.value = decl.value.replace(ASSET_URL_PATTERN,
9+
(match, url) => `url("${manifest.get(url)}")`);
10+
}
11+
}
2512
};
26-
}
13+
};
14+
module.exports.postcss = true;

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-css",
3-
"version": "0.1.1",
3+
"version": "0.2.0",
44
"description": "CSS for faucet-pipeline",
55
"main": "lib/index.js",
66
"scripts": {
@@ -19,19 +19,19 @@
1919
},
2020
"homepage": "https://www.faucet-pipeline.org",
2121
"dependencies": {
22-
"faucet-pipeline-core": "^1.0.0",
23-
"postcss": "~7.0.14",
24-
"postcss-discard-comments": "~4.0.1",
25-
"postcss-import": "~12.0.1",
22+
"faucet-pipeline-core": "^1.6.1",
23+
"postcss": "~8.3.0",
24+
"postcss-discard-comments": "~5.0.1",
25+
"postcss-import": "~14.0.2",
2626
"postcss-message-helpers": "~2.0.0",
27-
"postcss-normalize-whitespace": "~4.0.1"
27+
"postcss-normalize-whitespace": "~5.0.1"
2828
},
2929
"devDependencies": {
3030
"eslint-config-fnd": "^1.6.0",
3131
"eslint-plugin-import": "^2.13.0",
3232
"faucet-pipeline-static": "^1.0.0",
3333
"json-diff": "^0.5.2",
3434
"npm-run-all": "^4.1.5",
35-
"release-util-fnd": "^1.1.1"
35+
"release-util-fnd": "^2.0.1"
3636
}
3737
}

0 commit comments

Comments
 (0)