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