Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

Commit 9556604

Browse files
committedNov 23, 2018
4.0.0
1 parent ec41a10 commit 9556604

12 files changed

+92
-71
lines changed
 

‎.appveyor.yml

-18
This file was deleted.

‎.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
node_modules
2-
index.bundle.js
32
package-lock.json
43
*.log*
54
*.result.css
65
.*
7-
!.appveyor.yml
86
!.editorconfig
97
!.gitignore
108
!.rollup.js
119
!.tape.js
1210
!.travis.yml
11+
/index.js
12+
/index.mjs

‎.rollup.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import babel from 'rollup-plugin-babel';
22

33
export default {
4-
input: 'index.js',
5-
output: { file: 'index.bundle.js', format: 'cjs' },
4+
input: 'src/index.js',
5+
output: [
6+
{ file: 'index.js', format: 'cjs' },
7+
{ file: 'index.mjs', format: 'esm' }
8+
],
69
plugins: [
710
babel({
811
presets: [
9-
['env', { modules: false, targets: { node: 4 } }]
12+
['@babel/env', { targets: { node: 6 } }]
1013
]
1114
})
1215
]

‎.tape.js

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ module.exports = {
33
'basic': {
44
message: 'supports basic usage'
55
},
6+
'basic:color-mod': {
7+
message: 'supports { features: { "color-mod-function": true } } usage',
8+
options: {
9+
features: {
10+
'color-mod-function': true
11+
}
12+
}
13+
},
614
'basic:variables': {
715
message: 'supports { variables } usage',
816
options: {

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
language: node_js
44

55
node_js:
6-
- 4
6+
- 6
77

88
install:
99
- npm install --ignore-scripts

‎CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Changes to PreCSS
22

3+
### 4.0.0 (November 23, 2018)
4+
5+
- Updated: `postcss` to 7.0.6 (major)
6+
- Updated: `postcss-advanced-variables` to 3.0.0 (major)
7+
- Updated: `postcss-extend-rule` to 2.0.0 (major)
8+
- Updated: `postcss-nested` to 4.1.0 (major)
9+
- Updated: `postcss-preset-env` to 6.4.0 (major)
10+
311
### 3.1.2 (February 27, 2018)
412

5-
- Updated: `postcss-advanced-variables` to v2.3.3 (patch)
6-
- Updated: `postcss-preset-env` to v3.2.2 (patch)
13+
- Updated: `postcss-advanced-variables` to 2.3.3 (patch)
14+
- Updated: `postcss-preset-env` to 3.2.2 (patch)
715

816
### 3.1.1 (February 21, 2018)
917

‎README.md

+12-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# PreCSS [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
22

33
[![NPM Version][npm-img]][npm-url]
4-
[![Linux Build Status][cli-img]][cli-url]
5-
[![Windows Build Status][win-img]][win-url]
6-
[![Gitter Chat][git-img]][git-url]
4+
[![Build Status][cli-img]][cli-url]
5+
[![Support Chat][git-img]][git-url]
76

87
[PreCSS] lets you use Sass-like markup and staged CSS features in CSS.
98

@@ -16,11 +15,11 @@ $column: 200px;
1615
}
1716

1817
.menu_link {
19-
background: color-mod($blue alpha(90%));
18+
background: $blue;
2019
width: $column;
2120
}
2221

23-
/* after */
22+
/* becomes */
2423

2524
.menu {
2625
width: calc(4 * 200px);
@@ -33,8 +32,8 @@ $column: 200px;
3332
```
3433

3534
PreCSS combines Sass-like syntactical sugar — like variables, conditionals, and
36-
iterators — with emerging CSS features — like color functions, logical
37-
and custom properties, media query ranges, and image sets.
35+
iterators — with emerging CSS features — like logical and custom properties,
36+
media query ranges, and image sets.
3837

3938
## Usage
4039

@@ -138,16 +137,14 @@ PreCSS is powered by the following plugins (in this order):
138137
- [postcss-property-lookup](https://github.com/simonsmith/postcss-property-lookup)
139138
- [postcss-nested](https://github.com/postcss/postcss-nested)
140139

141-
[npm-url]: https://www.npmjs.com/package/precss
142-
[npm-img]: https://img.shields.io/npm/v/precss.svg
140+
[cli-img]: https://img.shields.io/travis/jonathantneal/precss/master.svg
143141
[cli-url]: https://travis-ci.org/jonathantneal/precss
144-
[cli-img]: https://img.shields.io/travis/jonathantneal/precss.svg
145-
[win-url]: https://ci.appveyor.com/project/jonathantneal/precss
146-
[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/precss.svg
147-
[git-url]: https://gitter.im/postcss/postcss
148142
[git-img]: https://img.shields.io/badge/chat-gitter-blue.svg
143+
[git-url]: https://gitter.im/postcss/postcss
144+
[npm-img]: https://img.shields.io/npm/v/precss.svg
145+
[npm-url]: https://www.npmjs.com/package/precss
149146

150-
[PreCSS]: https://github.com/jonathantneal/precss
151-
[PostCSS]: https://github.com/postcss/postcss
152147
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
153148
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
149+
[PostCSS]: https://github.com/postcss/postcss
150+
[PreCSS]: https://github.com/jonathantneal/precss

‎package.json

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,47 @@
11
{
22
"name": "precss",
3-
"version": "3.1.2",
3+
"version": "4.0.0",
44
"description": "Use Sass-like markup and staged CSS features in CSS",
55
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
66
"license": "CC0-1.0",
77
"repository": "jonathantneal/precss",
88
"homepage": "https://github.com/jonathantneal/precss#readme",
99
"bugs": "https://github.com/jonathantneal/precss/issues",
10-
"main": "index.bundle.js",
11-
"module": "index.js",
10+
"main": "index.js",
11+
"module": "index.mjs",
1212
"files": [
1313
"index.js",
14-
"index.bundle.js"
14+
"index.mjs"
1515
],
1616
"scripts": {
1717
"prepublishOnly": "npm test",
1818
"pretest": "rollup -c .rollup.js --silent",
19-
"test": "echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape",
20-
"test:ec": "echint --ignore index.bundle.js test",
21-
"test:js": "eslint *.js --cache --ignore-path .gitignore --quiet",
19+
"test": "npm run test:js && npm run test:tape",
20+
"test:js": "eslint src/*.js --cache --ignore-path .gitignore --quiet",
2221
"test:tape": "postcss-tape"
2322
},
2423
"engines": {
2524
"node": ">=4.0.0"
2625
},
2726
"dependencies": {
28-
"postcss": "^6.0.23",
29-
"postcss-advanced-variables": "^2.3.3",
27+
"postcss": "^7.0.6",
28+
"postcss-advanced-variables": "^3.0.0",
3029
"postcss-atroot": "^0.1.3",
3130
"postcss-extend-rule": "^2.0.0",
32-
"postcss-nested": "^3.0.0",
33-
"postcss-preset-env": "^5.1.0",
31+
"postcss-nested": "^4.1.0",
32+
"postcss-preset-env": "^6.4.0",
3433
"postcss-property-lookup": "^2.0.0"
3534
},
3635
"devDependencies": {
37-
"babel-core": "^6.26.3",
38-
"babel-eslint": "^8.2.3",
39-
"babel-preset-env": "^1.7.0",
40-
"echint": "^4.0.1",
41-
"eslint": "^4.19.1",
36+
"@babel/core": "^7.1.6",
37+
"@babel/preset-env": "^7.1.6",
38+
"babel-eslint": "^10.0.1",
39+
"eslint": "^5.9.0",
4240
"eslint-config-dev": "^2.0.0",
4341
"postcss-tape": "^2.2.0",
4442
"pre-commit": "^1.2.2",
45-
"rollup": "^0.61.1",
46-
"rollup-plugin-babel": "^3.0.4"
43+
"rollup": "^0.67.3",
44+
"rollup-plugin-babel": "^4.0.3"
4745
},
4846
"eslintConfig": {
4947
"extends": "dev",

‎index.js ‎src/index.js

File renamed without changes.

‎test/basic.color-mod.expect.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.menu {
2+
width: calc(4 * 200px);
3+
}
4+
5+
.menu-link {
6+
width: calc(1 * 200px);
7+
background: #056ef0;
8+
height: calc(1 * 200px)
9+
}
10+
11+
.menu-link:link,.menu-link:visited {
12+
background-color: rgba(5, 110, 240, 0.5);
13+
}
14+
15+
.menu-link:-webkit-any-link {
16+
background-color: rgba(5, 110, 240, 0.5);
17+
}
18+
19+
.menu-link:-moz-any-link {
20+
background-color: rgba(5, 110, 240, 0.5);
21+
}
22+
23+
.menu-link:any-link {
24+
background-color: rgba(5, 110, 240, 0.5);
25+
}

‎test/basic.expect.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
}
1010

1111
.menu-link:link,.menu-link:visited {
12-
background-color: rgba(5, 110, 240, 0.5);
12+
background-color: color-mod(#056ef0 alpha(50%));
1313
}
1414

1515
.menu-link:-webkit-any-link {
16-
background-color: rgba(5, 110, 240, 0.5);
16+
background-color: color-mod(#056ef0 alpha(50%));
1717
}
1818

1919
.menu-link:-moz-any-link {
20-
background-color: rgba(5, 110, 240, 0.5);
20+
background-color: color-mod(#056ef0 alpha(50%));
2121
}
2222

2323
.menu-link:any-link {
24-
background-color: rgba(5, 110, 240, 0.5);
24+
background-color: color-mod(#056ef0 alpha(50%));
2525
}

‎test/basic.variables.expect.css

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@
99
}
1010

1111
:root {
12-
background-color: rgba(5, 110, 240, 0.02);
12+
background-color: color-mod(#056ef0 alpha(2%));
1313
}
1414

1515
.menu-link:link,.menu-link:visited {
16-
background-color: #056ef0;
16+
background-color: #056ef0;
1717
}
1818

1919
:root {
20-
background-color: rgba(5, 110, 240, 0.02);
20+
background-color: color-mod(#056ef0 alpha(2%));
2121
}
2222

2323
.menu-link:-webkit-any-link {
24-
background-color: #056ef0;
24+
background-color: #056ef0;
2525
}
2626

2727
:root {
28-
background-color: rgba(5, 110, 240, 0.02);
28+
background-color: color-mod(#056ef0 alpha(2%));
2929
}
3030

3131
.menu-link:-moz-any-link {
32-
background-color: #056ef0;
32+
background-color: #056ef0;
3333
}
3434

3535
:root {
36-
background-color: rgba(5, 110, 240, 0.02);
36+
background-color: color-mod(#056ef0 alpha(2%));
3737
}
3838

3939
.menu-link:any-link {
40-
background-color: #056ef0;
40+
background-color: #056ef0;
4141
}

0 commit comments

Comments
 (0)
This repository has been archived.