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

sk2-gulp-cli

v1.0.6

Published

[PROJECT HOME](https://gitee.com/caiyue823/sk2-gulp-cli) ## Intro A workflow cli with built-in gulp-cli & gulpfile & flexible config

Downloads

1

Readme

sk2-gulp-cli

PROJECT HOME

Intro

A workflow cli with built-in gulp-cli & gulpfile & flexible config

Code Structure

└── sk2-gulp-cli ······project root
   ├─ bin ·············the cli runner for node
   │  ├─ index.js ·····the "bin" entry in package.json
   ├─ lib ·············the gulp relative files dir
   │  ├─ cmdPromise.js ····wrap node-cmd.run function into Promise style function exec
   │  ├─ config.js ····gulpfile build config, mainly for folder config
   │  ├─ data.js ······page display data config
   │  ├─ gulpfile.js ··the core gulpfile
   │  ├─ index.js ·····just simply export the gulpfile, also the "main" entry in package.json
   ├─ .eslintrc.js ····the default eslint config, can be override by project eslint config 
   ├─ .gitignore ······git ignore file
   ├─ .npmrc ··········mirror download links for npm libs
   ├─ LICENSE ········license file
   ├─ lint.yml ········not used currently
   ├─ package.json ····package config file
   ├─ project.config.js ····the project default config sample
   ├─ README.md ·······repo readme
   

Manual

###Install

  1. npm install sk2-gulp-cli -D or yarn add sk2-gulp-cli -D
  2. sk2-gulp-cli taskName, check below for available tasks usage.

###CMD

sk2-gulp-cli lint

Lint the styles & scripts files.

sk2-gulp-cli compile

Compile the styles & scripts & pages file.

sk2-gulp-cli serve

Runs the app in development mode with a automated server.

options

  • open: Open browser on start, Default: false
  • port: Specify server port, Default: 2080

sk2-gulp-cli build

Builds the app for production to the dist folder. It minify source in production mode for the best performance.

options

  • production: Production mode flag, Default: false
  • prod: Alias to production

sk2-gulp-cli start

Running projects in production mode to view the actual result. Alias for sk2-gulp-cli serve --prod. In this mode, the file watch is disabled. If you want to watch the file changes, please use sk2-gulp-cli serve instead.

options

  • open: Open browser on start, Default: false
  • port: Specify server port, Default: 2080

sk2-gulp-cli deploy

Deploy the dist folder to git.

options

  • branch: The name of the branch you'll be pushing to, Default: 'gh-pages'

sk2-gulp-cli clean

Clean the dist & temp files.

Config

You can overwrite config with a project.config.js in your project root dir. A default config sample is like below. project.config.js is also available in the cli root dir for your convenience.

module.exports = {
  data: {
    menus: [
      {
        name: 'Home',
        icon: 'aperture',
        link: 'index.html'
      },
      {
        name: 'Features',
        link: 'features.html'
      },
      {
        name: 'About',
        link: 'about.html'
      },
      {
        name: 'Contact',
        link: '#',
        children: [
          {
            name: 'Twitter',
            link: 'https://twitter.com/w_zce'
          },
          {
            name: 'About',
            link: 'https://weibo.com/zceme'
          },
          {
            name: 'divider'
          },
          {
            name: 'About',
            link: 'https://github.com/zce'
          }
        ]
      }
    ],
    pkg: require('./package.json'),
    date: new Date(),
  },
  config: {
    SRC: 'src',
    DIST: 'dist',
    TEMP: '.tmp',
    PUBLIC: 'public',
    PATHS: {
      style: 'assets/styles/*.scss',
      script: 'assets/scripts/*.js',
      page: '*.html',
      image: 'assets/images/**',
      font: 'assets/fonts/**',
    }
  }
}