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

gulp-init

v1.1.1

Published

A gulp template, The version of gulp is 4 to create an initialization template ,Support ES6,Babel,Auto Prefix and so on, Configuration of development and production environments

Downloads

17

Readme

gulp-init

A gulp4 template An init template

Installation

git clone [email protected]:AmandaYi/gulpfile.git gulp-init

Use


  • development environment npm run serve or yarn serve

  • build npm run build or yarn build

Options And About

  1. development environment By modifying the config\development.js file, you can change the configuration of the development environment

  2. production environment By modifying the config\production.js file, you can change the configuration of the development environment

  3. About Picture Processing No... Because everyone's needs are different, some need wizard maps, some need base64, so you can write a function to handle it by yourself. Demo

  4. In config\development.js or config\production.js file

let SelfConfig = {
    ...
    // You can add subObject
    ImagesOption: {

    }
    ...
}

module.exports = function (config) {
    return {
        ...
        // html
        HTMLCompile: function () {
        ...
        // You can add this Func ImagesCompile
        ImagesCompile: function () {
            
            return src( ...
            do code ...
            ......
        }
        ......
        ......
  1. step2 In config\index.js file Find func DevelopCompile or ProductionCompile
// development
function DevelopCompile(config) {
    let { HTMLCompile, CSSCompile, JSCompile, LESSCompile, SASSCompile ,BrowserSyncServer} = development(config)
    // dev 开启调试服务器 start serve
    BrowserSyncServer()
    return series(HTMLCompile, CSSCompile, JSCompile, LESSCompile, SASSCompile,
        // You can add this Func ImagesCompile
        ImagesCompile
        Core.Copy("static"), Core.Copy("assets"),
            parallel([ Core.WatchCompile([
                { Compile: HTMLCompile, Postfix: "*.html" },
                { Compile: CSSCompile, Postfix: "css/*.css" },
                { Compile: JSCompile, Postfix: "js/*.js" },
                { Compile: LESSCompile, Postfix: "css/*.less" },
                { Compile: SASSCompile, Postfix: "css/*.scss" },
                { Compile: Core.Copy("static"), Postfix: "static/**/*" },
                { Compile: Core.Copy("assets"), Postfix: "assets/**/*" },
                // If you want to watch Images, you can add a watcher, Be sure to specify the road strength of the picture
                // 如果监听图片,可以添加图片观察者, 请务必说明图片的路径
                // { Compile: ImagesCompile, Postfix: /assets\/images\/*.{png,jpg,gif,jpeg}/ },                
            ])])
        )
}
// Production
function ProductionCompile(config) {
    let { HTMLCompile, CSSCompile, JSCompile, LESSCompile, SASSCompile ,
    // You can add this Func ImagesCompile
    ImagesCompile
    } = production(config)
    return series(Core.Clean, HTMLCompile, CSSCompile, JSCompile, LESSCompile, SASSCompile,
    // Must be run this Func ImagesCompile
    ImagesCompile
    )
}

Options

By changing the parameters of the object, the environment can be easily adjusted.

The details(Options) are as follows

In config\development.js or config\production.js file You can find SelfConfig object.By changing this object, you can change the configuration of the development environment

List ( Subobjects of SelfConfig )

  1. HtmlminOptions You can Click this link: https://github.com/kangax/html-minifier#options-quick-reference

  2. CleanCssOption You can Click this link: https://github.com/jakubpawlowicz/clean-css#constructor-options

  3. LessOptions You can Click this link: http://lesscss.org/

  4. SassOptions You can Click this link: https://github.com/sass/node-sass#options

  5. JSUglifyOptions You can Click this link: https://github.com/mishoo/UglifyJS2#minify-options

  6. JSBabelOptions You can Click this link: https://babeljs.io/docs/en/options

  7. AutoprefixerOptions You can Click this link: https://www.npmjs.com/package/autoprefixer#options

...more

License


ISC License © 2019 AmandaYi