forked from linnovate/mean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code Indentation changed to 2 spaces
- Loading branch information
Showing
72 changed files
with
2,472 additions
and
2,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}; |
Oops, something went wrong.