Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #323 from cadecairos/mofo-style
Browse files Browse the repository at this point in the history
Add MoFo Styling
  • Loading branch information
Christopher De Cairos committed Mar 5, 2015
2 parents cdc7372 + 45d6b15 commit 45b761d
Show file tree
Hide file tree
Showing 22 changed files with 1,001 additions and 939 deletions.
65 changes: 46 additions & 19 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,54 @@
module.exports = function( grunt ) {
module.exports = function (grunt) {
var jsbeautifyrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jsbeautifyrc");
var jscsrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jscsrc");
var jshintrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jshintrc");

var javaScriptFiles = [
"Gruntfile.js",
"app.js",
"test/**/*.js",
"lib/**/*.js",
"app/dev/**/*.js",
"app/http/*.js",
"app/lib/*.js",
"app/http/controllers/*.js",
"app/http/public/js/*.js",
"app/http/views/js/*.ejs",
"app/db/**/*.js"
];

grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
pkg: grunt.file.readJSON("package.json"),

jshint: {
files: [
"Gruntfile.js",
"app.js",
"test/**/*.js",
"lib/**/*.js",
"app/dev/**/*.js",
"app/http/*.js",
"app/lib/*.js",
"app/http/controllers/*.js",
"app/http/public/js/*.js",
"app/http/views/js/*.ejs",
"app/db/**/*.js"
]
options: jshintrc,
files: javaScriptFiles
},
jsbeautifier: {
options: {
js: jsbeautifyrc
},
modify: {
src: javaScriptFiles
},
verify: {
src: javaScriptFiles,
options: {
mode: "VERIFY_ONLY"
}
}
},
jscs: {
src: javaScriptFiles,
options: jscsrc
}
});

grunt.loadNpmTasks( "grunt-recess" );
grunt.loadNpmTasks( "grunt-contrib-jshint" );
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-jsbeautifier");
grunt.loadNpmTasks("grunt-jscs");

grunt.registerTask( "default", [ "jshint" ]);
grunt.registerTask( "travis", [ "jshint" ]);
grunt.registerTask("clean", ["jsbeautifier:modify"]);
grunt.registerTask("validate", ["jsbeautifier:verify", "jshint", "jscs"]);
grunt.registerTask("default", ["validate"]);
};
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/mozilla/login.webmaker.org.png)](https://travis-ci.org/mozilla/login.webmaker.org)

login.webmaker.org
==================

Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

require( "./app/http/server.js" );
require("./app/http/server.js");
6 changes: 2 additions & 4 deletions app/db/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var Sequelize = require('sequelize');

module.exports = function(env) {

module.exports = function (env) {
var sequelize;
var health = {
connected: false,
Expand All @@ -22,7 +21,7 @@ module.exports = function(env) {
var modelControllers = require('./models')(sequelize);

// Sync
sequelize.sync().complete(function(err) {
sequelize.sync().complete(function (err) {
if (err) {
handlers.dbErrorHandling(err, handlers.forkErrorHandling);
} else {
Expand All @@ -35,5 +34,4 @@ module.exports = function(env) {
return {
Models: modelControllers
};

};
Loading

0 comments on commit 45b761d

Please sign in to comment.