Skip to content

Commit

Permalink
Code Indentation changed to 2 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pratik60 committed Jul 16, 2014
1 parent 45617fc commit 2dea710
Show file tree
Hide file tree
Showing 72 changed files with 2,472 additions and 2,453 deletions.
4 changes: 2 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"expect",
"spyOn"
],
"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.
}
}
228 changes: 114 additions & 114 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,129 +1,129 @@
'use strict';

var paths = {
js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**'],
html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
css: ['!bower_components/**', 'packages/**/public/**/css/*.css']
js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**'],
html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
css: ['!bower_components/**', 'packages/**/public/**/css/*.css']
};

module.exports = function(grunt) {

if (process.env.NODE_ENV !== 'production') {
require('time-grunt')(grunt);
}
if (process.env.NODE_ENV !== 'production') {
require('time-grunt')(grunt);
}

// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
assets: grunt.file.readJSON('config/assets.json'),
clean: ['bower_components/build'],
watch: {
js: {
files: paths.js,
tasks: ['jshint'],
options: {
livereload: true
}
},
html: {
files: paths.html,
options: {
livereload: true,
interval: 500
}
},
css: {
files: paths.css,
tasks: ['csslint'],
options: {
livereload: true
}
}
},
jshint: {
all: {
src: paths.js,
options: {
jshintrc: true
}
}
},
uglify: {
core: {
options: {
mangle: false
},
files: '<%= assets.core.js %>'
}
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: paths.css
},
cssmin: {
core: {
files: '<%= assets.core.css %>'
}
},
nodemon: {
dev: {
script: 'server.js',
options: {
args: [],
ignore: ['node_modules/**'],
ext: 'js,html',
nodeArgs: ['--debug'],
delayTime: 1,
cwd: __dirname
}
}
},
concurrent: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
},
mochaTest: {
options: {
reporter: 'spec',
require: [
'server.js',
function() {
require('meanio/lib/util').preload(__dirname + '/packages/**/server', 'model');
}
]
},
src: ['packages/**/server/tests/**/*.js']
},
env: {
test: {
NODE_ENV: 'test'
}
// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
assets: grunt.file.readJSON('config/assets.json'),
clean: ['bower_components/build'],
watch: {
js: {
files: paths.js,
tasks: ['jshint'],
options: {
livereload: true
}
},
html: {
files: paths.html,
options: {
livereload: true,
interval: 500
}
},
css: {
files: paths.css,
tasks: ['csslint'],
options: {
livereload: true
}
}
},
jshint: {
all: {
src: paths.js,
options: {
jshintrc: true
}
}
},
uglify: {
core: {
options: {
mangle: false
},
karma: {
unit: {
configFile: 'karma.conf.js'
}
files: '<%= assets.core.js %>'
}
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
src: paths.css
},
cssmin: {
core: {
files: '<%= assets.core.css %>'
}
},
nodemon: {
dev: {
script: 'server.js',
options: {
args: [],
ignore: ['node_modules/**'],
ext: 'js,html',
nodeArgs: ['--debug'],
delayTime: 1,
cwd: __dirname
}
});
}
},
concurrent: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
},
mochaTest: {
options: {
reporter: 'spec',
require: [
'server.js',
function() {
require('meanio/lib/util').preload(__dirname + '/packages/**/server', 'model');
}
]
},
src: ['packages/**/server/tests/**/*.js']
},
env: {
test: {
NODE_ENV: 'test'
}
},
karma: {
unit: {
configFile: 'karma.conf.js'
}
}
});

//Load NPM tasks
require('load-grunt-tasks')(grunt);
//Load NPM tasks
require('load-grunt-tasks')(grunt);

//Default task(s).
if (process.env.NODE_ENV === 'production') {
grunt.registerTask('default', ['clean', 'cssmin', 'uglify', 'concurrent']);
} else {
grunt.registerTask('default', ['clean', 'jshint', 'csslint', 'concurrent']);
}
//Default task(s).
if (process.env.NODE_ENV === 'production') {
grunt.registerTask('default', ['clean', 'cssmin', 'uglify', 'concurrent']);
} else {
grunt.registerTask('default', ['clean', 'jshint', 'csslint', 'concurrent']);
}

//Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
//Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);

// For Heroku users only.
// Docs: https://github.com/linnovate/mean/wiki/Deploying-on-Heroku
grunt.registerTask('heroku:production', ['cssmin', 'uglify']);
// For Heroku users only.
// Docs: https://github.com/linnovate/mean/wiki/Deploying-on-Heroku
grunt.registerTask('heroku:production', ['cssmin', 'uglify']);
};
26 changes: 13 additions & 13 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "mean",
"version": "0.3.3",
"dependencies": {
"jquery": "1.x",
"angular": "latest",
"angular-resource": "latest",
"angular-cookies": "latest",
"angular-mocks": "latest",
"angular-route": "latest",
"bootstrap": "3.1.1",
"angular-bootstrap": "0.11.0",
"angular-ui-router": "#master"
}
"name": "mean",
"version": "0.3.3",
"dependencies": {
"jquery": "1.x",
"angular": "latest",
"angular-resource": "latest",
"angular-cookies": "latest",
"angular-mocks": "latest",
"angular-route": "latest",
"bootstrap": "3.1.1",
"angular-bootstrap": "0.11.0",
"angular-ui-router": "#master"
}
}
33 changes: 16 additions & 17 deletions config/assets.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"core": {
"css": {
"bower_components/build/css/dist.min.css": [
]
},
"js": {
"bower_components/build/js/dist.min.js": [
"bower_components/jquery/dist/jquery.min.js",
"bower_components/angular/angular.js",
"bower_components/angular-mocks/angular-mocks.js",
"bower_components/angular-cookies/angular-cookies.js",
"bower_components/angular-resource/angular-resource.js",
"bower_components/angular-ui-router/release/angular-ui-router.js",
"bower_components/angular-bootstrap/ui-bootstrap.js",
"bower_components/angular-bootstrap/ui-bootstrap-tpls.js"
]
}
"core": {
"css": {
"bower_components/build/css/dist.min.css": []
},
"js": {
"bower_components/build/js/dist.min.js": [
"bower_components/jquery/dist/jquery.min.js",
"bower_components/angular/angular.js",
"bower_components/angular-mocks/angular-mocks.js",
"bower_components/angular-cookies/angular-cookies.js",
"bower_components/angular-resource/angular-resource.js",
"bower_components/angular-ui-router/release/angular-ui-router.js",
"bower_components/angular-bootstrap/ui-bootstrap.js",
"bower_components/angular-bootstrap/ui-bootstrap-tpls.js"
]
}
}
}
52 changes: 26 additions & 26 deletions config/env/all.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
'use strict';

var path = require('path'),
rootPath = path.normalize(__dirname + '/../..');
rootPath = path.normalize(__dirname + '/../..');

module.exports = {
root: rootPath,
port: process.env.PORT || 3000,
hostname: process.env.HOST || process.env.HOSTNAME,
db: process.env.MONGOHQ_URL,
templateEngine: 'swig',
root: rootPath,
port: process.env.PORT || 3000,
hostname: process.env.HOST || process.env.HOSTNAME,
db: process.env.MONGOHQ_URL,
templateEngine: 'swig',

// The secret should be set to a non-guessable string that
// is used to compute a session hash
sessionSecret: 'MEAN',
// The secret should be set to a non-guessable string that
// is used to compute a session hash
sessionSecret: 'MEAN',

// The name of the MongoDB collection to store sessions in
sessionCollection: 'sessions',
// The name of the MongoDB collection to store sessions in
sessionCollection: 'sessions',

// The session cookie settings
sessionCookie: {
path: '/',
httpOnly: true,
// If secure is set to true then it will cause the cookie to be set
// only when SSL-enabled (HTTPS) is used, and otherwise it won't
// set a cookie. 'true' is recommended yet it requires the above
// mentioned pre-requisite.
secure: false,
// Only set the maxAge to null if the cookie shouldn't be expired
// at all. The cookie will expunge when the browser is closed.
maxAge: null
},
// The session cookie settings
sessionCookie: {
path: '/',
httpOnly: true,
// If secure is set to true then it will cause the cookie to be set
// only when SSL-enabled (HTTPS) is used, and otherwise it won't
// set a cookie. 'true' is recommended yet it requires the above
// mentioned pre-requisite.
secure: false,
// Only set the maxAge to null if the cookie shouldn't be expired
// at all. The cookie will expunge when the browser is closed.
maxAge: null
},

// The session cookie name
sessionName: 'connect.sid'
// The session cookie name
sessionName: 'connect.sid'
};
Loading

0 comments on commit 2dea710

Please sign in to comment.