Skip to content

Commit

Permalink
release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
voischev committed Sep 24, 2015
0 parents commit 3ba1df4
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs.
# More information at http://EditorConfig.org

# No .editorconfig files above the root directory
root = true

[*]
charset = utf-8
indent_size = 4
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true

[*.{bemjson.js,deps.js}]
indent_size = 4

[{bower,package}.json]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OS
.DS_Store
._*

# NODEJS
node_modules
npm-debug.log
26 changes: 26 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"disallowSpacesInCallExpression": true,
"disallowSpaceAfterObjectKeys": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowMultipleLineBreaks": true,
"requireSemicolons": true,
"requireFunctionDeclarations": true,
"requireCommaBeforeLineBreak": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowSpacesInFunction": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInConditionalExpression": {
"afterTest": true,
"afterConsequent": true
},
"excludeFiles": [
".git/**",
"node_modules/**"
],
"fileExtensions": [".js"]
}
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 8 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"eqeqeq": true,
"expr": true,
"maxlen": 120,
"undef": true,
"unused": true,
"node": true
}
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
test/
npm-debug.log
.editorconfig
.jscsrc
.jshintignore
.jshintrc
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# gulp-posthtml
[![npm version](https://badge.fury.io/js/gulp-posthtml.svg)](http://badge.fury.io/js/gulp-posthtml)

## Usage

```js

```
27 changes: 27 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
var posthtml = require('posthtml');
var through = require('through2');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;

// Consts
var PLUGIN_NAME = 'gulp-posthtml';

module.exports = function(plugins, options) {

if (!plugins) {
throw new PluginError(PLUGIN_NAME, 'No plugin?');
}

return through.obj(function(chunk, enc, cb) {
if (chunk.isNull()) {
// return empty file
return cb(null, chunk);
}
posthtml([].concat(plugins))
.process(String(chunk.contents), options)
.then(function(result) {
chunk.contents = new Buffer(result.html);
cb(null, chunk);
});
});
};
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "gulp-posthtml",
"version": "1.0.0",
"description": "PostHTML Gulp Plugin",
"main": "index.js",
"dependencies": {
"gulp-util": "^3.0.6",
"posthtml": "^0.2.0",
"through2": "^2.0.0"
},
"devDependencies": {
"jscs": "^1.13.1",
"jshint": "^2.8.0"
},
"scripts": {
"lint": "jshint . && jscs . -v"
},
"repository": {
"type": "git",
"url": "git+https://github.com/posthtml/gulp-posthtml.git"
},
"keywords": [
"html",
"xml",
"postproccessor",
"parser",
"transform",
"manipulation",
"plugin",
"gulp",
"gulp-posthtml",
"gulp-plugin"
],
"author": "Ivan Voischev <voischev.ivan@ya.ru>",
"license": "MIT",
"bugs": {
"url": "https://github.com/posthtml/gulp-posthtml/issues"
},
"homepage": "https://github.com/posthtml/gulp-posthtml#readme"
}

0 comments on commit 3ba1df4

Please sign in to comment.