Skip to content

Next #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 23, 2018
Merged

Next #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"presets": [
[
"env",
"@babel/preset-env",
{
"targets": {
"node": ["6.11.0"]
"node": "6.11.0"
}
}
]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ typings/
lib/
.idea/
cc-test-reporter
test/e2e/**/*.test.js
24 changes: 3 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
sudo: false
language: node_js
node_js:
# - "10"
# - "8"
- "6"
- "10"
- "8"
install:
- yarn
script:
- yarn coverage

env:
global:
- CC_TEST_REPORTER_ID=8277f64d4123c1ec9bafeb8c2db8a72403277f27a1419f944d013951318db00e

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
- export PATH=$HOME/.yarn/bin:$PATH

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

cache: yarn
- yarn e2e
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Change Log

This project adheres to [Semantic Versioning](http://semver.org/).

## 1.1.0

- Update babel to latest version
- Update dependencies

## 1.0.0

- Init version
77 changes: 38 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ A [clean-css](https://github.com/jakubpawlowicz/clean-css) loader for [webpack](

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

## Install

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

if (production) {
cssUseList.push("clean-css-loader");
// or with options
cssUseList.push({
loader: "clean-css-loader",
options: {
compatibility: "ie9",
level: 2,
inline: ["remote"]
}
});
cssUseList.push("clean-css-loader");
// or with options
cssUseList.push({
loader: "clean-css-loader",
options: {
compatibility: "ie9",
level: 2,
inline: ["remote"]
}
});
}

module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: cssUseList
}
]
}
module: {
rules: [
{
test: /\.css$/,
use: cssUseList
}
]
}
};
```

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

```js
module.exports = {
module: {
loaders: [
{
test: /\.css$/,
loader: "css!clean-css"
},
{
test: /\.styl$/,
loader: "css!clean-css!stylus?reslve url"
}
//...
],
// Example Set options (Key "clean-css" or cleancss or CleanCSS):
"clean-css": {
debug: true,
mediaMerging: true
}
}
module: {
loaders: [
{
test: /\.css$/,
loader: "css!clean-css"
},
{
test: /\.styl$/,
loader: "css!clean-css!stylus?reslve url"
}
//...
],
// Example Set options (Key "clean-css" or cleancss or CleanCSS):
"clean-css": {
debug: true,
mediaMerging: true
}
}
};
```
33 changes: 9 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
image: Visual Studio 2017
init:
- git config --global core.autocrlf input

os: Visual Studio 2017
platform: x64
environment:
matrix:
# - nodejs_version: 10
# - nodejs_version: 8
- nodejs_version: 6

# Finish on first failed build
matrix:
fast_finish: true

platform:
- x64

branches:
only:
- master

# Disable Visual Studio build and deploy
build: off
deploy: off
- nodejs_version: "10"
- nodejs_version: "8"

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- ps: Install-Product node $env:nodejs_version x64
- yarn install

test_script:
- node --version
- yarn --version
- yarn test
- yarn e2e

build: off
deploy: off

cache:
- node_modules -> appveyor.yml,yarn.lock
4 changes: 0 additions & 4 deletions jest.config.js

This file was deleted.

112 changes: 57 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
{
"name": "clean-css-loader",
"version": "1.0.1",
"main": "lib/index.js",
"dependencies": {
"clean-css": "^4.1.9",
"loader-utils": "^1.1.0"
},
"peerDependencies": {
"webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
},
"scripts": {
"update-e2e": "reset ; yarn build ; yarn e2e; yarn test",
"force-clean": "rimraf ./test/e2e/webpack*/node_modules/ ./test/e2e/webpack*/tests/**/*.test.js",
"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 ../../..",
"e2e": "yarn force-clean ; yarn install-sub",
"prebuild": "rimraf ./lib",
"build": "babel src --out-dir lib",
"format": "prettier \".babelrc\" \"test/unit/*.js\" \"src/*.js\" \"./*.js\" --write",
"pretest": "yarn build",
"test": "jest",
"coverage": "rimraf ./coverage; yarn test --coverage",
"precommit": "lint-staged"
},
"description": "CleanCSS loader module for webpack",
"keywords": [
"CleanCSS",
"webpack",
"loader"
],
"repository": "https://github.com/retyui/clean-css-loader",
"author": "David <vamnemne@gmail.com>",
"license": "MIT",
"files": [
"lib"
],
"engines": {
"node": ">=6.11.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-env": "^1.6.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-config-webpack": "^1.2.5",
"eslint-plugin-prettier": "^2.6.0",
"husky": "0.14.3",
"jest": "^22.4.3",
"lint-staged": "7.0.5",
"npm-run-all": "^4.1.2",
"prettier": "1.12.1",
"rimraf": "^2.6.1"
}
"name": "clean-css-loader",
"version": "1.0.1",
"main": "lib/index.js",
"dependencies": {
"clean-css": "^4.2.1",
"loader-utils": "^1.1.0"
},
"peerDependencies": {
"webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
},
"scripts": {
"e2e": "yarn build && yarn update-e2e && yarn test",
"force-clean": "rimraf ./test/e2e/webpack*/node_modules/ ./test/e2e/webpack*/tests/**/*.test.js",
"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 ../../..",
"update-e2e": "yarn force-clean && yarn install-sub",
"prebuild": "rimraf ./lib",
"build": "babel src --out-dir lib",
"format": "prettier \".babelrc\" \"test/unit/*.js\" \"src/*.js\" \"./*.js\" --write",
"pretest": "yarn build",
"test": "jest",
"precommit": "lint-staged"
},
"description": "CleanCSS loader module for webpack",
"keywords": [
"CleanCSS",
"webpack",
"loader"
],
"repository": "https://github.com/retyui/clean-css-loader",
"author": "David <vamnemne@gmail.com>",
"license": "MIT",
"files": [
"lib"
],
"engines": {
"node": ">=6.11.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.1.0",
"@babel/preset-env": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.6.0",
"babel-plugin-add-module-exports": "^1.0.0",
"eslint": "^5.6.0",
"eslint-config-prettier": "^3.1.0",
"eslint-config-webpack": "^1.2.5",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^2.6.2",
"husky": "^1.0.0-rc.14",
"jest": "^23.6.0",
"lint-staged": "^7.3.0",
"npm-run-all": "^4.1.3",
"prettier": "^1.14.3",
"rimraf": "^2.6.1"
}
}
Loading