Move from Make to Grunt

This commit is contained in:
Rowan Manning
2013-11-05 11:06:10 +00:00
parent 70037a0372
commit 0cf37c8c52
5 changed files with 41 additions and 96 deletions

29
Gruntfile.js Normal file
View File

@@ -0,0 +1,29 @@
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
all: ['**/*.js', '!node_modules/**/*.js', '!public/js/vendor/**/*.js'],
options: {
es3: false,
indent: 4,
latedef: false,
maxcomplexity: 4,
maxdepth: 2,
maxlen: 100,
maxparams: 4,
maxstatements: false,
node: true,
quotmark: 'single'
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('default', ['lint']);
grunt.registerTask('ci', ['lint']);
};

View File

@@ -1,27 +0,0 @@
# Group targets
all: deps lint
# Install dependencies
deps:
@echo "Installing dependencies..."
@npm install
@./node_modules/.bin/bower install
# Lint JavaScript
lint:
@echo "Linting JavaScript..."
@./node_modules/.bin/jshint \
--config ./test/config/jshint.json \
--exclude ./node_modules \
*.js **/*.js
# Start the application
start:
@echo "Starting application..."
@NODE_ENV=production node .
# Start the application in development mode
start-dev:
@echo "Starting application (development mode)..."
@NODE_ENV=development ./node_modules/.bin/supervisor -q .

View File

@@ -16,7 +16,14 @@ Setup
pa11y-dashboard requires [Node.js][node] 0.10+ and [pa11y-webservice][pa11y-webservice] to be installed and running. You'll need to follow the setup guide for pa11y-webservice before setting up pa11y-dashboard.
You'll then need to clone this repo locally and install dependencies with `make deps`, this installs npm and bower dependencies. Once you have a local clone, you'll need to copy some sample configuration files in order to run the application. From within the repo, run the following commands:
You'll then need to clone this repo locally and install dependencies with:
```sh
$ npm install
$ ./node_modules/.bin/bower install
```
This installs npm and bower dependencies. Once you have a local clone, you'll need to copy some sample configuration files in order to run the application. From within the repo, run the following commands:
```sh
$ cp config/development.sample.json config/development.json
@@ -28,8 +35,8 @@ Each of these files defines configurations for a different environment. If you'r
Now that you've got your application configured, you can run in each mode with the following commands:
```sh
$ make start # start in production mode
$ make start-dev # start in development mode
$ NODE_ENV=production node .
$ NODE_ENV=development ./node_modules/.bin/supervisor -q .
```
Development mode runs the application with [Supervisor][supervisor], so you won't need to restart it if you change any JavaScript files.

View File

@@ -32,7 +32,8 @@
"underscore": "~1.5"
},
"devDependencies": {
"jshint": "~2.1",
"grunt": "~0.4",
"grunt-contrib-jshint": "~0.7",
"supervisor": "~0.5"
},

View File

@@ -1,65 +0,0 @@
{
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"es3": false,
"forin": true,
"immed": true,
"indent": 4,
"latedef": false,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"quotmark": "single",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"maxparams": 4,
"maxdepth": 2,
"maxstatements": 0,
"maxcomplexity": 4,
"maxlen": 100,
"asi": false,
"boss": false,
"debug": false,
"eqnull": false,
"es5": false,
"esnext": false,
"evil": false,
"expr": false,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"moz": false,
"multistr": false,
"proto": false,
"scripturl": false,
"smarttabs": false,
"shadow": false,
"sub": false,
"supernew": false,
"validthis": false,
"browser": false,
"couch": false,
"devel": false,
"dojo": false,
"jquery": false,
"mootools": false,
"node": true,
"nonstandard": false,
"prototypejs": false,
"rhino": false,
"worker": false,
"wsh": false,
"yui": false
}