This file contains 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
@maxlg: ~"(max-width: 1199px)"; | |
@maxmd: ~"(max-width: 991px)"; | |
@maxsm: ~"(max-width: 767px)"; | |
@maxxs: ~"(max-width: 320px)"; | |
@minlg: ~"(min-width: 1200px)"; | |
@minmd: ~"(min-width: 992px)"; | |
@minsm: ~"(min-width: 768px)"; | |
@mdtolg: ~"(min-width: 992px) and (max-width: 1199px)"; | |
@smtomd: ~"(min-width: 768px) and (max-width: 991px)"; | |
@smtolg: ~"(min-width: 768px) and (max-width: 1199px)"; |
This file contains 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
zip = require('gulp-zip'), | |
chmod = require('gulp-chmod'), | |
//zip compress files | |
gulp.task('zip', function() { | |
return gulp.src(['./{app,dist}/**/*', './gulpfile.js', './package.json']) | |
.pipe(chmod(0o755, 0o40755)) //fix permission on unix | |
.pipe(zip('Archive.zip')) | |
.pipe(gulp.dest('./')) | |
}); |
This file contains 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
//&:after{ | |
.cfix() { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
//} |
This file contains 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
ul>li*>a[href=$#.html]>{$#} |
This file contains 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
//install | |
//npm i gulp-if gulp-notify gulp-plumber gulp-util | |
var gulpif = require('gulp-if'); | |
var notify = require('gulp-notify'); | |
var plumber = require('gulp-plumber'); | |
var gutil = require('gulp-util'); | |
//report error | |
var reportError = function(error) { | |
var report = '\n'; |
This file contains 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
// install | |
// npm i gulp-concat gulp-uglify | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
// concat and clean js | |
gulp.task('compress:js', function () { | |
var jsjq = './app/js/jquery.min.js'; | |
var jscore = './app/js/core.js'; | |
var jsplug = './app/js/plugins.js'; |
This file contains 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
// install | |
// npm i gulp-htmlmin gulp-replace | |
var htmlmin = require('gulp-htmlmin'); | |
var replace = require('gulp-replace'); | |
//compress html | |
gulp.task('htmlmin', function() { | |
return gulp.src('app/**/*.html') | |
.pipe(htmlmin({ | |
//Extrem compression// |
This file contains 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
//install | |
//npm i gulp-inject group-array@0.3.1 | |
var inject = require('gulp-inject'); | |
//inject html | |
gulp.task('inject:html', function() { | |
return gulp.src('./app/*.html') | |
.pipe(inject(gulp.src(['./app/template/*.html']), { | |
starttag: '<!-- inject:{{path}} -->', | |
relative: false, //if true inject:/app/template/menu.html, if false inject:template/menu.html |
This file contains 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
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4.0[678] no-gzip | |
BrowserMatch bMSIE !no-gzip !gzip-only-text/html | |
FileETag MTime Size | |
<ifmodule mod_expires.c> | |
<filesmatch ".(jpg|gif|png|css|js|swf|svg|woff|woff2|ttf|eot)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 7 day" | |
</filesmatch> |
This file contains 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": "new project", | |
"version": "0.0.0", | |
"description": "new project", | |
"main": "gulpfile.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Loy Egor <loyegor@gmail.com> (http://loyegor.com/)", | |
"license": "ISC", |
OlderNewer