Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from krux/ci
Browse files Browse the repository at this point in the history
Continuous integration with grunt/travis-ci
  • Loading branch information
dbrans committed Oct 12, 2012
2 parents 52edc71 + a2a4f59 commit d58ea51
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
@@ -0,0 +1,17 @@
language: node_js

# test on these node.js versions
node_js:
- 0.9

before_script:
# Run lint on every commit
- grunt lint

notifications:
email:
recipients:
- dbrans@gmail.com
- nick@sullivanflock.com
on_success: [change]
on_failure: [always]
2 changes: 2 additions & 0 deletions README.md
@@ -1 +1,3 @@
# First!

Build Status: [![Build Status](https://secure.travis-ci.org/krux/postscribe.png)](http://travis-ci.org/krux/postscribe)
60 changes: 60 additions & 0 deletions grunt.js
@@ -0,0 +1,60 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',

// run jshint on the files, with the options described below. Different globals defined based on file type
// 'node' for files that are run by node.js (module, process, etc.)
// 'browser' for files that are run by a browser (window, document, etc.)
lint: {
node: ['grunt.js'],
browser: ['postscribe.js']
},
jshint: {
// Apply to all js files
options: {
curly: true,
eqeqeq: true,
expr: true,
forin: true,
indent: 2,
latedef: false,
newcap: true,
noarg: true,
noempty: true, // debatable
sub: true,
undef: true, // Really. Leave it
unused: true
},
globals: {},
// Just for the 'node' src files
node: {
globals: {console: true, process: true, module:true, require: true, __dirname: true, exports: true}
},
// Just for the 'browser' src files
browser: {
// Let's be very strict here
options: {
loopfunc: true,
expr: true,
evil: true, // Reluctantly added
eqnull: true
},
globals: {}
}
},

qunit: {
files: ['test/test.html']
}

});

// Alias test
grunt.registerTask('test', 'qunit');

// This is what gets run when you don't specify an argument for grunt.
grunt.registerTask('default', 'lint test');

};
8 changes: 6 additions & 2 deletions package.json
Expand Up @@ -35,12 +35,16 @@
}
],
"dependencies": {},
"devDependencies": {},
"devDependencies": {
"grunt": "~0.3.16"
},
"homepage": "https://github.com/krux/postscribe",
"os": [],
"cpu": [],
"engines": {
"node": ">=0.8"
},
"scripts": {}
"scripts": {
"test": "grunt test"
}
}

0 comments on commit d58ea51

Please sign in to comment.