Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

csf-gulp-build

a1burning1ISC1.1.0

[![NPM Downloads][downloads-image]][downloads-url] [![NPM Version][version-image]][version-url] [![License][license-image]][license-url] [![Dependency Status][dependency-image]][dependency-url] [![devDependency Status][devdependency-image]][devdependency-

readme

csf-gulp-build

If you have multiple projects that use the gulp plugins, this plugin can help you build multiple automated build projects

It can compile ES6, less and sass, compile templates, compress images and SVG, and compress JS, CSS and HTML code

install

$ cnpm install csf-gulp-build
# I wish you can install with cnpm,because gulp-imagemin cannot use with npm install
$ npm install csf-gulp-build

Usage

  1. You need pages.config.js to set some config
    //pages.config.js
    module.exports = {
    // build config. It can be ignored ~
    build: {
     // Input directory
     src: 'src',
     // Output directory
     dist: 'release',
     // Temporary directory
     temp: '.tmp',
     // Public directory
     public: 'public',
     // Files path
     paths: {
       styles: 'assets/styles/*.scss',
       lessStyles: 'assets/styles/*.less',
       scripts: 'assets/scripts/*.js',
       pages: '**/*.html',
       images: 'assets/images/**',
       fonts: 'assets/fonts/**'
     }
    },
    develop: {
     // Server port:default 3000
     port: '2080'
    }
    data: {
     // Any variable you can write~
    }
    }
  2. The command line terminal supports the following commands
# you can clean Output directory and Temporary directory
csf-gulp-build clean
# You can do it in a production environment
csf-gulp-build build
# You can do it in a development environment
csf-gulp-build serve