Skip to content

Commit 11385f1

Browse files
author
David Narbutovich
authored
Next (#12)
* Update babel to latest version * Update * Remove compiled files * Update package.json scrits * Fix jest * Update versions
1 parent 4df3574 commit 11385f1

File tree

15 files changed

+1779
-2192
lines changed

15 files changed

+1779
-2192
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"presets": [
33
[
4-
"env",
4+
"@babel/preset-env",
55
{
66
"targets": {
7-
"node": ["6.11.0"]
7+
"node": "6.11.0"
88
}
99
}
1010
]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ typings/
6161
lib/
6262
.idea/
6363
cc-test-reporter
64+
test/e2e/**/*.test.js

.travis.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
# - "10"
5-
# - "8"
6-
- "6"
4+
- "10"
5+
- "8"
76
install:
87
- yarn
98
script:
10-
- yarn coverage
11-
12-
env:
13-
global:
14-
- CC_TEST_REPORTER_ID=8277f64d4123c1ec9bafeb8c2db8a72403277f27a1419f944d013951318db00e
15-
16-
before_install:
17-
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
18-
- export PATH=$HOME/.yarn/bin:$PATH
19-
20-
before_script:
21-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
22-
- chmod +x ./cc-test-reporter
23-
- ./cc-test-reporter before-build
24-
after_script:
25-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
26-
27-
cache: yarn
9+
- yarn e2e

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Change Log
2+
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## 1.1.0
6+
7+
- Update babel to latest version
8+
- Update dependencies
9+
10+
## 1.0.0
11+
12+
- Init version

README.md

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ A [clean-css](https://github.com/jakubpawlowicz/clean-css) loader for [webpack](
1313

1414
[![npm](https://img.shields.io/npm/v/clean-css-loader.svg)](https://www.npmjs.com/package/clean-css-loader)
1515
[![npm clean-css-loader](https://img.shields.io/npm/dm/clean-css-loader.svg)](https://www.npmjs.com/package/clean-css-loader)
16-
[![Build Status](https://travis-ci.org/retyui/clean-css-loader.svg?branch=master)](https://travis-ci.org/retyui/clean-css-loader)
17-
[![Code Climate](https://codeclimate.com/github/retyui/clean-css-loader/badges/gpa.svg)](https://codeclimate.com/github/retyui/clean-css-loader)
18-
[![Test Coverage](https://codeclimate.com/github/retyui/clean-css-loader/badges/coverage.svg)](https://codeclimate.com/github/retyui/clean-css-loader/coverage)
16+
[![AppVeyor](https://img.shields.io/appveyor/ci/retyui/clean-css-loader.svg?label=windows)](https://ci.appveyor.com/project/retyui/clean-css-loader)
17+
[![Travis](https://img.shields.io/travis/retyui/clean-css-loader.svg?label=unix)](https://travis-ci.org/retyui/clean-css-loader)
1918

2019
## Install
2120

@@ -37,27 +36,27 @@ const production = false;
3736
const cssUseList = ["style-loader", "css-loader"];
3837

3938
if (production) {
40-
cssUseList.push("clean-css-loader");
41-
// or with options
42-
cssUseList.push({
43-
loader: "clean-css-loader",
44-
options: {
45-
compatibility: "ie9",
46-
level: 2,
47-
inline: ["remote"]
48-
}
49-
});
39+
cssUseList.push("clean-css-loader");
40+
// or with options
41+
cssUseList.push({
42+
loader: "clean-css-loader",
43+
options: {
44+
compatibility: "ie9",
45+
level: 2,
46+
inline: ["remote"]
47+
}
48+
});
5049
}
5150

5251
module.exports = {
53-
module: {
54-
rules: [
55-
{
56-
test: /\.css$/,
57-
use: cssUseList
58-
}
59-
]
60-
}
52+
module: {
53+
rules: [
54+
{
55+
test: /\.css$/,
56+
use: cssUseList
57+
}
58+
]
59+
}
6160
};
6261
```
6362

@@ -101,23 +100,23 @@ More option: [https://github.com/jakubpawlowicz/clean-css#constructor-options](h
101100

102101
```js
103102
module.exports = {
104-
module: {
105-
loaders: [
106-
{
107-
test: /\.css$/,
108-
loader: "css!clean-css"
109-
},
110-
{
111-
test: /\.styl$/,
112-
loader: "css!clean-css!stylus?reslve url"
113-
}
114-
//...
115-
],
116-
// Example Set options (Key "clean-css" or cleancss or CleanCSS):
117-
"clean-css": {
118-
debug: true,
119-
mediaMerging: true
120-
}
121-
}
103+
module: {
104+
loaders: [
105+
{
106+
test: /\.css$/,
107+
loader: "css!clean-css"
108+
},
109+
{
110+
test: /\.styl$/,
111+
loader: "css!clean-css!stylus?reslve url"
112+
}
113+
//...
114+
],
115+
// Example Set options (Key "clean-css" or cleancss or CleanCSS):
116+
"clean-css": {
117+
debug: true,
118+
mediaMerging: true
119+
}
120+
}
122121
};
123122
```

appveyor.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
1-
image: Visual Studio 2017
2-
init:
3-
- git config --global core.autocrlf input
4-
1+
os: Visual Studio 2017
2+
platform: x64
53
environment:
64
matrix:
7-
# - nodejs_version: 10
8-
# - nodejs_version: 8
9-
- nodejs_version: 6
10-
11-
# Finish on first failed build
12-
matrix:
13-
fast_finish: true
14-
15-
platform:
16-
- x64
17-
18-
branches:
19-
only:
20-
- master
21-
22-
# Disable Visual Studio build and deploy
23-
build: off
24-
deploy: off
5+
- nodejs_version: "10"
6+
- nodejs_version: "8"
257

268
install:
27-
- ps: Install-Product node $env:nodejs_version $env:platform
9+
- ps: Install-Product node $env:nodejs_version x64
2810
- yarn install
2911

3012
test_script:
3113
- node --version
3214
- yarn --version
33-
- yarn test
15+
- yarn e2e
16+
17+
build: off
18+
deploy: off
3419

3520
cache:
3621
- node_modules -> appveyor.yml,yarn.lock

jest.config.js

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

package.json

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,59 @@
11
{
2-
"name": "clean-css-loader",
3-
"version": "1.0.1",
4-
"main": "lib/index.js",
5-
"dependencies": {
6-
"clean-css": "^4.1.9",
7-
"loader-utils": "^1.1.0"
8-
},
9-
"peerDependencies": {
10-
"webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
11-
},
12-
"scripts": {
13-
"update-e2e": "reset ; yarn build ; yarn e2e; yarn test",
14-
"force-clean": "rimraf ./test/e2e/webpack*/node_modules/ ./test/e2e/webpack*/tests/**/*.test.js",
15-
"install-sub": "yarn link ; cd ./test/e2e/webpack1 ; yarn ; yarn link clean-css-loader ; yarn build ; cd ../webpack4 ; yarn ; yarn link clean-css-loader ; yarn build ; cd ../../..",
16-
"e2e": "yarn force-clean ; yarn install-sub",
17-
"prebuild": "rimraf ./lib",
18-
"build": "babel src --out-dir lib",
19-
"format": "prettier \".babelrc\" \"test/unit/*.js\" \"src/*.js\" \"./*.js\" --write",
20-
"pretest": "yarn build",
21-
"test": "jest",
22-
"coverage": "rimraf ./coverage; yarn test --coverage",
23-
"precommit": "lint-staged"
24-
},
25-
"description": "CleanCSS loader module for webpack",
26-
"keywords": [
27-
"CleanCSS",
28-
"webpack",
29-
"loader"
30-
],
31-
"repository": "https://github.com/retyui/clean-css-loader",
32-
"author": "David <vamnemne@gmail.com>",
33-
"license": "MIT",
34-
"files": [
35-
"lib"
36-
],
37-
"engines": {
38-
"node": ">=6.11.0"
39-
},
40-
"devDependencies": {
41-
"babel-cli": "^6.26.0",
42-
"babel-core": "^6.26.3",
43-
"babel-eslint": "^8.2.3",
44-
"babel-plugin-add-module-exports": "^0.2.1",
45-
"babel-preset-env": "^1.6.1",
46-
"eslint": "^4.19.1",
47-
"eslint-config-prettier": "^2.9.0",
48-
"eslint-config-webpack": "^1.2.5",
49-
"eslint-plugin-prettier": "^2.6.0",
50-
"husky": "0.14.3",
51-
"jest": "^22.4.3",
52-
"lint-staged": "7.0.5",
53-
"npm-run-all": "^4.1.2",
54-
"prettier": "1.12.1",
55-
"rimraf": "^2.6.1"
56-
}
2+
"name": "clean-css-loader",
3+
"version": "1.0.1",
4+
"main": "lib/index.js",
5+
"dependencies": {
6+
"clean-css": "^4.2.1",
7+
"loader-utils": "^1.1.0"
8+
},
9+
"peerDependencies": {
10+
"webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
11+
},
12+
"scripts": {
13+
"e2e": "yarn build && yarn update-e2e && yarn test",
14+
"force-clean": "rimraf ./test/e2e/webpack*/node_modules/ ./test/e2e/webpack*/tests/**/*.test.js",
15+
"install-sub": "yarn link && cd ./test/e2e/webpack1 && yarn && yarn link clean-css-loader && yarn build && cd ../webpack4 && yarn && yarn link clean-css-loader && yarn build && cd ../../..",
16+
"update-e2e": "yarn force-clean && yarn install-sub",
17+
"prebuild": "rimraf ./lib",
18+
"build": "babel src --out-dir lib",
19+
"format": "prettier \".babelrc\" \"test/unit/*.js\" \"src/*.js\" \"./*.js\" --write",
20+
"pretest": "yarn build",
21+
"test": "jest",
22+
"precommit": "lint-staged"
23+
},
24+
"description": "CleanCSS loader module for webpack",
25+
"keywords": [
26+
"CleanCSS",
27+
"webpack",
28+
"loader"
29+
],
30+
"repository": "https://github.com/retyui/clean-css-loader",
31+
"author": "David <vamnemne@gmail.com>",
32+
"license": "MIT",
33+
"files": [
34+
"lib"
35+
],
36+
"engines": {
37+
"node": ">=6.11.0"
38+
},
39+
"devDependencies": {
40+
"@babel/cli": "^7.0.0",
41+
"@babel/core": "^7.1.0",
42+
"@babel/preset-env": "^7.0.0",
43+
"babel-core": "^7.0.0-bridge.0",
44+
"babel-eslint": "^9.0.0",
45+
"babel-jest": "^23.6.0",
46+
"babel-plugin-add-module-exports": "^1.0.0",
47+
"eslint": "^5.6.0",
48+
"eslint-config-prettier": "^3.1.0",
49+
"eslint-config-webpack": "^1.2.5",
50+
"eslint-plugin-import": "^2.14.0",
51+
"eslint-plugin-prettier": "^2.6.2",
52+
"husky": "^1.0.0-rc.14",
53+
"jest": "^23.6.0",
54+
"lint-staged": "^7.3.0",
55+
"npm-run-all": "^4.1.3",
56+
"prettier": "^1.14.3",
57+
"rimraf": "^2.6.1"
58+
}
5759
}

0 commit comments

Comments
 (0)