npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

assemble-plugin-functions

v0.0.3

Published

Assemble的功能函数集合.

Downloads

4

Readme

assemble-plugin-functions NPM version Build Status 依赖模块状态

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.