Skip to content

Commit 9d021a8

Browse files
authored
Merge pull request #55 from andyjansson/rewrite
Rewrite
2 parents b2c38b8 + 532a4e4 commit 9d021a8

12 files changed

Lines changed: 5074 additions & 171 deletions

File tree

.babelrc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
2-
"presets": [["env", {
3-
"targets": {
4-
"node": 4
5-
}
6-
}]],
7-
"plugins": ["add-module-exports"],
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"node": 4
8+
}
9+
}
10+
]
11+
],
12+
"plugins": [
13+
"add-module-exports"
14+
],
815
"env": {
916
"development": {
1017
"sourceMaps": "inline"
11-
},
12-
"test": {
13-
"plugins": ["istanbul"]
1418
}
1519
}
1620
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
test/fixtures/*.actual.css
3-
dist
3+
dist
4+
yarn-error.log

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
2+
cache: yarn
23
node_js:
3-
- stable
4+
- node
5+
- "8"
46
- "6"
5-
- "4"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
- Changed: Updated postcss-selector-parser to version 5.0.0-rc.3
2+
- Changed: Dropped reduce-css-calc as a dependency
3+
- Fixed: Support constant() and env() ([#42](https://github.com/postcss/postcss-calc/issues/42), [#48](https://github.com/postcss/postcss-calc/issues/48))
4+
- Fixed: Support custom properties with "calc" in its name ([#50](https://github.com/postcss/postcss-calc/issues/50))
5+
- Fixed: Remove unnecessary whitespace around `*` and `/` ([cssnano#625](https://github.com/cssnano/cssnano/issues/625))
6+
- Fixed: Arithmetic bugs around subtraction ([#49](https://github.com/postcss/postcss-calc/issues/49))
7+
- Fixed: Handling of nested calc statements ([reduce-css-calc#49](https://github.com/MoOx/reduce-css-calc/issues/49))
8+
- Fixed: Bugs regarding complex calculations ([reduce-cs-calc#45](https://github.com/MoOx/reduce-css-calc/issues/45))
9+
- Fixed: `100%` incorrectly being transformed to `1` ([reduce-css-calc#44](https://github.com/MoOx/reduce-css-calc/issues/44))
10+
- Added: support for case-insensitive calc statements
11+
112
# 6.0.2 - 2018-09-25
213

314
- Fixed: use PostCSS 7 (thanks to @douglasduteil)

package.json

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,45 @@
1515
"LICENSE"
1616
],
1717
"scripts": {
18-
"prepublish": "npm run build && del-cli dist/__tests__",
19-
"build": "del-cli dist && cross-env BABEL_ENV=publish babel src --out-dir dist",
18+
"prepublish": "npm run build",
19+
"build": "del-cli dist && cross-env BABEL_ENV=publish babel src --out-dir dist --ignore src/__tests__/**/*.js && jison src/parser.jison -o dist/parser.js",
2020
"pretest": "eslint src && npm run build",
21-
"test": "ava src/__tests__/"
21+
"test": "ava"
2222
},
23-
"author": "Maxime Thirouin",
23+
"author": "Andy Jansson",
2424
"license": "MIT",
2525
"repository": "https://github.com/postcss/postcss-calc.git",
2626
"eslintConfig": {
2727
"parser": "babel-eslint",
2828
"extends": "eslint-config-i-am-meticulous"
2929
},
3030
"devDependencies": {
31-
"ava": "^0.19.1",
32-
"babel-cli": "^6.18.0",
33-
"babel-core": "^6.21.0",
34-
"babel-eslint": "^7.1.1",
35-
"babel-plugin-add-module-exports": "^0.2.1",
36-
"babel-preset-env": "^1.4.0",
37-
"babel-register": "^6.18.0",
38-
"cross-env": "^4.0.0",
39-
"del-cli": "^0.2.1",
40-
"eslint": "^3.12.2",
41-
"eslint-config-i-am-meticulous": "^6.0.1",
42-
"eslint-plugin-babel": "^4.0.0",
43-
"eslint-plugin-import": "^2.2.0"
31+
"@babel/cli": "^7.0.0",
32+
"@babel/core": "^7.0.0",
33+
"@babel/polyfill": "^7.0.0",
34+
"@babel/preset-env": "^7.0.0",
35+
"@babel/register": "^7.0.0",
36+
"ava": "^1.0.0-beta.8",
37+
"babel-eslint": "^10.0.1",
38+
"babel-plugin-add-module-exports": "^1.0.0",
39+
"cross-env": "^5.2.0",
40+
"del-cli": "^1.1.0",
41+
"eslint": "^5.6.1",
42+
"eslint-config-i-am-meticulous": "^11.0.0",
43+
"eslint-plugin-babel": "^5.2.1",
44+
"eslint-plugin-import": "^2.2.0",
45+
"jison-gho": "^0.6.1-215"
4446
},
4547
"dependencies": {
4648
"css-unit-converter": "^1.1.1",
4749
"postcss": "^7.0.2",
48-
"postcss-selector-parser": "^2.2.2",
49-
"reduce-css-calc": "^2.0.0"
50+
"postcss-selector-parser": "^5.0.0-rc.3",
51+
"postcss-value-parser": "^3.3.0"
5052
},
5153
"ava": {
52-
"require": "babel-register"
54+
"require": [
55+
"@babel/register",
56+
"@babel/polyfill"
57+
]
5358
}
5459
}

0 commit comments

Comments
 (0)