mupat / gulp-tasks

a summary of gulp tasks, that i use over various projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#gulp-tasks

a summary of gulp tasks, that i use over various projects. Just include this repository and require it

gTasks = require 'gulp-tasks'

Defining Ports

Ports can be defined either by passing them as parameter to the functions or by passing them as commandline parameters to gulp

<gulpCMD> --port=<contentPort> --liveport=<livereload port>

Tasks

Browserify

Included modules

  • debowerify # used to simple require bower modules like npm modules
  • coffeeify # used to work with coffeescript files as well
  • browserify-global-shim # used to not include common frameworks in the bundled file

Simple Usage

gTasks.browserify.build '<src_file>', '<dest_folder', '<name of result js file> (OPTIONAL)'

Additional transform steps

gTasks.browserify.build '<src_file>', '<dest_folder', '<name of result js file>', '[{transformer: <third_party_transformer>, options: <third_party_transformer_options}, [{...}] (OPTIONAL)]'

Adding Shims

gTasks.browserify.build '<src_file>', '<dest_folder', '<name of result js file>', '[]', '{ <used_name_as_require>: <global_variable_name>}'

Jade

gTasks.jade.build '<src_file[s]>', '<dest_folder', '[<embed livereload script PORT>] (OPTIONAL)', '[<locals object passed to jade>] (OPTIONAL)'

By providing a third parameter to the jade build you defining the port to for the livereload server. So it should match with the one from livereload server!

Less

Now with usage of the autoprefix plugin. Possible options for supported browsers can be found at browserlist plugin.

gTasks.less.build '<src_file[s]>', '<dest_folder>', '[<array for supported browsers as defined by browserslist>] (OPTIONAL)'

Livereload

gTasks.server.content '<dest_folder>', <content port>
gTasks.server.livereload '<dest_folder>', <livereload port>

Misc

Copy

gTasks.misc.copy '<src_file[s]>', '<dest_folder'

Clean

gTasks.misc.clean '<folder_or_files>'

About

a summary of gulp tasks, that i use over various projects

License:MIT License


Languages

Language:CoffeeScript 100.0%