Skip to content
Browse files

Update CI setup

  • Loading branch information...
1 parent aba506d commit a654a476d60ab261b806cd7f29269bc4de932f8b @occ committed
Showing with 88 additions and 68 deletions.
  1. +1 −0 .gitignore
  2. +4 −1 .travis.yml
  3. +72 −0 Gruntfile.js
  4. +0 −59 grunt.js
  5. +11 −8 package.json
View
1 .gitignore
@@ -1,2 +1,3 @@
.idea/
+node_modules/
TraceKit.iml
View
5 .travis.yml
@@ -1,3 +1,6 @@
language: node_js
node_js:
- - 0.8
+ - 0.10.15
+before_script:
+ - wget http://closure-compiler.googlecode.com/files/compiler-latest.zip
+ - unzip compiler-latest.zip -d closure
View
72 Gruntfile.js
@@ -0,0 +1,72 @@
+/*global module:false*/
+module.exports = function (grunt) {
+ 'use strict';
+
+ // Project configuration.
+ grunt.initConfig({
+ 'closureCompiler': {
+ options: {
+ compilerFile: './closure/compiler.jar',
+ checkModified: true,
+ compilerOpts: {
+ compilation_level: 'ADVANCED_OPTIMIZATIONS',
+ warning_level: 'verbose',
+ jscomp_off: ['checkTypes', 'fileoverviewTags'],
+ summary_detail_level: 3,
+ output_wrapper: '"(function(){%output%}).call(this);"'
+ },
+ execOpts: {
+ maxBuffer: 200 * 1024
+ }
+
+ },
+ 'compile': {
+ src: './tracekit.js',
+ dest: './tracekit.min.js'
+ }
+ },
+ jshint: {
+ options: {
+ // Uncommented are default grunt options
+ bitwise: true, //Added from site
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ noempty: true, //Added from site
+ nonew: true, //Added
+ quotmark: 'single', //Added
+ /* regexp: true, */
+ undef: true,
+ unused: true, //Added from site
+ /* strict: true, //Added from site */
+ sub: true,
+ boss: true, //dont' allow assignments to be evaluated as truthy/falsey */
+ eqnull: true, //Allow == null
+ browser: true,
+ /* indent: 4, //Added from site */
+ devel: true, //Added
+ white: false,
+ onecase: true,
+ trailing: true,
+ maxparams: 6,
+ maxdepth: 9,
+ maxerr: 20
+ },
+ globals: {
+ ActiveXObject: false
+ },
+ lint: {
+ src: ['grunt.js', 'tracekit.js']
+ }
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-closure-tools');
+
+ grunt.registerTask('default', ['jshint:lint', 'closureCompiler:compile']);
+ grunt.registerTask('travis', ['jshint:lint', 'closureCompiler:compile']);
+};
View
59 grunt.js
@@ -1,59 +0,0 @@
-/*global module:false*/
-module.exports = function(grunt) {
- 'use strict';
-
- // Project configuration.
- grunt.initConfig({
- lint: {
- files: ['grunt.js', 'tracekit.js']
- },
- watch: {
- files: '<config:lint.files>',
- tasks: 'lint'
- },
- jshint: {
- options: {
- // Uncommented are default grunt options
- bitwise: true, //Added from site
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- noempty: true, //Added from site
- nonew: true, //Added
- quotmark: 'single', //Added
- /* regexp: true, */
- undef: true,
- unused: true, //Added from site
- /* strict: true, //Added from site */
- sub: true,
- boss: true, //dont' allow assignments to be evaluated as truthy/falsey */
- eqnull: true, //Allow == null
- browser: true,
- /* indent: 4, //Added from site */
- devel: true, //Added
- white: false,
-
- es5: true,
- onecase: true,
-
- //Adding a few of nice restrictions:
- trailing: true,
- maxparams: 6,
- maxdepth: 9,
- maxerr: 20
- },
- globals: {
- ActiveXObject: false
- }
- }
- });
-
- // Default task.
- grunt.registerTask('default', 'lint watch');
-
- // Travis-CI task.
- grunt.registerTask('travis', 'lint');
-};
View
19 package.json
@@ -1,10 +1,13 @@
{
- "name": "TraceKit",
- "version": "0.1.0",
- "devDependencies": {
- "grunt": "~0.3.17"
- },
- "scripts": {
- "test": "grunt travis --verbose"
- }
+ "name": "TraceKit",
+ "version": "0.1.0",
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-jshint": "~0.6.2",
+ "grunt-cli": "~0.1.9",
+ "grunt-closure-tools": "~0.8.3"
+ },
+ "scripts": {
+ "test": "grunt --verbose travis"
+ }
}

0 comments on commit a654a47

Please sign in to comment.
Something went wrong with that request. Please try again.