Skip to content

Commit

Permalink
Merge pull request Mikhus#73 from Mikhus/v2.0.9
Browse files Browse the repository at this point in the history
Merging release 2.0.9 into master
  • Loading branch information
Mikhus authored Sep 29, 2016
2 parents e6d9e33 + 1da781f commit 797b628
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 80 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ errorShots/
*.log
debug.js
dist/
.vscode
.vscode
complexity/
*es6.js
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-gauges",
"version": "2.0.8",
"version": "2.0.9",
"homepage": "https://github.com/Mikhus/canvas-gauges",
"authors": [
"Mykhailo Stadnyk <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion docs-coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions gauge.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gauge.min.js.map

Large diffs are not rendered by default.

40 changes: 33 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const fsc = require('fs-cli');
const semver = require('semver');
const inject = require('gulp-inject-string');
const version = require('./package.json').version;
const plato = require('gulp-plato');

/**
* @typedef {{argv: object}} yargs
Expand Down Expand Up @@ -128,6 +129,33 @@ function license() {
version + '\n */\n';
}

/**
* Builds code complexity report
*
* @task {complexity}
*/
gulp.task('complexity', done => {
rimraf('complexity', () => gulp.src('lib/**/*.js')
.pipe(plato('complexity', {
complexity: { trycatch: true },
jshint: {
options: {
strict: false,
browser: true,
browserify: true,
devel: true,
expr: true,
esversion: 6,
laxbreak: true,
laxcomma: true,
sub: true
}
}
}))
.on('finish', () => done())
);
});

/**
* Displays this usage information.
*
Expand Down Expand Up @@ -255,13 +283,10 @@ gulp.task('build:prod', done => {
* @task {build:es6}
* @arg {type} build type: 'radial' - Gauge object only, 'linear' - LinearGauge object only, 'all' - everything (default)
*/
gulp.task('build:es6', ['clean'], () => {
return gutil.log(chalk.red(
'Sorry, this feature is currently not supported.'));
// es6concat(yargs.argv.type || 'all')
// .pipe(rename('gauge.es6.min.js'))
// .pipe(uglify())
// .pipe(gulp.dest('.'));
gulp.task('build:es6', done => {
es6concat(yargs.argv.type || 'all')
.pipe(gulp.dest('.'))
.on('end', () => done());
});

/**
Expand Down Expand Up @@ -413,6 +438,7 @@ gulp.task('lint', () => {
'!docs/**',
'!**.min.js',
'!coverage/**',
'!complexity/**',
'!dist/**'
])
.pipe(eslint())
Expand Down
1 change: 1 addition & 0 deletions lib/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* jshint -W079 */
const vendorize = require('./vendorize');

/**
Expand Down
1 change: 1 addition & 0 deletions lib/BaseGauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class BaseGauge {

gauges.push(this);

//noinspection JSUnresolvedVariable
/**
* Gauges version string
*
Expand Down
4 changes: 2 additions & 2 deletions lib/DomObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ export default class DomObserver {
this.isValidNode(record.target) &&
record.oldValue !== this.type) // skip false-positive mutations
{
setTimeout(() => this.process(record.target));
setTimeout(this.process.bind(this, record.target));
}

else if (record.addedNodes && record.addedNodes.length) {
let ii = 0;
let ss = record.addedNodes.length;

for (; ii < ss; ii++) {
this.process(record.addedNodes[ii]);
setTimeout(this.process.bind(this, record.addedNodes[ii]));
}
}
}
Expand Down
Loading

0 comments on commit 797b628

Please sign in to comment.