https://github.com/daern91/build-actions
https://github.com/daern91/build-actions
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/daern91/build-actions
- Owner: daern91
- License: mit
- Created: 2018-02-03T14:56:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T21:26:11.000Z (over 8 years ago)
- Last Synced: 2025-01-22T09:50:46.199Z (over 1 year ago)
- Language: JavaScript
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# build-actions
[](https://travis-ci.org/daern91/build-actions)
[](https://coveralls.io/github/daern91/build-actions?branch=master)
[](https://standardjs.com)
A small library to diff Customers and build update actions.
## Installation
### Required Tools and Dependencies
* Node (This project uses the current LTS node version, which is `v8.9.4`)
### Setup (git)
Execute these commands in the project's root directory:
* `git clone https://github.com/daern91/build-actions.git` - Clone the git repo
* `cd build-actions/` - Move into package folder
* `npm i` - Install all dependencies
## CLI Usage
* `npm run generate-data` - Generate a data.json file with test customers.
* Duplicate the data.json file and change some of the customer info in the new copy, e.g. `email`.
* `buildactions import --file testCustomers/`
## Setup (npm)
`npm install @daern91/build-actions`
## Usage
```javascript
const buildActions = require('@daern91/build-actions');
const actions = buildActions(oldCustomerObject, newCustomerObject);
// Output should be an array of update actions
```
**NOTE: You may also use CLI by installing package globally with `npm install @daern91/build-actions -g`**
## Tests
* `npm test` for full testing including lint.
* `npm run cover` for full testing including coverage.
### Requirements
* [x] Setup the project in a github repository
* [x] Export `buildActions` function
* [x] Create test data generator
* [x] Write a CLI (matching with ID instead of name)
* [ ] Provide JSDoc
* [x] Tests
* [x] Lint
* [x] README
* [x] Use ES6
* [x] TravisCI
* [ ] Cucumber features for CLI integration tests (provided that you did the advanced part)