Skip to content
This repository has been archived by the owner on Mar 3, 2019. It is now read-only.
/ basicTasks Public archive

A collection of gulp-tasks used in personal projects.

License

Notifications You must be signed in to change notification settings

electerious/basicTasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A collection of gulp-tasks used in personal projects.

Resources

License

Stars

Watchers

Forks

Packages