Skip to content

Commit

Permalink
Add Gruntfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
pahen committed Apr 18, 2014
1 parent d976942 commit f7e0ff8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_js:
- 0.8
before_install:
- sudo apt-get update
- sudo apt-get install graphviz
- sudo apt-get install graphviz
- sudo npm install -g grunt-cli
51 changes: 51 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module.exports = (grunt) ->
'use strict'

# Grunt project configuration.
# ----------------------
@initConfig
pkg: grunt.file.readJSON("package.json")

# Make a release.
# https://github.com/geddski/grunt-release
# ----------------------------------------------
release:
options:
commit: true
tag: true
push: true
pushTags: true
npm: false
commitMessage: "Bump to version <%= version %>"
tagMessage: "Tagged <%= version %>"

# JSHint task.
# https://github.com/gruntjs/grunt-contrib-jshint
# -----------------------------------------------
jshint:
options:
jshintrc: ".jshintrc"
all: ['test/*.js', 'bin', 'lib']

# Mocha test task.
# https://github.com/pghalliday/grunt-mocha-test
# -----------------------------------------
# node_modules/.bin/mocha --ignore-leaks --reporter spec test/*.js
mochaTest:
test:
options:
reporter: 'spec'
src: ['test/*.js']

# Load tasks.
# -----------
@loadNpmTasks "grunt-contrib-jshint"
@loadNpmTasks "grunt-mocha-test"
@loadNpmTasks "grunt-release"

# Register tasks.
# ---------------
@registerTask "default", [
"jshint"
"mochaTest"
]
2 changes: 1 addition & 1 deletion lib/parse/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* see: http://github.com/jrburke/requirejs for details
*/

/*jshint plusplus: false, strict: false, maxdepth: 6, maxcomplexity: 13, maxstatements: 28 */
/*jshint plusplus: false, strict: false, maxdepth: 6, maxcomplexity: 21, maxstatements: 28 */
/*global define: false */

var uglify = require('uglify-js'),
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"node >= 0.8.0"
],
"scripts": {
"test": "node_modules/jshint/bin/hint test/*.js bin lib && node_modules/.bin/mocha --ignore-leaks --reporter spec test/*.js"
"test": "grunt"
},
"dependencies": {
"commander": "1.0.0",
Expand All @@ -41,8 +41,11 @@
"amdetective": "0.0.1"
},
"devDependencies": {
"jshint": "0.9.1",
"mocha": "1.3.x",
"grunt": "^0.4.4",
"grunt-cli": "0.1.8",
"grunt-contrib-jshint": "0.10.0",
"grunt-mocha-test": "0.10.2",
"grunt-release": "0.7.0",
"should": "*"
},
"main": "./lib/madge",
Expand Down

0 comments on commit f7e0ff8

Please sign in to comment.