Skip to content

Instantly share code, notes, and snippets.

View alxvallejo's full-sized avatar

Alex Vallejo alxvallejo

View GitHub Profile
class ProfileAction {
constructor{}
//action creators
syncProfile() {
this.fetchProfile()
.then(old_profile => this.fetchProfileDetailsFrom3rdParty())
.then(new_profile => this.syncProfileDetails(old_profile, new_profile))
.then(new_profile => this.dispatch(this.syncProfileSuccess(new_profile)))
if (!this.account) {
return $http
.post('/api/account/get', {})
.then((r) => {
this.account = BaseModel.parse(r);
return BaseModel.parse(r);
});
}
else {
let deferred = $q.defer();
gulp.task('dev', ['default'], function() {
gulp.src(['./www/js/app.js']) // build directory
.pipe(replace('@@ENV', 'https://dev-api-url'))
.pipe(gulp.dest('./www/js/app.js'));
});
// returns error: Error: EEXIST: file already exists, mkdir '/Users/avallejo/Sites/cpIonic/www/js/app.js'