Last active
December 12, 2015 14:35
-
-
Save Fake51/611fd3a15ae44063adc1 to your computer and use it in GitHub Desktop.
Javascript libraries
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
js libraries | |
- Promises: bluebird | |
- DOM: lodash | |
- templating: t.js/mustache | |
- charts: smoothie charts | |
- responsive: W/mediatizr/Henka | |
- Events: events.js | |
- localstorage: strg.js | |
- sessionstorage: strg.js | |
- cookies: strg.js | |
- loading/bundling: webpack | |
CSS: | |
- sass | |
- proper sass framework | |
Testing: | |
- BDD: mocha/should | |
- karma/zombiejs/phantomjs | |
Process: | |
- switch to webpack | |
- use gulp with | |
- gulp-uglify | |
- gulp-minify-css | |
- gulp-concat | |
- gulp-clean | |
- gulp-filter | |
- gulp-sass | |
- genid // generates unique ids | |
gulpfile.js: | |
var gulp = require('gulp'), | |
uglifyJs = require('gulp-uglify'), | |
minifyCss = require('gulp-minify-css'), | |
concat = require('gulp-concat'), | |
clean = require('gulp-clean'), | |
filter = require('gulp-filter'), | |
source = 'src/*.js', | |
destination = 'dist/', | |
basename = require('genid')(16); | |
gulp.task('minify-js', ['clean'], function () { | |
var file = basename + '.min.js'; | |
gulp.src(source) | |
.pipe(uglifyJs()) | |
.pipe(concat(file)) | |
.pipe(filter(file)) | |
.pipe(gulp.dest(destination)); | |
}); | |
gulp.task('clean', function () { | |
gulp.src(destination) | |
.pipe(clean()) | |
}); | |
gulp.task('update', ['minify-js'], function () { | |
console.log('Done updating'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment