Browse files

chore: fix up travis build, add release tasks

  • Loading branch information...
1 parent 48cad2e commit 10aeeea3bba6c7262a05fc2d50fe429da4be3ac0 @vojtajina vojtajina committed Jul 5, 2013
Showing with 66 additions and 30 deletions.
  1. +13 −0 .travis.yml
  2. +25 −10 Gruntfile.coffee
  3. +10 −0 karma-v0.8.conf.js
  4. +11 −13 karma.conf.js
  5. +7 −7 package.json
View
13 .travis.yml
@@ -0,0 +1,13 @@
+language: node_js
+node_js:
+ - 0.10
+
+before_install:
+
+before_script:
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start
+ - npm install -g grunt-cli
+
+script:
+ - grunt
View
35 Gruntfile.coffee
@@ -16,7 +16,6 @@ module.exports = (grunt) ->
src: '<%= files.adapter %>'
options:
browser: true,
- es5: true,
strict: false
undef: false
camelcase: false
@@ -39,23 +38,39 @@ module.exports = (grunt) ->
karma:
adapter:
- configFile: 'karma.conf.js'
+ configFile: 'karma-v0.8.conf.js'
autoWatch: false
singleRun: true
reporters: ['dots']
+ 'npm-publish':
+ options:
+ requires: ['build']
+
+ 'npm-contributors':
+ options:
+ commitMessage: 'chore: update contributors'
+
+ bump:
+ options:
+ commitMessage: 'chore: release v%VERSION%'
+ pushTo: 'upstream'
+
+
grunt.loadTasks 'tasks'
- # grunt.loadTasks '../karma/tasks'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-karma'
+ grunt.loadNpmTasks 'grunt-bump'
+ grunt.loadNpmTasks 'grunt-npm'
+ grunt.loadNpmTasks 'grunt-auto-release'
grunt.registerTask 'default', ['build', 'jshint', 'test']
grunt.registerTask 'test', ['karma']
- # TODO(vojta): release task
- # grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) ->
- # grunt.task.run [
- # 'build',
- # "bump:#{type||'patch'}",
- # 'npm-publish'
- # ]
+ grunt.registerTask 'release', 'Build, bump and publish to NPM.', (type) ->
+ grunt.task.run [
+ 'build',
+ 'npm-contributors',
+ "bump:#{type||'patch'}",
+ 'npm-publish'
+ ]
View
10 karma-v0.8.conf.js
@@ -0,0 +1,10 @@
+files = [
+ JASMINE,
+ JASMINE_ADAPTER,
+ 'src/*.js',
+ 'test/*.js'
+];
+
+browsers = process.env.TRAVIS ? ['Firefox'] : ['Chrome'];
+
+autoWatch = true;
View
24 karma.conf.js
@@ -1,16 +1,14 @@
-frameworks = ['jasmine'];
+module.exports = function(config) {
+ config.set({
+ frameworks: ['jasmine'],
-files = [
- 'src/*.js',
- 'test/*.js'
-];
+ files: [
+ 'src/*.js',
+ 'test/*.js'
+ ],
-browsers = process.env.TRAVIS ? ['Firefox'] : ['Chrome'];
+ browsers: process.env.TRAVIS ? ['Firefox'] : ['Chrome'],
-plugins = [
- 'karma-jasmine',
- 'karma-chrome-launcher',
- 'karma-firefox-launcher'
-];
-
-autoWatch = true;
+ autoWatch: true
+ });
+};
View
14 package.json
@@ -16,14 +16,14 @@
"requirejs"
],
"author": "Vojta Jina <vojta.jina@gmail.com>",
- "dependencies": {
- },
+ "dependencies": {},
"devDependencies": {
- "grunt": "~0.4.0rc5",
- "grunt-contrib-jshint": "~0.1.1rc5",
- "karma": "*",
- "karma-jasmine": "*",
- "grunt-karma": "~0.3"
+ "grunt": "~0.4.1",
+ "grunt-contrib-jshint": "~0.6",
+ "grunt-karma": "~0.3",
+ "grunt-bump": "~0.0.7",
+ "grunt-npm": "~0.0.2",
+ "grunt-auto-release": "~0.0.2"
},
"peerDependencies": {
"karma": "~0.9"

0 comments on commit 10aeeea

Please sign in to comment.