removed spaces
This commit is contained in:
parent
a2cd8d0605
commit
86e11424d8
|
@ -34,7 +34,7 @@
|
|||
"inject",
|
||||
"expect"
|
||||
],
|
||||
"indent": 4, // Specify indentation spacing
|
||||
"indent": 2, // Specify indentation spacing
|
||||
"devel": true, // Allow development statements e.g. `console.log();`.
|
||||
"noempty": true // Prohibit use of empty blocks.
|
||||
}
|
||||
}
|
||||
|
|
144
Gruntfile.js
144
Gruntfile.js
|
@ -1,83 +1,83 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
// Project Configuration
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
watch: {
|
||||
jade: {
|
||||
files: ['app/views/**'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
},
|
||||
js: {
|
||||
files: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**'],
|
||||
tasks: ['jshint'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
},
|
||||
html: {
|
||||
files: ['public/views/**'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
},
|
||||
css: {
|
||||
files: ['public/css/**'],
|
||||
options: {
|
||||
livereload: true
|
||||
}
|
||||
}
|
||||
// Project Configuration
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
watch: {
|
||||
jade: {
|
||||
files: ['app/views/**'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
jshint: {
|
||||
all: {
|
||||
src: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**'],
|
||||
options: {
|
||||
jshintrc: true
|
||||
}
|
||||
}
|
||||
},
|
||||
js: {
|
||||
files: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**'],
|
||||
tasks: ['jshint'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
nodemon: {
|
||||
dev: {
|
||||
options: {
|
||||
file: 'server.js',
|
||||
args: [],
|
||||
ignoredFiles: ['public/**'],
|
||||
watchedExtensions: ['js'],
|
||||
nodeArgs: ['--debug'],
|
||||
delayTime: 1,
|
||||
env: {
|
||||
PORT: 3000
|
||||
},
|
||||
cwd: __dirname
|
||||
}
|
||||
}
|
||||
},
|
||||
html: {
|
||||
files: ['public/views/**'],
|
||||
options: {
|
||||
livereload: true,
|
||||
},
|
||||
concurrent: {
|
||||
tasks: ['nodemon', 'watch'],
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
}
|
||||
},
|
||||
env: {
|
||||
test: {
|
||||
NODE_ENV: 'test'
|
||||
}
|
||||
},
|
||||
css: {
|
||||
files: ['public/css/**'],
|
||||
options: {
|
||||
livereload: true
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
all: {
|
||||
src: ['Gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**'],
|
||||
options: {
|
||||
jshintrc: true
|
||||
}
|
||||
}
|
||||
},
|
||||
nodemon: {
|
||||
dev: {
|
||||
options: {
|
||||
file: 'server.js',
|
||||
args: [],
|
||||
ignoredFiles: ['public/**'],
|
||||
watchedExtensions: ['js'],
|
||||
nodeArgs: ['--debug'],
|
||||
delayTime: 1,
|
||||
env: {
|
||||
PORT: 3000
|
||||
},
|
||||
cwd: __dirname
|
||||
}
|
||||
}
|
||||
},
|
||||
concurrent: {
|
||||
tasks: ['nodemon', 'watch'],
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
}
|
||||
},
|
||||
env: {
|
||||
test: {
|
||||
NODE_ENV: 'test'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Load NPM tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-nodemon');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
grunt.loadNpmTasks('grunt-env');
|
||||
//Load NPM tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-nodemon');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
grunt.loadNpmTasks('grunt-env');
|
||||
|
||||
//Making grunt default to force in order not to break the project.
|
||||
grunt.option('force', true);
|
||||
//Making grunt default to force in order not to break the project.
|
||||
grunt.option('force', true);
|
||||
|
||||
//Default task(s).
|
||||
grunt.registerTask('default', ['jshint', 'concurrent']);
|
||||
//Default task(s).
|
||||
grunt.registerTask('default', ['jshint', 'concurrent']);
|
||||
};
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
//Setting up route
|
||||
angular.module('mystery').config(['$routeProvider',
|
||||
function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/', {
|
||||
templateUrl: 'views/index.html'
|
||||
}).
|
||||
otherwise({
|
||||
redirectTo: '/'
|
||||
});
|
||||
}
|
||||
function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/', {
|
||||
templateUrl: 'views/index.html'
|
||||
}).
|
||||
otherwise({
|
||||
redirectTo: '/'
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
||||
//Setting HTML5 Location Mode
|
||||
angular.module('mystery').config(['$locationProvider',
|
||||
function($locationProvider) {
|
||||
$locationProvider.hashPrefix('!');
|
||||
}
|
||||
]);
|
||||
function($locationProvider) {
|
||||
$locationProvider.hashPrefix('!');
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('mystery.system').controller('HeaderController', ['$scope', 'Global', function ($scope, Global) {
|
||||
$scope.global = Global;
|
||||
$scope.global = Global;
|
||||
|
||||
$scope.menu = [{
|
||||
'title': 'Articles',
|
||||
'link': 'articles'
|
||||
}, {
|
||||
'title': 'Create New Article',
|
||||
'link': 'articles/create'
|
||||
}];
|
||||
|
||||
$scope.isCollapsed = false;
|
||||
}]);
|
||||
$scope.menu = [{
|
||||
'title': 'Articles',
|
||||
'link': 'articles'
|
||||
}, {
|
||||
'title': 'Create New Article',
|
||||
'link': 'articles/create'
|
||||
}];
|
||||
|
||||
$scope.isCollapsed = false;
|
||||
}]);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
angular.element(document).ready(function() {
|
||||
//Fixing facebook bug with redirect
|
||||
if (window.location.hash === '#_=_') window.location.hash = '#!';
|
||||
//Fixing facebook bug with redirect
|
||||
if (window.location.hash === '#_=_') window.location.hash = '#!';
|
||||
|
||||
//Then init the app
|
||||
angular.bootstrap(document, ['mystery']);
|
||||
});
|
||||
//Then init the app
|
||||
angular.bootstrap(document, ['mystery']);
|
||||
});
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
//Global service for global variables
|
||||
angular.module('mystery.system').factory('Global', [
|
||||
function() {
|
||||
var _this = this;
|
||||
_this._data = {
|
||||
user: window.user,
|
||||
authenticated: !! window.user
|
||||
};
|
||||
function() {
|
||||
var _this = this;
|
||||
_this._data = {
|
||||
user: window.user,
|
||||
authenticated: !! window.user
|
||||
};
|
||||
|
||||
return _this._data;
|
||||
}
|
||||
return _this._data;
|
||||
}
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue