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

grunt-aos

v0.2.0

Published

compute md5 , add zip file for file manager.

Downloads

3

Readme

小鱼人自动打包工具

目的

通过Grunt自动化构建工具,通过注册Grunt任务实现构建完成项目的自动打包

用法

Installation

如果没有安装nodejs,下载nodejs

如果没有安装grunt,执行

$ npm install -g grunt-cli

安装环境

$ cd xy-autobuild 
$ npm install

Configure

配置gruntfile.js

$ edit Gruntfile.js

根据需求修改注册任务名,如"myelong"

// 解决方案
grunt.registerTask('myelong', ['aos']);

配置aos.js

$ edit aos.js

根据需求修改打包源目录及打包生成目录。默认的打包源目录是./public,默认的打包生成目录是./aos/output

copy: function () {
    var path="./aos";
    var aospath ="./aos/output";
    if (!fs.existsSync(path)) 
        fs.mkdirSync(path);
    aosutil.deletefolder(path);
    if (!fs.existsSync(aospath))  
        fs.mkdirSync(aospath);
    this.walk("./public","./public",aospath,this.copyfile);
},

Run

$ grunt myelong

EHudSon平台打包上传

npm install
grunt myelong
aos_replace_version=${aos_version//./-}
aos_version_path=webapp_${aos_replace_version}_TEST
webServerUploadPath=ftp://acp:'acp_scmpf123!@#'@scmpf.corp.elong.com/web/elongfe/webapp/${aos_version_path}/
cd ./aos
wput ./ $webServerUploadPath

命令的含义:

  • 1,安装package.json中配置的插件
  • 2,执行myelong自动打包任务
  • 3,取出在“Build with Parameters”菜单中配置好的版本号,将‘.’分隔符替换为‘-’,如‘1.0.0.1’被替换为‘1-0-0-1’
  • 4,配置版本节点路径
  • 5,配置包上传路径
  • 6,切换到aos目录(即打包的结果目录,修改目录参见‘配置aos.js’)
  • 7,上传到配置好的上传目录

grunt-aos

用于计算静态资源md5值及生成文件包的grunt自动化插件。

Getting Started

需要环境: Grunt ~0.4.1

如果你没有用过 Grunt , 可以先看一下 新手入门 指南, 里面有讲解怎么创建一个 Gruntfile 和如何使用grunt插件.

顺路推荐 : 中文版的grunt社区

安装插件:

npm install grunt-aos --save-dev

安装完插件后要在gruntfile里面加上这句代码,载入这个插件:

grunt.loadNpmTasks('grunt-aos');

示例

基本

module.exports = function(grunt){

    grunt.initConfig({
        aos: {
            template: {
                src: './tpl/**/*.html',
                dest: './dist/template.js',
                options: {
                    combo: true
                } 
            }
        }
    });


    grunt.loadNpmTasks('grunt-aos');

    grunt.registerTask('default', ['aos']);

};