@electerious/basictasks

A collection of gulp-tasks used in personal projects

Stats

StarsIssuesVersionUpdatedCreatedSize
@electerious/basictasks
405.0.33 years ago6 years agoMinified + gzip package size for @electerious/basictasks in KB

Readme

basicTasks

A collection of gulp tasks used in personal projects.

Contents

Setup

Install basicTasks using npm

npm install @electerious/basictasks

… and require it in your gulpfile.

const gulp = require('gulp')
const tasks = require('@electerious/basictasks')(gulp, 'yourModuleName')

Usage

Scripts-Task

The scripts-task will bundle a JS file as a standalone UMD module, transform it using Babel and uglify the output.

const scripts = tasks.scripts({
    from: './src/scripts/main.js',
    to: './dist'
})

gulp.task('scripts', scripts)

Styles-Task

The styles-task accepts SCSS and SASS files. It will autoprefix and minify them.

const styles = tasks.styles({
    from: './src/styles/main.scss',
    to: './dist'
})

gulp.task('styles', styles)

Specify a custom filename using the name property.

const styles = tasks.styles({
    from: './src/styles/main.scss',
    name: (path) => path.basename += '.min',
    to: './dist'
})

gulp.task('styles', styles)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.