diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..1c21b8c --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +coverage +consumer.js diff --git a/.travis.yml b/.travis.yml index d5fcc6d..0a4f07a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ before_script: - npm install script: - npm test + - npm run lint + - npm run deploy: provider: npm diff --git a/README.md b/README.md index 6e74829..7e0d090 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# fatturazione-elettronica-aruba · [![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) ![build](https://api.travis-ci.org/andreafalzetti/node-fatturazione-elettronica-aruba.svg?branch=master) [![npm version](https://img.shields.io/npm/v/fatturazione-elettronica-aruba.svg?style=flat)](https://www.npmjs.com/package/node-fatturazione-elettronica-aruba) [![Coverage Status](https://coveralls.io/repos/github/andreafalzetti/node-fatturazione-elettronica-aruba/badge.svg?branch=master)](https://coveralls.io/github/andreafalzetti/node-fatturazione-elettronica-aruba?branch=master) +# fatturazione-elettronica-aruba ยท [![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) ![build](https://api.travis-ci.org/andreafalzetti/node-fatturazione-elettronica-aruba.svg?branch=master) [![npm version](https://img.shields.io/npm/v/fatturazione-elettronica-aruba.svg?style=flat)](https://www.npmjs.com/package/node-fatturazione-elettronica-aruba) [![Coverage Status](https://coveralls.io/repos/github/andreafalzetti/node-fatturazione-elettronica-aruba/badge.svg?branch=master)](https://coveralls.io/github/andreafalzetti/node-fatturazione-elettronica-aruba?branch=master) +Node.js client to integrate the Aruba API for electronic invoicing ("Fatturazione Elettronica") within your project. -## This project is work in progress - -Module to easily integrate the Aruba API for electronic invoicing ("Fatturazione Elettronica") with your project. +Currently in beta version and under development. The API should be stable and you can start using it. ## Roadmap -- Add upload invoice +- Complete support for Notifications +- Implement MonitorCheck API ## Links @@ -74,7 +74,7 @@ ArubaClient constructor #### Parameters -- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** +- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** - `options.env` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Aruba environment (demo or prod) Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Returns an instance of ArubaClient @@ -85,7 +85,7 @@ Calls Aruba to generate a JWT that will be used for future calls ##### Parameters -- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `data` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `data.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Aruba username - `data.password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Aruba password diff --git a/jest.config.js b/jest.config.js index f6a39c0..87c260e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -24,7 +24,7 @@ module.exports = { // collectCoverageFrom: null, // The directory where Jest should output its coverage files - coverageDirectory: "coverage", + coverageDirectory: 'coverage', // An array of regexp pattern strings used to skip coverage collection // coveragePathIgnorePatterns: [ @@ -124,7 +124,7 @@ module.exports = { // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: "node", + testEnvironment: 'node' // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, diff --git a/package.json b/package.json index edaae6f..a541387 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "test": "jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", "lint": "eslint . || (echo \"Some errors may be fixable with \\`npm run lint-fix\\`\". && exit 1)", - "lint-fix": "eslint . --fix" + "lint-fix": "eslint . --fix", + "generate-doc": "documentation readme ./lib/index.js --section=API --shallow" }, "keywords": [], "author": "Andrea Falzetti ",