-
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.
- Loading branch information
0 parents
commit 4e4954f
Showing
187 changed files
with
44,452 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = true | ||
indent_style = tab | ||
|
||
[{*.yml,*.json}] | ||
indent_style = space | ||
indent_size = 2 |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
|
||
pids | ||
logs | ||
results | ||
|
||
npm-debug.log | ||
node_modules | ||
|
||
.DS_Store | ||
|
||
.env |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": false, /* custom */ | ||
"eqeqeq": true, | ||
"es3": true, | ||
"forin": true, | ||
"freeze": true, | ||
"immed": true, | ||
"indent": 1, /* custom */ | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonbsp": true, | ||
"nonew": true, | ||
"plusplus": false, /* custom */ | ||
"quotmark": true, | ||
"undef": true, | ||
"unused": true, | ||
"strict": false, /* enable later */ | ||
"trailing": true, | ||
"maxparams": false, | ||
"maxdepth": false, | ||
"maxstatements": false, | ||
"maxcomplexity": false, | ||
"maxlen": false, | ||
"asi": false, | ||
"boss": true, /* custom */ | ||
"debug": false, | ||
"eqnull": true, /* custom */ | ||
"esnext": false, | ||
"evil": false, | ||
"expr": false, | ||
"funcscope": false, | ||
"gcl": false, | ||
"globalstrict": false, | ||
"iterator": false, | ||
"lastsemic": false, | ||
"laxbreak": false, | ||
"laxcomma": false, | ||
"loopfunc": false, | ||
"moz": false, | ||
"multistr": false, | ||
"notypeof": false, | ||
"proto": false, | ||
"scripturl": false, | ||
"smarttabs": false, | ||
"shadow": false, | ||
"sub": false, | ||
"supernew": false, | ||
"noyield": false, | ||
"browser": true, /* custom */ | ||
"node": true, /* custom */ | ||
"onevar": true, /* custom */ | ||
"globals": { /* custom */ | ||
/* MOCHA: http://stackoverflow.com/a/19572515/130638 */ | ||
"describe" : false, | ||
"it" : false, | ||
"before" : false, | ||
"beforeEach" : false, | ||
"after" : false, | ||
"afterEach" : false | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,129 @@ | ||
'use strict()'; | ||
|
||
var config= { | ||
port: 3000 | ||
}; | ||
|
||
module.exports = function(grunt) { | ||
|
||
// Load grunt tasks automatically | ||
require('load-grunt-tasks')(grunt); | ||
|
||
// Time how long tasks take. Can help when optimizing build times | ||
require('time-grunt')(grunt); | ||
|
||
|
||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
express: { | ||
options: { | ||
port: config.port | ||
}, | ||
dev: { | ||
options: { | ||
script: 'keystone.js', | ||
debug: true | ||
} | ||
} | ||
}, | ||
|
||
jshint: { | ||
options: { | ||
reporter: require('jshint-stylish'), | ||
force: true | ||
}, | ||
all: [ 'routes/**/*.js', | ||
'models/**/*.js' | ||
], | ||
server: [ | ||
'./keystone.js' | ||
] | ||
}, | ||
|
||
concurrent: { | ||
dev: { | ||
tasks: ['nodemon', 'node-inspector', 'watch'], | ||
options: { | ||
logConcurrentOutput: true | ||
} | ||
} | ||
}, | ||
|
||
'node-inspector': { | ||
custom: { | ||
options: { | ||
'web-host': 'localhost' | ||
} | ||
} | ||
}, | ||
|
||
nodemon: { | ||
debug: { | ||
script: 'keystone.js', | ||
options: { | ||
nodeArgs: ['--debug'], | ||
env: { | ||
port: config.port | ||
} | ||
} | ||
} | ||
}, | ||
|
||
watch: { | ||
js: { | ||
files: [ | ||
'model/**/*.js', | ||
'routes/**/*.js' | ||
], | ||
tasks: ['jshint:all'] | ||
}, | ||
|
||
express: { | ||
files: [ | ||
'keystone.js', | ||
'public/js/lib/**/*.{js,json}' | ||
], | ||
tasks: ['jshint:server', 'concurrent:dev'] | ||
}, | ||
livereload: { | ||
files: [ | ||
'public/styles/**/*.css', | ||
'public/styles/**/*.less', | ||
'templates/**/*.jade', | ||
'node_modules/keystone/templates/**/*.jade' | ||
], | ||
options: { | ||
livereload: true | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-jade'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
grunt.registerTask('default', ['jade', 'watch']); | ||
|
||
// load jshint | ||
grunt.registerTask('lint', function(target) { | ||
grunt.task.run([ | ||
'jshint' | ||
]); | ||
}); | ||
|
||
// default option to connect server | ||
grunt.registerTask('serve', function(target) { | ||
grunt.task.run([ | ||
'jshint', | ||
'concurrent:dev' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('server', function () { | ||
grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.'); | ||
grunt.task.run(['serve:' + target]); | ||
}); | ||
|
||
}; |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
web: node keystone.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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// Simulate config options from your production environment by | ||
// customising the .env file in your project's root folder. | ||
require('dotenv').load(); | ||
|
||
// Require keystone | ||
var keystone = require('keystone'); | ||
|
||
// Initialise Keystone with your project's configuration. | ||
// See http://keystonejs.com/guide/config for available options | ||
// and documentation. | ||
|
||
keystone.init({ | ||
|
||
'name': 'AEGEE Madeira', | ||
'brand': 'AEGEE Madeira', | ||
|
||
'less': 'public', | ||
'static': 'public', | ||
'favicon': 'public/favicon.ico', | ||
|
||
'views': 'templates/views', | ||
'view engine': 'jade', | ||
|
||
'emails': 'templates/emails', | ||
|
||
'auto update': true, | ||
|
||
'session': true, | ||
'auth': true, | ||
'user model': 'User', | ||
'cookie secret': 'XU<kl+$6zC8G^f9xJJq8OMpLOJ2p"3gDE9cm0rVk(SZT,@!8y4l&2DrzG&-FI8F%' | ||
|
||
}); | ||
|
||
// Load your project's Models | ||
|
||
keystone.import('models'); | ||
|
||
// Setup common locals for your templates. The following are required for the | ||
// bundled templates and layouts. Any runtime locals (that should be set uniquely | ||
// for each request) should be added to ./routes/middleware.js | ||
|
||
keystone.set('locals', { | ||
_: require('underscore'), | ||
env: keystone.get('env'), | ||
utils: keystone.utils, | ||
editable: keystone.content.editable | ||
}); | ||
|
||
// Load your project's Routes | ||
|
||
keystone.set('routes', require('./routes')); | ||
|
||
// Setup common locals for your emails. The following are required by Keystone's | ||
// default email templates, you may remove them if you're using your own. | ||
|
||
keystone.set('email locals', { | ||
logo_src: '/images/logo-email.gif', | ||
logo_width: 194, | ||
logo_height: 76, | ||
theme: { | ||
email_bg: '#f9f9f9', | ||
link_color: '#2697de', | ||
buttons: { | ||
color: '#fff', | ||
background_color: '#2697de', | ||
border_color: '#1a7cb7' | ||
} | ||
} | ||
}); | ||
|
||
// Setup replacement rules for emails, to automate the handling of differences | ||
// between development a production. | ||
|
||
// Be sure to update this rule to include your site's actual domain, and add | ||
// other rules your email templates require. | ||
|
||
keystone.set('email rules', [{ | ||
find: '/images/', | ||
replace: (keystone.get('env') == 'production') ? 'http://www.your-server.com/images/' : 'http://localhost:3000/images/' | ||
}, { | ||
find: '/keystone/', | ||
replace: (keystone.get('env') == 'production') ? 'http://www.your-server.com/keystone/' : 'http://localhost:3000/keystone/' | ||
}]); | ||
|
||
// Load your project's email test routes | ||
|
||
keystone.set('email tests', require('./routes/emails')); | ||
|
||
// Configure the navigation bar in Keystone's Admin UI | ||
|
||
keystone.set('nav', { | ||
'posts': ['posts', 'post-categories'], | ||
'galleries': 'galleries', | ||
'enquiries': 'enquiries', | ||
'users': 'users' | ||
}); | ||
|
||
/*keystone.set('mandrill api key', 'N5Vm5DPm1DAaW5XlukbWvw'); | ||
keystone.set('mandrill username', '[email protected]');*/ | ||
|
||
// Start Keystone to connect to your database and initialise the web server | ||
|
||
keystone.start(); |
Oops, something went wrong.