-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from neocotic/develop
Release 2.3.0
- Loading branch information
Showing
34 changed files
with
2,804 additions
and
1,854 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
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,3 +1,4 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
|
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
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,6 +1,6 @@ | ||
/* | ||
* QRious | ||
* Copyright (C) 2016 Alasdair Mercer | ||
* Copyright (C) 2017 Alasdair Mercer | ||
* Copyright (C) 2010 Tom Zerucha | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
|
@@ -17,12 +17,14 @@ | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function(grunt) { | ||
var babel | ||
var commonjs | ||
var nodeResolve | ||
var semver = require('semver') | ||
var uglify | ||
var babel; | ||
var commonjs; | ||
var nodeResolve; | ||
var semver = require('semver'); | ||
var uglify; | ||
|
||
var bannerLarge = [ | ||
'/*', | ||
|
@@ -43,12 +45,12 @@ module.exports = function(grunt) { | |
' * You should have received a copy of the GNU General Public License', | ||
' * along with this program. If not, see <http://www.gnu.org/licenses/>.', | ||
' */' | ||
].join('\n') | ||
].join('\n'); | ||
var bannerSmall = [ | ||
'/*! QRious v<%= pkg.version %> | (C) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> | GPL v3 License', | ||
'Based on jsqrencode | (C) 2010 [email protected] | GPL v3 License', | ||
'*/' | ||
].join('\n') | ||
].join('\n'); | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
@@ -59,19 +61,19 @@ module.exports = function(grunt) { | |
tasks: [ 'test' ] | ||
} | ||
} | ||
}) | ||
}); | ||
|
||
var buildTasks = [ 'compile' ] | ||
var compileTasks = [] | ||
var testTasks = [ 'compile' ] | ||
var buildTasks = [ 'compile' ]; | ||
var compileTasks = []; | ||
var testTasks = [ 'compile' ]; | ||
|
||
if (semver.satisfies(process.version, '>=0.12')) { | ||
babel = require('rollup-plugin-babel') | ||
commonjs = require('rollup-plugin-commonjs') | ||
nodeResolve = require('rollup-plugin-node-resolve') | ||
uglify = require('rollup-plugin-uglify') | ||
babel = require('rollup-plugin-babel'); | ||
commonjs = require('rollup-plugin-commonjs'); | ||
nodeResolve = require('rollup-plugin-node-resolve'); | ||
uglify = require('rollup-plugin-uglify'); | ||
|
||
compileTasks.push('clean', 'rollup') | ||
compileTasks.push('clean', 'rollup'); | ||
|
||
grunt.config.merge({ | ||
clean: { | ||
|
@@ -90,15 +92,14 @@ module.exports = function(grunt) { | |
return [ | ||
nodeResolve({ | ||
jsnext: true, | ||
main: true, | ||
skip: [ 'canvas' ] | ||
main: true | ||
}), | ||
commonjs(), | ||
babel({ | ||
exclude: [ 'node_modules/**' ], | ||
runtimeHelpers: true | ||
}) | ||
] | ||
]; | ||
} | ||
}, | ||
files: { | ||
|
@@ -124,7 +125,7 @@ module.exports = function(grunt) { | |
exclude: [ 'node_modules/**' ], | ||
runtimeHelpers: true | ||
}) | ||
] | ||
]; | ||
} | ||
}, | ||
files: { | ||
|
@@ -153,42 +154,42 @@ module.exports = function(grunt) { | |
uglify({ | ||
output: { | ||
comments: function(node, comment) { | ||
return comment.type === 'comment2' && /^\!/.test(comment.value) | ||
return comment.type === 'comment2' && /^\!/.test(comment.value); | ||
} | ||
} | ||
}) | ||
] | ||
]; | ||
} | ||
}, | ||
files: { | ||
'dist/umd/qrious.min.js': 'src/runtime/browser.js' | ||
} | ||
} | ||
} | ||
}) | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-clean') | ||
grunt.loadNpmTasks('grunt-rollup') | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-rollup'); | ||
} else { | ||
grunt.log.writeln('"clean" and "rollup" tasks are disabled because Node.js version is <0.12! Please consider upgrading Node.js...') | ||
grunt.log.writeln('"clean" and "rollup" tasks are disabled because Node.js version is <0.12! Please consider upgrading Node.js...'); | ||
} | ||
|
||
if (semver.satisfies(process.version, '>=4')) { | ||
compileTasks.unshift('eslint') | ||
compileTasks.unshift('eslint'); | ||
|
||
grunt.config.set('eslint', { | ||
target: [ 'src/**/*.js' ] | ||
}) | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-eslint') | ||
grunt.loadNpmTasks('grunt-eslint'); | ||
} else { | ||
grunt.log.writeln('"eslint" task is disabled because Node.js version is <4! Please consider upgrading Node.js...') | ||
grunt.log.writeln('"eslint" task is disabled because Node.js version is <4! Please consider upgrading Node.js...'); | ||
} | ||
|
||
grunt.loadNpmTasks('grunt-contrib-watch') | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
grunt.registerTask('default', [ 'build' ]) | ||
grunt.registerTask('build', buildTasks) | ||
grunt.registerTask('compile', compileTasks) | ||
grunt.registerTask('test', testTasks) | ||
} | ||
grunt.registerTask('default', [ 'build' ]); | ||
grunt.registerTask('build', buildTasks); | ||
grunt.registerTask('compile', compileTasks); | ||
grunt.registerTask('test', testTasks); | ||
}; |
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
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
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
Oops, something went wrong.