Skip to content

Commit 69c494a

Browse files
author
roman.vasilev
committed
feat: Added semantic release
1 parent 9a0c5db commit 69c494a

File tree

6 files changed

+56
-18
lines changed

6 files changed

+56
-18
lines changed

.npmignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ npm-debug.log
44
test/
55
gulpfile.js
66
.eslintrc
7-
~*
8-
/.postcss-import-url.sublime-project
9-
/.postcss-import-url.sublime-workspace
7+
~*

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## 3.X.X
2+
3+
* 3.0.4 (04 Jan 2018) - fixed [#15](https://github.com/unlight/postcss-import-url/issues/15)
4+
* 3.0.3 (02 Jan 2018) - fixed [#13](https://github.com/unlight/postcss-import-url/issues/13), set peer dependency as range >=6 <7
5+
* 3.0.1 (30 Oct 2017) - updated dependencies (postcss 6), moved postcss to peerDependencies
6+
* 3.0.0 (27 Oct 2017) - using `atRule.source.input.file` to resolve urls
7+
* 2.2.0 (19 Nov 2016) - added option modernBrowser
8+
* 2.1.1 (19 Oct 2016) - added to readme google font notice
9+
* 2.1.0 (09 Jul 2016) - replaced Object.assign by _.assign
10+
* 2.0.0 (08 Jul 2016) - added recursive option
11+
* 1.0.0 (01 Nov 2015) - first release

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
3+
Copyright (c) 2018
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: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ See [PostCSS](https://github.com/postcss/postcss#usage) docs for examples for yo
3737

3838
## Options
3939
* `recursive` (boolean) To import URLs recursively (default: `true`)
40-
* `modernBrowser` (boolean) set user-agent string to 'Mozilla/5.0 AppleWebKit/537.36 Chrome/54.0.2840.99 Safari/537.36', this option maybe useful for importing fonts from Google. Google check `user-agent` header string and respond can be different (default: `false`)
40+
* `modernBrowser` (boolean) set user-agent string to 'Mozilla/5.0 AppleWebKit/537.36 Chrome/65.0.0.0 Safari/537.36', this option maybe useful for importing fonts from Google. Google check `user-agent` header string and respond can be different (default: `false`)
4141
* `userAgent` (string) Custom user-agent header (default: `null`)
4242

4343
## Known Issues
@@ -46,12 +46,4 @@ Google returns truetype fonts rather than the better woff2 format.
4646
Use option `modernBrowser` to explicitly load woff2 fonts.
4747

4848
## Changelog
49-
* 3.0.4 (04 Jan 2018) - fixed [#15](https://github.com/unlight/postcss-import-url/issues/15)
50-
* 3.0.3 (02 Jan 2018) - fixed [#13](https://github.com/unlight/postcss-import-url/issues/13), set peer dependency as range >=6 <7
51-
* 3.0.1 (30 Oct 2017) - updated dependencies (postcss 6), moved postcss to peerDependencies
52-
* 3.0.0 (27 Oct 2017) - using `atRule.source.input.file` to resolve urls
53-
* 2.2.0 (19 Nov 2016) - added option modernBrowser
54-
* 2.1.1 (19 Oct 2016) - added to readme google font notice
55-
* 2.1.0 (09 Jul 2016) - replaced Object.assign by _.assign
56-
* 2.0.0 (08 Jul 2016) - added recursive option
57-
* 1.0.0 (01 Nov 2015) - first release
49+
See [CHANGELOG](CHANGELOG.md)

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function createPromise(remoteFile, options) {
6262
reqOptions.headers = {};
6363
reqOptions.headers['connection'] = 'keep-alive';
6464
if (options.modernBrowser) {
65-
reqOptions.headers['user-agent'] = 'Mozilla/5.0 AppleWebKit/538.0 Chrome/54.0 Safari/538';
65+
reqOptions.headers['user-agent'] = 'Mozilla/5.0 AppleWebKit/538.0 Chrome/65.0.0.0 Safari/538';
6666
}
6767
if (options.userAgent) {
6868
reqOptions.headers['user-agent'] = String(options.userAgent);

package.json

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-import-url",
3-
"version": "3.0.4",
3+
"version": "0.0.0-dev",
44
"description": "PostCSS plugin inlines remote files.",
55
"keywords": [
66
"postcss",
@@ -9,6 +9,10 @@
99
],
1010
"license": "MIT",
1111
"homepage": "https://github.com/unlight/postcss-import-url",
12+
"engines": {
13+
"node": ">=6",
14+
"npm": ">=3"
15+
},
1216
"dependencies": {
1317
"http-https": "^1.0.0",
1418
"is-url": "^1.2.2",
@@ -22,13 +26,18 @@
2226
"devDependencies": {
2327
"chai": "^4.1.2",
2428
"gulp": "^3.9.1",
29+
"@semantic-release/changelog": "^3.0.1",
30+
"@semantic-release/git": "^7.0.5",
31+
"@semantic-release/npm": "^5.1.2",
32+
"semantic-release": "^15.13.1",
2533
"gulp-connect": "^5.0.0",
2634
"gulp-eslint": "^4.0.0",
2735
"gulp-mocha": "^5.0.0",
2836
"tcp-ping": "^0.1.1"
2937
},
3038
"scripts": {
31-
"pretest": "npm install postcss --no-package-lock --no-save",
39+
"prepublishOnly": "sed -i -e 's/devDependencies/_devDependencies/g' package.json",
40+
"pretest": "npm install postcss@7 --no-package-lock --no-save",
3241
"test": "gulp"
3342
},
3443
"main": "index.js",
@@ -41,5 +50,33 @@
4150
},
4251
"bugs": {
4352
"url": "https://github.com/unlight/postcss-import-url/issues"
53+
},
54+
"release": {
55+
"verifyConditions": [
56+
"@semantic-release/changelog",
57+
"@semantic-release/github",
58+
"@semantic-release/npm",
59+
"@semantic-release/git"
60+
],
61+
"prepare": [
62+
"@semantic-release/changelog",
63+
"@semantic-release/npm",
64+
"@semantic-release/git"
65+
],
66+
"publish": [
67+
"@semantic-release/npm",
68+
"@semantic-release/github"
69+
],
70+
"success": [
71+
"@semantic-release/github"
72+
],
73+
"fail": [
74+
"@semantic-release/github"
75+
]
76+
},
77+
"config": {
78+
"commitizen": {
79+
"path": "cz-conventional-changelog"
80+
}
4481
}
45-
}
82+
}

0 commit comments

Comments
 (0)