Last active
September 21, 2017 08:38
-
-
Save 3Easy/0494319a7ac82c67daa6dee89a79d5cb to your computer and use it in GitHub Desktop.
NPM Bower Gulp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "3easy", | |
"description": "", | |
"main": "index.js", | |
"authors": [ | |
"3Easy <[email protected]>" | |
], | |
"license": "MIT", | |
"homepage": "3easy.org", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"test", | |
"tests" | |
], | |
"dependencies": { | |
"bourbon": "^4.3.4", | |
"vdub": "^0.0.2", | |
"neat": "^2.1.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var util = require('gulp-util'); | |
var sass = require('gulp-sass'); | |
var nano = require('gulp-cssnano'); | |
var conc = require('gulp-concat'); | |
var ugli = require('gulp-uglify'); | |
var maps = require('gulp-sourcemaps'); | |
var ntfy = require('gulp-notify'); | |
// var filter = require('gulp-filter'); | |
// Hello | |
gulp.task('hello', function() { | |
return util.log('Hello 3Easy!') | |
}); | |
// Default | |
gulp.task('default', function(){ | |
return util.log('Gulp!') | |
}); | |
// CSS | |
gulp.task('sass', function(){ | |
return gulp | |
.src('scss/**/*.scss') | |
.pipe(maps.init()) | |
.pipe(sass()) | |
.pipe(nano()) | |
.pipe(maps.write('./maps')) | |
.pipe(gulp.dest('html/css')) | |
.pipe(ntfy("Gulp Sass Notify!")) | |
}); | |
// JavaScript | |
var jsFiles = [ | |
'bower_components/jquery/dist/jquery.js', | |
'bower_components/instafeed.js/instafeed.js', | |
'bower_components/slick-carousel/slick/slick.js', | |
'javascript/behaviour.js' | |
]; | |
gulp.task('js', function(){ | |
return gulp | |
.src(jsFiles) | |
.pipe(maps.init()) | |
.pipe(conc('behaviour.js')) | |
.pipe(ugli()) | |
.pipe(maps.write('./maps')) | |
.pipe(gulp.dest('html/js')) | |
.pipe(ntfy("Gulp JS Notify!")) | |
}); | |
// Watch | |
gulp.task('watch', function(){ | |
gulp.watch('scss/**/*.scss', ['sass']); | |
gulp.watch('javascript/**/*.js', ['js']); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "3easy", | |
"description": "", | |
"main": "index.js", | |
"author": "3Easy <[email protected]>", | |
"license": "MIT", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"devDependencies": { | |
"gulp": "^3.9.1", | |
"gulp-concat": "^2.6.1", | |
"gulp-cssnano": "^2.1.2", | |
"gulp-notify": "^3.0.0", | |
"gulp-sass": "^3.1.0", | |
"gulp-sourcemaps": "^2.4.1", | |
"gulp-uglify": "^2.0.1", | |
"gulp-util": "^3.0.8" | |
}, | |
"dependencies": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment