From 65cbe25a02b78624b28ea6b45ffabba6867a5bcd Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 27 Feb 2013 17:03:21 -0500 Subject: attempt n2 to fix grunt in travis ci build --- .travis.yml | 2 ++ Gruntfile.js | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gruntfile.js | 82 ------------------------------------------------------------ package.json | 2 +- 4 files changed, 85 insertions(+), 83 deletions(-) create mode 100644 Gruntfile.js delete mode 100644 gruntfile.js diff --git a/.travis.yml b/.travis.yml index baa0031..2d6cd8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ language: node_js node_js: - 0.8 +before_script: + - npm install -g grunt-cli \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..22502f6 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,82 @@ +/* global module:false */ +module.exports = function(grunt) { + + // Project configuration + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + meta: { + banner: + '/*!\n' + + ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + + ' * http://lab.hakim.se/reveal-js\n' + + ' * MIT licensed\n' + + ' *\n' + + ' * Copyright (C) 2013 Hakim El Hattab, http://hakim.se\n' + + ' */' + }, + + jshint: { + files: [ 'Gruntfile.js', 'js/reveal.js' ] + }, + + // Tests will be added soon + qunit: { + files: [ 'test/**/*.html' ] + }, + + uglify: { + options: { + banner: '<%= meta.banner %>\n' + }, + build: { + src: 'js/reveal.js', + dest: 'js/reveal.min.js' + } + }, + + cssmin: { + compress: { + files: { + 'css/reveal.min.css': [ 'css/reveal.css' ] + } + } + }, + + jshint: { + options: { + curly: false, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + sub: true, + undef: true, + eqnull: true, + browser: true, + expr: true + }, + globals: { + head: false, + module: false, + console: false + } + }, + + watch: { + files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ], + tasks: 'default' + } + + }); + + // Dependencies + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); + grunt.loadNpmTasks( 'grunt-contrib-uglify' ); + grunt.loadNpmTasks( 'grunt-contrib-watch' ); + + // Default task + grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] ); + +}; diff --git a/gruntfile.js b/gruntfile.js deleted file mode 100644 index bd6858a..0000000 --- a/gruntfile.js +++ /dev/null @@ -1,82 +0,0 @@ -/* global module:false */ -module.exports = function(grunt) { - - // Project configuration - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - meta: { - banner: - '/*!\n' + - ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + - ' * http://lab.hakim.se/reveal-js\n' + - ' * MIT licensed\n' + - ' *\n' + - ' * Copyright (C) 2013 Hakim El Hattab, http://hakim.se\n' + - ' */' - }, - - jshint: { - files: [ 'gruntfile.js', 'js/reveal.js' ] - }, - - // Tests will be added soon - qunit: { - files: [ 'test/**/*.html' ] - }, - - uglify: { - options: { - banner: '<%= meta.banner %>\n' - }, - build: { - src: 'js/reveal.js', - dest: 'js/reveal.min.js' - } - }, - - cssmin: { - compress: { - files: { - 'css/reveal.min.css': [ 'css/reveal.css' ] - } - } - }, - - jshint: { - options: { - curly: false, - eqeqeq: true, - immed: true, - latedef: true, - newcap: true, - noarg: true, - sub: true, - undef: true, - eqnull: true, - browser: true, - expr: true - }, - globals: { - head: false, - module: false, - console: false - } - }, - - watch: { - files: [ 'gruntfile.js', 'js/reveal.js', 'css/reveal.css' ], - tasks: 'default' - } - - }); - - // Dependencies - grunt.loadNpmTasks( 'grunt-contrib-jshint' ); - grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); - grunt.loadNpmTasks( 'grunt-contrib-uglify' ); - grunt.loadNpmTasks( 'grunt-contrib-watch' ); - - // Default task - grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] ); - -}; diff --git a/package.json b/package.json index e9ab1e1..830b877 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "node": "~0.8.0" }, "scripts": { - "test": "grunt lint qunit" + "test": "grunt jshint" }, "dependencies": { "underscore": "~1.3.3", -- cgit v1.2.3