Skip to content

Commit

Permalink
Trying to integrate with travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Ng committed Jun 21, 2013
1 parent 792528c commit 8ab8ab7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
@@ -1,10 +1,6 @@
before_script:
- sudo chmod 777 ./node_modules/grunt/lib/grunt/cli.js

language: node_js

node_js:
- "0.10"
- "0.8"

script: node ./node_modules/grunt/lib/grunt/cli.js test --verbose --force
before_script:
- npm install -g grunt-cli
6 changes: 4 additions & 2 deletions Gruntfile.js
@@ -1,11 +1,13 @@
module.exports = function(grunt) {
// Project configuration.
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.initConfig({
qunit: {
files: ['test/index.html']
all: ['test/index.html']
}
});

// Task to run tests
grunt.registerTask('test', 'qunit');
grunt.registerTask('default', ['test']);
};
7 changes: 6 additions & 1 deletion Jakefile
Expand Up @@ -2,8 +2,10 @@ var utils = require('utilities')
, path = require('path')
, envoy = require('envoy')
, watchr = require('watchr')
, fs = require('fs')
, DEMO_DIR = 'demosite'
, DEMO_PATH = path.join(__dirname, DEMO_DIR);
, DEMO_PATH = path.join(__dirname, DEMO_DIR)
, DEMO_INDEX = path.join(__dirname, DEMO_DIR, 'index.html');

task('cleandemo', function () {
utils.file.rmRf(DEMO_DIR);
Expand All @@ -16,6 +18,9 @@ task('demo', ['cleandemo'], function () {
//Copy over demo files
utils.file.cpR('test', DEMO_PATH, {silent:false});

//Replace references to "../lib" with "lib"
fs.writeFileSync(DEMO_INDEX, fs.readFileSync(DEMO_INDEX).toString().replace(/\.\.\/lib/,'lib'));

//Copy over lib
utils.file.cpR('lib', path.join(DEMO_PATH,'lib'), {silent:false});
});
Expand Down
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -15,12 +15,17 @@
},
"main": "./lib/js-thumb",
"dependencies": {},
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"jake": "latest"
, "utilities": "latest"
, "envoy": "latest"
, "watchr": "2.3.3"
, "grunt": "latest"
, "qunit": "~0.5.15"
, "grunt-contrib-qunit": "~0.2.1"
, "qunitjs": "~1.11.0"
},
"optionalDependencies": {},
"engines": {
Expand Down

0 comments on commit 8ab8ab7

Please sign in to comment.