Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Locally runnable #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/bower_components
/node_modules
/public
20 changes: 18 additions & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')(),
mainBowerFiles = require('main-bower-files'),
opn = require('opn'),
del = require('del');


@@ -44,8 +45,8 @@ var paths = {
},
html: {
client: {
src: ['client/modules/**/*.html'],
dest: 'public/modules/',
src: ['client/**/*.html'],
dest: 'public/',
}
},
styles: {
@@ -217,3 +218,18 @@ function scripts(paths, sort, parse) {

};
}


////// LOCAL SERVER //////

gulp.task('connect', ['build'], function() {
plugins.connect.server({
root: 'public',
livereload: true
});
});

gulp.task('open', ['connect'], function (done) {
opn('http://localhost:8080', done);
});

5 changes: 3 additions & 2 deletions index.html → client/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<html>
<head>
<title>AngularJS-ORM Demo</title>
<!-- Your choice of build system for CSS + JS -->
<script src="vendors.js"></script>
<script src="modules/townsquared.js"></script>
</head>
<body ng-app="App">
<ui-view></ui-view>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion modules/App.js → client/modules/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var module = angular.module('App', ['ui.router', 'App.Authentication', 'App.Guest']);
var module = angular.module('App', ['ui.router', 'App.Authenticated', 'App.Guest']);

module.config(function($urlRouterProvider) {

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ module.factory( 'Task', (BaseObject, $http) => {
// wraps `this.uploading` in a promise that resolves immediately if it is `null` or waits for the promise
return this.cache('creating', () => $q.when(this.uploading)
.then( () => $http.post('/api/tasks', this) ) // uploading callback
.then( response => return Object.assign(this, response.data) ) // creating callback
.then( response => Object.assign(this, response.data) ) // creating callback
.finally( () => this.creating = null ) // state cleanup (doesn't affect chaining)
);
}
@@ -32,7 +32,7 @@ module.factory( 'Task', (BaseObject, $http) => {
// wraps `this.uploading` in a promise that resolves immediately if it is `null` or waits for the promise
return this.cache('updating', () => $q.when(this.uploading)
.then( () => $http.post(`/api/tasks/${this.id}`, this) ) // uploading callback
.then( response => return Object.assign(this, response.data) ) // creating callback
.then( response => Object.assign(this, response.data) ) // creating callback
.finally( () => this.updating = null ) // state cleanup (doesn't affect chaining)
);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
"gulp-babel": "^5.1.0",
"gulp-bless": "^3.0.1",
"gulp-concat": "^2.5.2",
"gulp-connect": "^2.0.5",
"gulp-debug": "^2.0.1",
"gulp-if": "^1.2.5",
"gulp-livereload": "^3.8.0",
@@ -28,6 +29,7 @@
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.4",
"opn": "^0.1.2",
"main-bower-files": "^2.7.0"
},
"scripts": {