Coffeescript & Javascript Gulp snippets for Atom
$ cd ~/.atom/packages
$ git clone https://github.com/manolenso/atom-gulp-snippets
$ cd atom-gulp-snippets
$ apm install
$ apm link
This is for starting gulp project, 2 to 5 plugins require, CTRL+x and paste in terminal create: README.md, package.json and install Gulp plugins.
var gulp = require(gulp),
${1:plugin} = require('gulp-${2:plugin_name}'),
${3:plugin} = require('gulp-${4:plugin_name}'),
${5:plugin} = require('gulp-${6:plugin_name}'),
${7:plugin} = require('gulp-${8:plugin_name}'),
${9:plugin} = require('gulp-${10:plugin_name}');
//Ctrl-x and Paste in terminal
${11:touch README.md &&
npm init &&
npm install --save-dev gulp &&
npm install --save-dev gulp-${2:plugin_name} &&
npm install --save-dev gulp-${4:plugin_name} &&
npm install --save-dev gulp-${6:plugin_name} &&
npm install --save-dev gulp-${8:plugin_name} &&
npm install --save-dev gulp-${10:plugin_name}}
var ${1:plugin-variable} = require('gulp-${2:plugin-name}');$3
var ${1:varPath} = [
'${2:Path/to/folders/files}'$3
];
gulp.task('${1:Task}', function () {
return gulp.src('${2:Source}')
.pipe(${3:plugin}($4))$5
$6
});
gulp.task('watch', function () {
gulp.watch('$1', ['$2']);$3
});
.pipe(${1:plugin}($2))$3
gulp.task('watch', function () {
gulp.watch('${5:sources}', ['$1']);
gulp.watch('${6:sources}', ['$2']);
gulp.watch('${7:sources}', ['$3']);
gulp.watch('${8:sources}', ['$4']);
});
gulp.task('default', ['$1', '$2', '$3', '$4', 'watch']);$9
This is for starting gulp project, 2 to 5 plugins require, CTRL+x and paste in terminal create: README.md, package.json and install Gulp plugins.
var gulp = require(gulp),
${1:plugin} = require('gulp-${2:plugin_name}'),
${3:plugin} = require('gulp-${4:plugin_name}'),
${5:plugin} = require('gulp-${6:plugin_name}'),
${7:plugin} = require('gulp-${8:plugin_name}'),
${9:plugin} = require('gulp-${10:plugin_name}');
//Ctrl-x and Paste in terminal
${11:touch README.md &&
npm init &&
npm install --save-dev gulp &&
npm install --save-dev coffee-script &&
npm install --save-dev gulp-${2:plugin_name} &&
npm install --save-dev gulp-${4:plugin_name} &&
npm install --save-dev gulp-${6:plugin_name} &&
npm install --save-dev gulp-${8:plugin_name} &&
npm install --save-dev gulp-${10:plugin_name}}
${1:plugin} = require 'gulp-${2:plugin_name}'
$3
${1:varPath} = [
'${2:Path/to/folders/files}'$3
]
gulp.task '${1:name}', ->
gulp.src '${2:sources}'
.pipe ${3:plugin}($4)
$5
gulp.task 'watch', ->
gulp.watch '$1', ['$2']
$3
.pipe ${1:plugin}($2)$3
gulp.task 'watch', ->
gulp.watch '${5:sources}', ['$1']
gulp.watch '${6:sources}', ['$2']
gulp.watch '${7:sources}', ['$3']
gulp.watch '${8:sources}', ['$4']
gulp.task 'default', ['$1', '$2', '$3', '$4', 'watch']$9
MIT Licence©Laurent Remy