Skip to content

Commit

Permalink
ESLint, added travis.yml, fix coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
swederik committed Jun 2, 2017
1 parent 0ab9c67 commit 9cf3eca
Show file tree
Hide file tree
Showing 30 changed files with 16,346 additions and 2,890 deletions.
8 changes: 4 additions & 4 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
'parser': 'babel-eslint',
'env': {
'browser': true,
Expand Down Expand Up @@ -229,7 +229,7 @@
],
'radix': 'warn',
'require-await': 'warn',
'require-jsdoc': 'warn',
//'require-jsdoc': 'warn',
'rest-spread-spacing': 'warn',
'semi': 'warn',
'semi-spacing': 'warn',
Expand All @@ -252,11 +252,11 @@
'warn',
'never'
],
'valid-jsdoc': 'warn',
//'valid-jsdoc': 'warn',
'vars-on-top': 'warn',
'wrap-iife': ['warn', 'inside'],
'wrap-regex': 'warn',
'yield-star-spacing': 'warn',
'yoda': 'warn'
}
}
};
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "node"

cache:
yarn: true
directories:
- node_modules

after_success:
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]

dicomParser
===========

Expand Down Expand Up @@ -31,10 +34,6 @@ Or install via [NPM](https://www.npmjs.com/):

> npm install dicom-parser
Or install via [Bower](http://bower.io/):

> bower install dicomParser
Or install via atmosphere for [Meteor](https://www.meteor.com/) applications

> meteor add chafey:dicom-parser
Expand Down Expand Up @@ -140,34 +139,24 @@ Key Features
Build System
============

This project uses grunt to build the software.
This project uses Webpack to build the software.

Pre-requisites:
---------------

NodeJs - [click to visit web site for installation instructions](http://nodejs.org).

grunt-cli

> npm install -g grunt-cli
bower

> npm install -g bower
Common Tasks
------------

Update dependencies (after each pull):
> npm install
> bower install
Running the build:
> grunt
> npm run build
Automatically running the build and unit tests after each source change:
> grunt watch
> npm run watch
Backlog
------------
Expand Down Expand Up @@ -359,3 +348,16 @@ You can find out more about this by googling for "self documenting code"
Copyright
============
Copyright 2016 Chris Hafey [[email protected]](mailto:[email protected])

[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE

[npm-url]: https://npmjs.org/package/dicom-parser
[npm-version-image]: http://img.shields.io/npm/v/dicom-parser.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/dicom-parser.svg?style=flat

[travis-url]: http://travis-ci.org/chafey/dicomParser
[travis-image]: https://travis-ci.org/chafey/dicomParser.svg?branch=master

[coverage-url]: https://coveralls.io/github/chafey/dicomParser?branch=master
[coverage-image]: https://coveralls.io/repos/github/chafey/dicomParser/badge.svg?branch=master
37 changes: 0 additions & 37 deletions bower.json

This file was deleted.

6 changes: 3 additions & 3 deletions config/webpack/plugins/banner.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const path = require('path');
const webpack = require('webpack');
const rootPath = process.env.PWD;
const pkgPath = path.resolve(rootPath, "package");
const pkgPath = path.join(rootPath, "package");
const pkg = require(pkgPath);

const getCurrentDate = () => {
const today = new Date();
const year = today.getFullYear();
const month = ('00' + (today.getMonth() + 1)).slice(-2);
const date = ('00' + today.getDate()).slice(-2);
const month = ('0' + (today.getMonth() + 1)).slice(-2);
const date = ('0' + today.getDate()).slice(-2);

return `${year}-${month}-${date}`;
}
Expand Down
3 changes: 2 additions & 1 deletion config/webpack/webpack-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
filename: '[name].js',
library: '[name]',
libraryTarget: 'umd',
path: outputPath
path: outputPath,
umdNamedDefine: true
},
devtool: 'source-map',
module: {
Expand Down
Loading

0 comments on commit 9cf3eca

Please sign in to comment.