So many updates :/
This commit is contained in:
parent
b98abff03f
commit
6d9a0714d5
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
||||
node_modules
|
||||
.sass-cache
|
||||
*.sublime-workspace
|
||||
.DS_Store
|
||||
._*
|
||||
|
@ -2,14 +2,11 @@
|
||||
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
|
||||
<cross-domain-policy>
|
||||
|
||||
|
||||
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
|
||||
|
||||
<!-- Most restrictive policy: -->
|
||||
<site-control permitted-cross-domain-policies="none"/>
|
||||
|
||||
|
||||
|
||||
<!-- Least restrictive policy: -->
|
||||
<!--
|
||||
<site-control permitted-cross-domain-policies="all"/>
|
||||
|
88
gulpfile.js
88
gulpfile.js
@ -1,25 +1,25 @@
|
||||
// Require all those npm-modules
|
||||
|
||||
var gulp = require('gulp'),
|
||||
sass = require('gulp-sass'),
|
||||
autoprefixer = require('gulp-autoprefixer'),
|
||||
cssmin = require('gulp-cssmin'),
|
||||
jshint = require('gulp-jshint'),
|
||||
uglify = require('gulp-uglify'),
|
||||
imagemin = require('gulp-imagemin'),
|
||||
pngcrush = require('imagemin-pngcrush'),
|
||||
rename = require('gulp-rename'),
|
||||
clean = require('gulp-rimraf'),
|
||||
concat = require('gulp-concat'),
|
||||
notify = require('gulp-notify'),
|
||||
cache = require('gulp-cache'),
|
||||
livereload = require('gulp-livereload');
|
||||
var gulp = require('gulp'),
|
||||
sass = require('gulp-sass'),
|
||||
autoprefixer = require('gulp-autoprefixer'),
|
||||
cssmin = require('gulp-cssmin'),
|
||||
jshint = require('gulp-jshint'),
|
||||
uglify = require('gulp-uglify'),
|
||||
imagemin = require('gulp-imagemin'),
|
||||
pngcrush = require('imagemin-pngcrush'),
|
||||
rename = require('gulp-rename'),
|
||||
clean = require('gulp-rimraf'),
|
||||
concat = require('gulp-concat'),
|
||||
notify = require('gulp-notify'),
|
||||
cache = require('gulp-cache'),
|
||||
livereload = require('gulp-livereload');
|
||||
|
||||
// render scss
|
||||
gulp.task('styles', function() {
|
||||
gulp.src('./src/scss/main.scss')
|
||||
.pipe(sass({ style: 'expanded' }))
|
||||
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
|
||||
.pipe(autoprefixer('last 2 version', 'IE 9', 'safari 5', 'Firefox ESR', 'opera 12.1', 'ios 6', 'android 4', 'BlackBerry 10',))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(cssmin())
|
||||
@ -52,6 +52,7 @@ gulp.task('scripts', function() {
|
||||
.pipe(notify({ message: 'Scripts task complete' }));
|
||||
});
|
||||
|
||||
// watch it while working
|
||||
gulp.task('watch', function() {
|
||||
// Watch .scss files
|
||||
gulp.watch('src/scss/**/*.scss', ['styles']);
|
||||
@ -63,62 +64,7 @@ gulp.task('watch', function() {
|
||||
gulp.watch('src/img/**/*', ['images']);
|
||||
});
|
||||
|
||||
// default:
|
||||
// default: all of them! \o/
|
||||
gulp.task('default', ['clean'], function() {
|
||||
gulp.start('styles', 'scripts', 'images');
|
||||
});
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//
|
||||
// OLD STUFF
|
||||
// ----------------------
|
||||
// sass + watch
|
||||
gulp.task('sass', function() {
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(watch())
|
||||
.pipe(sass())
|
||||
.pipe(prefix("last 2 versions", "ie 9"))
|
||||
.pipe(cssmin())
|
||||
.pipe(rename({suffix: ".min"}))
|
||||
.pipe(gulp.dest('./css'))
|
||||
});
|
||||
|
||||
// image
|
||||
gulp.task('img', function() {
|
||||
gulp.src('src/img/*')
|
||||
.pipe(imagemin({
|
||||
progressive: true,
|
||||
svgoPlugins: [{removeViewBox: false}],
|
||||
use: [pngcrush()]
|
||||
}))
|
||||
.pipe(gulp.dest('./img/'))
|
||||
});
|
||||
|
||||
// finalize
|
||||
gulp.task('final', function() {
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(sass())
|
||||
.pipe(prefix("last 2 versions", "ie 9"))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(rename({suffix: ".min"}))
|
||||
.pipe(cssmin())
|
||||
.pipe(gulp.dest('./css'))
|
||||
gulp.src('src/img/*')
|
||||
.pipe(imagemin({
|
||||
progressive: true,
|
||||
svgoPlugins: [{removeViewBox: false}],
|
||||
use: [pngcrush()]
|
||||
}))
|
||||
.pipe(gulp.dest('./img/'))
|
||||
});
|
||||
|
||||
// JS hint task
|
||||
gulp.task('jshint', function() {
|
||||
gulp.src('./scripts/*.js')
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
});
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user