-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sean King
committed
Jul 4, 2015
0 parents
commit 30ae405
Showing
11 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"mocha": true | ||
}, | ||
|
||
"rules": { | ||
// Possible errors | ||
"no-cond-assign": 0, | ||
"no-console": 0, | ||
"no-extra-parens": 2, | ||
|
||
// Best practices | ||
"block-scoped-var": 2, | ||
"eqeqeq": [2, "smart"], | ||
"no-else-return": 2, | ||
"no-floating-decimal": 2, | ||
"wrap-iife": [2, "inside"], | ||
|
||
// Variables | ||
"no-use-before-define": 1, | ||
|
||
// Stylistic issues | ||
"brace-style": 2, | ||
"camelcase": 2, | ||
"new-cap": 2, | ||
"no-lonely-if": 2, | ||
"no-underscore-dangle": 2, | ||
"space-after-keywords": 2, | ||
"space-in-brackets": 0, | ||
"space-infix-ops": 2, | ||
"one-var": 2, | ||
"quotes": [2, "single"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.gitignore | ||
|
||
node_modules/ | ||
|
||
test/ | ||
.travis.yml | ||
|
||
gulpfile.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- iojs | ||
- "0.12" | ||
- "0.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# postcss-normalize | ||
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] | ||
|
||
[PostCSS] plugin that that automatically applies normalize.css | ||
|
||
```css | ||
.foo { | ||
color: #fff; | ||
} | ||
``` | ||
|
||
```css | ||
|
||
/* Normalize styles here */ | ||
|
||
.foo { | ||
color: #fff; | ||
} | ||
``` | ||
|
||
-- | ||
|
||
### Usage | ||
|
||
```js | ||
postcss([ require('postcss-normalize') ]) | ||
``` | ||
|
||
See [PostCSS] docs for examples for your environment. | ||
|
||
-- | ||
|
||
### License | ||
|
||
MIT © [Sean King](https://twitter.com/seaneking) | ||
|
||
[npm-image]: https://badge.fury.io/js/postcss-normalize.svg | ||
[npm-url]: https://npmjs.org/package/postcss-normalize | ||
[travis-image]: https://travis-ci.org/seaneking/postcss-normalize.svg?branch=master | ||
[travis-url]: https://travis-ci.org/seaneking/postcss-normalize | ||
[daviddm-image]: https://david-dm.org/seaneking/postcss-normalize.svg?theme=shields.io | ||
[daviddm-url]: https://david-dm.org/seaneking/postcss-normalize | ||
[PostCSS]: https://github.com/postcss/postcss | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
eslint = require('gulp-eslint'), | ||
mocha = require('gulp-mocha'); | ||
|
||
gulp.task('lint', function () { | ||
return gulp.src(['index.js', 'test/*.js', 'gulpfile.js']) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failAfterError()); | ||
}); | ||
|
||
gulp.task('test', function () { | ||
return gulp.src('test/*.js', { read: false }).pipe(mocha({reporter: 'nyan'})); | ||
}); | ||
|
||
gulp.task('watch', function() { | ||
gulp.watch('**/*.js', ['check'] ); | ||
}); | ||
|
||
gulp.task('check', ['lint', 'test']); | ||
gulp.task('default', ['check', 'watch']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
var postcss = require('postcss'), | ||
fs = require('fs'), | ||
path = require('path'); | ||
|
||
module.exports = postcss.plugin('postcss-normalize', function () { | ||
return function(css) { | ||
|
||
var normalize = fs.readFileSync(path.join(__dirname, 'node_modules/normalize.css/normalize.css'), 'utf8'); | ||
|
||
css.prepend(normalize); | ||
|
||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "postcss-normalize", | ||
"version": "0.1.0", | ||
"description": "PostCSS plugin that automatically applies normalize.css", | ||
"keywords": [ | ||
"postcss", | ||
"css", | ||
"postcss-plugin", | ||
"normalize" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/seaneking/postcss-normalize.git" | ||
}, | ||
"author": "Sean King <sean@simpla.io>", | ||
"maintainers": [ | ||
{ | ||
"name": "Sean King", | ||
"email": "sean@simpla.io", | ||
"web": "http://simpla.io" | ||
} | ||
], | ||
"bugs": { | ||
"url": "https://github.com/seaneking/postcss-normalize/issues" | ||
}, | ||
"homepage": "https://github.com/seaneking/postcss-normalize", | ||
"dependencies": { | ||
"normalize.css": "^3.0.3", | ||
"postcss": "^4.1.9" | ||
}, | ||
"devDependencies": { | ||
"gulp-eslint": "^0.12.0", | ||
"gulp-mocha": "^2.0.1", | ||
"chai": "^2.3.0", | ||
"gulp": "^3.8.11" | ||
}, | ||
"scripts": { | ||
"test": "gulp check" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.foo { | ||
color: #fff; | ||
} |
Oops, something went wrong.