assemble-plugin-functions
v0.0.3
Published
Assemble的功能函数集合.
Downloads
4
Maintainers
Readme
assemble-plugin-functions
Assemble的功能函数集合.
Table of Contents
Quickstart
包安装:
npm install assemble-plugin-functions --save
Gruntfile.js定制:
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
assemble: {
options: {
plugins: ['assemble-plugin-functions']
},
...
}
});
grunt.loadNpmTasks('assemble');
grunt.registerTask('default', ['assemble']);
};
Options
addAttributeDate
Type: json
增加属性,类型json,选择器和值
这个是增加属性,原有属性会好留
removeAttributeDate
Type: json
移除属性,类型json,选择器和值
这个是移除属性,在原有属性上移除部分
replaceAttributeDate
Type: json
替换属性,类型json,选择器和值
这个是移除属性,在原有属性上移除部分
Usage Examples
基本用法
最基本用法:
assemble: {
blog: {
options: {
plugins: ['assemble-plugin-functions'],
},
files: {
'./blog/': ['./templates/blog/*.hbs']
}
}
}
高级
assemble: {
blog: {
options: {
plugins: ['assemble-plugin-functions'],
functions: {
removeAttributeData: {
"p": {
"pclass": " nohas"
},
"h1,h2,h3,h4": {
"id": "all"
},
"a": {
'atest1':"all"
}
},
replaceAttributeData: {
"p": {
"pclass": "hello-pclass"
},
"h1,h2,h3,h4": {
'id':"hello-id"
}
}
}
},
files: {
'./blog/': ['./templates/blog/*.hbs']
}
}
}
Author
GoldCome
- github: https://github.com/GoldCome
- blog:http://www.gdcome.com
- QQ/Email: [email protected]
Release History
- 2014-02-24 v0.0.0 功能函数插件第一次构建
- 2014-02-24 v0.0.1 readme文档错误重新发布
- 2014-03-09 v0.0.2 发布到github
- 2014-03-13 v0.0.3 修正各个细节,正式发布
License
Copyright (c) 2014 goldcome, contributors. Released under the MIT license
This file was generated on Saturday, March 15, 2014.