This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous integration with grunt/travis-ci
- Loading branch information
Showing
4 changed files
with
85 additions
and
2 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,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] |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
# First! | ||
|
||
Build Status: [![Build Status](https://secure.travis-ci.org/krux/postscribe.png)](http://travis-ci.org/krux/postscribe) |
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,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'); | ||
|
||
}; |
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