Skip to content
Merged
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
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
"SwitchCase": 1
}
],
"comma-style": [
2,
"first"
],
"comma-style": 2,
"max-len": [
2,
{
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
npm-debug.log
.DS_Store
.nyc_output/
coverage/
24 changes: 24 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*.log
*.pid
*.seed
.editorconfig
.eslintrc*
.eslintignore
.gitignore
.grunt
.lock-wscript
.node_repl_history
.stylelintrc*
.travis.yml
.vscode
.nyc_output
appveyor.yml
coverage
gulpfile.js
lib-cov
logs
node_modules
npm-debug.log*
pids
test
test.js
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_js:
- stable
- 6
- 4
after_success:
- "npm run coveralls"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# gulp-postcss [![Build Status](https://api.travis-ci.org/postcss/gulp-postcss.png)](https://travis-ci.org/postcss/gulp-postcss)
# gulp-postcss

[![Build Status](https://img.shields.io/travis/postcss/gulp-postcss.png)](https://travis-ci.org/postcss/gulp-postcss)
[![Coverage Status](https://img.shields.io/coveralls/postcss/gulp-postcss.png)](https://coveralls.io/r/postcss/gulp-postcss)

[PostCSS](https://github.com/postcss/postcss) gulp plugin to pipe CSS through
several plugins, but parse CSS only once.
Expand Down
15 changes: 8 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ module.exports = withConfigLoader(function (loadConfig) {
: {}

var options = {
from: file.path
, to: file.path
from: file.path,
to: file.path,
// Generate a separate source map for gulp-sourcemaps
, map: file.sourceMap ? { annotation: false } : false
map: file.sourceMap ? { annotation: false } : false
}

loadConfig(file)
Expand Down Expand Up @@ -104,8 +104,8 @@ function withConfigLoader(cb) {
if (Array.isArray(plugins)) {
return cb(function () {
return Promise.resolve({
plugins: plugins
, options: options
plugins: plugins,
options: options
})
})
} else if (typeof plugins === 'function') {
Expand All @@ -127,8 +127,9 @@ function withConfigLoader(cb) {
configPath = file.dirname
}
return postcssLoadConfig(
{ file: file
, options: contextOptions
{
file: file,
options: contextOptions
},
configPath
)
Expand Down
31 changes: 23 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{
"name": "gulp-postcss",
"nyc": {
"lines": 100,
"statements": 100,
"functions": 100,
"branches": 100,
"reporter": [
"lcov",
"text"
],
"cache": true,
"all": true,
"check-coverage": true
},
"version": "7.0.0",
"description": "PostCSS gulp plugin",
"main": "index.js",
"scripts": {
"pretest": "eslint index.js",
"test": "mocha test.js"
"coveralls": "coveralls < coverage/lcov.info",
"pretest": "eslint *.js",
"test": "nyc mocha test.js"
},
"repository": {
"type": "git",
Expand All @@ -30,11 +44,12 @@
"vinyl-sourcemaps-apply": "^0.2.1"
},
"devDependencies": {
"eslint": "^3.19.0",
"coveralls": "^2.13.1",
"eslint": "^4.1.1",
"gulp-sourcemaps": "^2.6.0",
"mocha": "^3.3.0",
"proxyquire": "^1.7.11",
"sinon": "^2.2.0"
},
"files": []
"mocha": "^3.4.2",
"nyc": "^11.0.3",
"proxyquire": "^1.8.0",
"sinon": "^2.3.5"
}
}
Loading