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-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f | |
// node node_modules/jpegtran-bin/lib/install.js | |
// node node_modules/gifsicle/lib/install.js | |
// node node_modules/zopflipng-bin/lib/install.js | |
// node node_modules/mozjpeg/lib/install.js | |
// node node_modules/giflossy/lib/install.js | |
// node node_modules/pngquant-bin/lib/install.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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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-autoprefixer browser-sync gulp-cache gulp-clean-css gulp-concat del gulp gulp-if gulp-util gulp-htmlmin gulp-imagemin imagemin-giflossy imagemin-mozjpeg imagemin-pngquant imagemin-zopfli gulp-less gulp-notify gulp-plumber gulp-replace gulp-sourcemaps gulp-uglify -f | |
// node node_modules/jpegtran-bin/lib/install.js | |
// node node_modules/gifsicle/lib/install.js | |
// node node_modules/zopflipng-bin/lib/install.js | |
// node node_modules/mozjpeg/lib/install.js | |
// node node_modules/giflossy/lib/install.js | |
// node node_modules/pngquant-bin/lib/install.js | |
var autoprefixer = require('gulp-autoprefixer'); |
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 libs js | |
gulp.task('inject:js', function() { | |
return gulp.src('./app/*.html') | |
.pipe(inject(gulp.src('./app/js/libs.min.js', { //inject more than one js in capturedbyanastasiia | |
read: false //just inject no read | |
}), { |
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 cssinlining | |
gulp.task('inject:cssinlining', function() { | |
return gulp.src('./app/*.html') | |
.pipe(inject(gulp.src('app/css/header.min.css'), { | |
starttag: '<!-- inject:cssinlining -->', | |
transform: function(filePath, file) { |
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
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || | |
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|k |
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 | |
// cd node_modules \ | |
// chmod -R a+rwX . | |
// run without sudo | |
// npm i gulp-responsive --unsafe-perm | |
// npm i del gulp psd2png color | |
// npm i gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f |
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-clean-css gulp-uncss | |
var concat = require('gulp-concat'); | |
var cleanCSS = require('gulp-clean-css'); | |
var uncss = require('gulp-uncss'); | |
// concat, clean and remove unused css | |
gulp.task('compress:css', function() { | |
var cssreset = './app/css/reset.css'; | |
var cssplug = './app/css/plugins.css'; |
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
// check transitions end | |
function whichTransitionEvent() { | |
var t, | |
el = document.createElement("fakeelement"); | |
var transitions = { | |
"transition": "transitionend", | |
"OTransition": "oTransitionEnd", | |
"MozTransition": "transitionend", | |
"WebkitTransition": "webkitTransitionEnd" |
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
// npm i gulp-real-favicon | |
var realFavicon = require('gulp-real-favicon'); | |
var fs = require('fs'); | |
// File where the favicon markups are stored | |
var FAVICON_DATA_FILE = 'faviconData.json'; | |
// Generate the icons. | |
gulp.task('generate-favicon', function(done) { |
NewerOlder