@@ -37,13 +37,27 @@ module.exports = function(config) { | |||
// preprocess matching files before serving them to the browser | |||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | |||
preprocessors: {}, | |||
preprocessors: { | |||
'dist/svg.js': ['coverage'] | |||
}, | |||
// test results reporter to use | |||
// possible values: 'dots', 'progress' | |||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | |||
reporters: ['progress'], | |||
reporters: ['progress', 'coverage'], | |||
// configure the coverage reporter | |||
coverageReporter: { | |||
// Specify a reporter type. | |||
type: 'lcov', | |||
dir: 'coverage/', | |||
subdir: function(browser) { | |||
// normalization process to keep a consistent browser name accross different OS | |||
return browser.toLowerCase().split(/[ /-]/)[0]; // output the results into: './coverage/firefox/' | |||
} | |||
}, | |||
// web server port |
@@ -8,4 +8,5 @@ obsolete/ | |||
test/ | |||
src/index.js | |||
node_modules/ | |||
.vscode/ | |||
.vscode/ | |||
coverage/ |
@@ -4,6 +4,7 @@ node_js: | |||
script: | |||
- npm run build | |||
- npm test | |||
- cat coverage/firefox/lcov.info | node_modules/.bin/coveralls | |||
#sudo: required | |||
#dist: trusty | |||
addons: |
@@ -1,6 +1,7 @@ | |||
# SVG.js | |||
[![Build Status](https://travis-ci.org/svgdotjs/svg.js.svg?branch=master)](https://travis-ci.org/svgdotjs/svg.js) | |||
[![Coverage Status](https://coveralls.io/repos/github/svgdotjs/svg.js/badge.svg?branch=master)](https://coveralls.io/github/svgdotjs/svg.js?branch=master) | |||
A lightweight library for manipulating and animating SVG. | |||
@@ -6,7 +6,7 @@ | |||
* @copyright Wout Fierens <wout@mick-wout.com.com> | |||
* @license MIT | |||
* | |||
* BUILT: Sat Nov 12 2016 22:04:58 GMT+0100 (CET) | |||
* BUILT: Sun Nov 13 2016 00:23:29 GMT+0100 (CET) | |||
*/; | |||
(function(root, factory) { | |||
if (typeof define === 'function' && define.amd) { |
@@ -100,7 +100,7 @@ gulp.task('unify', ['clean'], function() { | |||
.pipe(wrapUmd({ src: 'src/umd.js'})) | |||
.pipe(header(headerLong, { pkg: pkg })) | |||
.pipe(trim({ leading: false })) | |||
.pipe(chmod(644)) | |||
.pipe(chmod(0o644)) | |||
.pipe(gulp.dest('dist')) | |||
.pipe(size({ showFiles: true, title: 'Full' })) | |||
}) | |||
@@ -116,7 +116,7 @@ gulp.task('minify', ['unify'], function() { | |||
.pipe(rename({ suffix:'.min' })) | |||
.pipe(size({ showFiles: true, title: 'Minified' })) | |||
.pipe(header(headerShort, { pkg: pkg })) | |||
.pipe(chmod(644)) | |||
.pipe(chmod(0o644)) | |||
.pipe(gulp.dest('dist')) | |||
.pipe(size({ showFiles: true, gzip: true, title: 'Gzipped' })) | |||
}) |
@@ -59,9 +59,10 @@ | |||
"docs": "gulp docs" | |||
}, | |||
"devDependencies": { | |||
"coveralls": "^2.11.15", | |||
"del": "^2.2.0", | |||
"gulp": "^3.8.6", | |||
"gulp-chmod": "^1.2.0", | |||
"gulp-chmod": "^2.0.0", | |||
"gulp-cli": "^1.2.2", | |||
"gulp-concat": "^2.3.3", | |||
"gulp-header": "^1.0.5", | |||
@@ -72,8 +73,9 @@ | |||
"gulp-wrap": "^0.13.0", | |||
"jasmine-core": "^2.5.2", | |||
"karma": "^1.3.0", | |||
"karma-coverage": "^1.1.1", | |||
"karma-firefox-launcher": "^1.0.0", | |||
"karma-jasmine": "^1.0.2", | |||
"request": "^2.75.0" | |||
"request": "^2.78.0" | |||
} | |||
} |