This file contains hidden or 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
| //Epic | |
| export default function searchUsers(action$) { | |
| return action$.ofType(ActionTypes.SEARCHED_USERS) | |
| .map(action => action.payload.query) | |
| .filter(q => !!q) | |
| .switchMap(q => | |
| Observable.timer(800) // debounce | |
| .takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS)) | |
| .mergeMap(() => Observable.merge( |
This file contains hidden or 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
| var ModelEventsMixin = { | |
| shouldComponentUpdate: () => false, | |
| componentWillMount: function () { | |
| var self = this; | |
| this.modelsToListen.forEach(function (model_name) { | |
| eventEmitter.addListener(model_name + '_model_update', self.listener); // PROBLEM if I hange listener to forceUpdate. | |
| }); | |
| }, | |
| componentWillUnmount: function () { |
This file contains hidden or 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
| co( | |
| for (var i in list) { | |
| try { | |
| yield promiseMeSomething(list[i]); | |
| } catch (err) { | |
| console.log(err.message); | |
| } | |
| })() |
This file contains hidden or 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
| function traceurPromise() { | |
| console.log('STARTING TRACEUR '); | |
| return new Promise(function (resolve, reject) { | |
| gulp.src(es6files) | |
| .pipe(traceur(traceurOpts)) | |
| .pipe(gulp.dest(distDirectory)) | |
| .on('end', function () { | |
| console.log('ENDED TRACEUR '); | |
| resolve(); | |
| }); |
This file contains hidden or 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
| /* | |
| * FILES | |
| * */ | |
| var unitTestFiles = 'dist/**/**.spec.js', | |
| integrationTestFiles = 'dist/**/**.integSpec.js', | |
| distJsFiles = 'dist/**/*.js', | |
| es6files = 'es6/**/*.js'; | |
| /* | |
| * Directories |
This file contains hidden or 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
| gulp.task('watch-prod', ['templates', 'js-prod', 'sass'], function () { | |
| livereload.listen(); | |
| gulp.watch('js/**/*.html', ['templates']); | |
| gulp.watch(['js/**/*.js', 'dist/templates.js'], ['js-prod']); | |
| gulp.watch('**/*.scss', ['sass']); | |
| gulp.watch(['dist/**']).on('change', livereload.changed); | |
| }); |
This file contains hidden or 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
| var gulp = require('gulp'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglify'), | |
| rename = require("gulp-rename"), | |
| ngAnnotate = require('gulp-ng-annotate'), | |
| sourcemaps = require('gulp-sourcemaps'), | |
| livereload = require('gulp-livereload'), | |
| templateCache = require('gulp-angular-templatecache'), | |
| compass = require('gulp-compass'); |