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-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
// 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
@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
@fdir: '../fonts/'; | |
@ff-name: 'CirceRoundedAlt'; | |
@rg: '@{ff-name}-Regular1'; | |
@bd: '@{ff-name}-Regular2'; | |
.ff(@ff) { | |
font-family: e(replace(@ff, @ff-name, "cust-ff")), Arial, Helvetica Neue, Helvetica, sans-serif; | |
} | |
.ff-mix(@ff) { |
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
// 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) { |
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-bump gulp-git run-sequence | |
var bump = require('gulp-bump'); | |
var git = require('gulp-git'); | |
var runSequence = require('run-sequence'); | |
var fs = require('fs'); | |
// get project files | |
var allgit = ['./app/**/*', './gulpfile.js', './package.json', './faviconData.json']; | |
// get project version | |
// get project version |
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-inject [email protected] | |
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 |
OlderNewer