1.0.0 • Published 7 years ago

gulp-task-store v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

API

rollup_task

  • Parameters:

    src : String, filepath

    dest : String, filepath

    moduleName : String, default to be the file name

    babel_opts: Object, optional, if you pass your own babel settings, you should install related plugins . Default plugins: babel-core、babel-plugin-external-helpers、babel-preset-es2015、babel-preset-stage-0

  • e.g.

var tasks = require('gulp-tasks');

gulp.task('rollup', function(){
  tasks.rollup_task({
    src: 'src/index.js',
    dest: 'dist/index.bundle.js',
    moduleName: 'myModule'
  });
});

postcss_task

gulp.task('postcss', function(){
  tasks.postcss_task({
    src: 'src/css/index.scss',
    dest: 'dist/css/index.css',
    cssnext: true,
    precss: true,
    pxtorem: true,
    pxtorem_opts: {
      rootValue: 75,  //如果以750宽度视觉稿
  	  propWhiteList: []  //需要转换为rem的属性, []全部属性都转换
    }
  });
});

use cssnext、precss、pxtorem

clean_task

tasks.clean_task({
  src: <filepath>
});

jsmin_task

tasks.jsmin_task({
  src: <filepath>,
  dest: <filepath>
});

cssmin_task

tasks.cssmin_task({
  src: <filepath>,
  dest: <filepath>
});

imgmin_task

tasks.imgmin_task({
  src: <filepath>,
  dest: <filepath>
});