|
1 | 1 | # archetypes-rules
|
2 | 2 |
|
3 |
| - |
| 3 | + |
4 | 4 |
|
5 |
| -[](http://travis-ci.org/gregswindle/archetypes-rules) |
6 |
| -[](https://coveralls.io/github/gregswindle/archetypes-rules?branch=master) |
7 |
| -[](https://codeclimate.com/github/gregswindle/archetypes-rules) |
8 |
| -[](https://www.codacy.com/app/commonality/archetypes-rules) |
9 |
| -[](https://github.com/RichardLitt/standard-readme) |
| 5 | +[![The MIT License][license-image]][license-url] |
| 6 | +[![NPM version][npm-image]][npm-url] [![FOSSA Status][fossa-image]][fossa-url] |
| 7 | +[![Known Vulnerabilities][vulnerabilities-image]][vulnerabilities-url]<br> |
| 8 | +[![Dependency Status][daviddm-image]][daviddm-url]<br> |
| 9 | +[![MacOS and Ubuntu build statuses][travis-image]][travis-url] |
| 10 | +[![Windows build status][appveyor-image]][appveyor-url] |
| 11 | +[![Coveralls test coverage][coveralls-image]][coveralls-url] |
| 12 | +[![Codacy code quality][codacy-image]][codacy-url] |
10 | 13 |
|
11 | 14 | > Move conditional logic out of source code and database triggers and into a
|
12 | 15 | > reusable package, where explicit rules can be independently defined and
|
13 | 16 | > managed.
|
14 | 17 |
|
15 | 18 | `archetypes-rules` models Boolean logic. Instead of writing conditionals like
|
16 |
| -<samp>if / else if / else</samp>, you can instead create Rules that describe |
17 |
| -Facts, and then evaluate RuleContexts against them. |
| 19 | +<samp>if / else if / else</samp>, you can instead create Rules that describe and |
| 20 | +evaluate Facts (aka, RuleContexts). |
18 | 21 |
|
19 | 22 | ## Table of Contents
|
20 | 23 |
|
@@ -68,12 +71,18 @@ facts conform to the defined `Rule`.
|
68 | 71 | [Reverse Polish Notation (RPN)](https://en.wikipedia.org/wiki/Reverse_Polish_notation).
|
69 | 72 | See the examples below for details.
|
70 | 73 |
|
| 74 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 75 | +[toc]][toc-anchor]</small> |
| 76 | + |
71 | 77 | ## 2. Installation
|
72 | 78 |
|
73 | 79 | ```sh
|
74 | 80 | npm install archetypes-rules
|
75 | 81 | ```
|
76 | 82 |
|
| 83 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 84 | +[toc]][toc-anchor]</small> |
| 85 | + |
77 | 86 | ## 3. Usage
|
78 | 87 |
|
79 | 88 | ### 3.1. Example 1: Is this customer eligible for a discount?
|
@@ -200,37 +209,97 @@ fact
|
200 | 209 | // ), value = true
|
201 | 210 | ```
|
202 | 211 |
|
| 212 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 213 | +[toc]][toc-anchor]</small> |
| 214 | + |
203 | 215 | ## 4. Maintainers
|
204 | 216 |
|
205 | 217 | [@gregswindle](https://github.com/gregswindle)
|
206 | 218 |
|
207 |
| -> ![Information for Maintainers][octicon-info] The |
| 219 | +> ![Information for Maintainers][octicon-book] The |
208 | 220 | > [Maintainer Guide](./docs/maintainer-guide/README.md) describes how we develop
|
209 | 221 | > and release **archetype-rules** (and has useful information for Maintainers
|
210 | 222 | > and Trusted Committers).
|
211 | 223 |
|
| 224 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 225 | +[toc]][toc-anchor]</small> |
| 226 | + |
212 | 227 | ## 5. Contributions
|
213 | 228 |
|
214 |
| -We gratefully accept Pull Requests! Here's what you need to know to get started. |
| 229 | +[](https://github.com/commonality/archetypes-rules/graphs/contributors) |
| 230 | +[](https://github.com/commonality/archetypes-rules) |
| 231 | +[](https://github.com/commonality/archetypes-rules/network) |
| 232 | +[](https://greenkeeper.io/) |
| 233 | + |
| 234 | +![Gratitude][octicon-heart] We gratefully accept Pull Requests. Here's what you |
| 235 | +need to know to get started. |
215 | 236 |
|
216 |
| -> ![Before submitting a Pull Request, please read][octicon-heart] Before |
217 |
| -> submitting a Pull Request, please read our: |
218 |
| -> |
219 |
| -> - [Code of Conduct](CODE_OF_CONDUCT.md) |
220 |
| -> - [Contributing Aggreement](CONTRIBUTING.md) |
221 |
| -> - [Developer Guide](docs/developer-guide#README.md) |
222 |
| -> - [Maintainer/Trusted Committer Guide](docs/maintainer-guide#readme) |
223 |
| -> - [Architecture Decision Records](docs/adr#readme) |
| 237 | +Before submitting a Pull Request, please read our: |
| 238 | + |
| 239 | +- [Code of Conduct](CODE_OF_CONDUCT.md) |
| 240 | +- [Contributing Aggreement](CONTRIBUTING.md) |
| 241 | +- [Developer Guide](docs/developer-guide#README.md) |
| 242 | +- [Maintainer/Trusted Committer Guide](docs/maintainer-guide#readme) |
| 243 | +- [Architecture Decision Records](docs/adr#readme) |
| 244 | + |
| 245 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 246 | +[toc]][toc-anchor]</small> |
224 | 247 |
|
225 | 248 | ## 6. License
|
226 | 249 |
|
227 | 250 | [MIT](LICENSE) © 2019 Greg Swindle
|
228 | 251 |
|
| 252 | +> [![Open Source Licenses][octicon-law] View the latest **detailed legal |
| 253 | +> NOTICE** report |
| 254 | +> ![This link will take you to another Web site][octicon-link-external]][fossa-legal-notice-url]. |
| 255 | +
|
| 256 | +[](https://app.fossa.com/projects/custom%2B804%2Fgithub.com%2Fcommonality%2Farchetypes-rules?ref=badge_large) |
| 257 | + |
| 258 | +<small>[![Back to Table of contents][octicon-triangle-up] |
| 259 | +[toc]][toc-anchor]</small> |
| 260 | + |
229 | 261 | <!-- ⛔️ Do not remove this line or anything under it. ⛔️ -->
|
230 | 262 |
|
231 | 263 | <!-- Link and image refs -->
|
232 | 264 |
|
| 265 | +[appveyor-image]: |
| 266 | + https://img.shields.io/appveyor/ci/commonality/archetypes-rules.svg?style=flat-square&logo=appveyor&label=windows%20build |
| 267 | +[appveyor-url]: https://ci.appveyor.com/project/commonality/archetypes-rules |
233 | 268 | [archetypes-rules-overview]: ./docs/assets/archetypes.rules-overview.png
|
| 269 | +[codacy-coverage-image]: https://img.shields. |
| 270 | +[codacy-image]: |
| 271 | + https://api.codacy.com/project/badge/Grade/bc3fdfbea2d84079b5d785b6de0886ab |
| 272 | +[codacy-url]: |
| 273 | + https://www.codacy.com/app/commonality/archetypes-rules?utm_source=github.com&utm_medium=referral&utm_content=commonality/archetypes-rules&utm_campaign=Badge_Grade |
| 274 | +[coveralls-image]: |
| 275 | + https://coveralls.io/repos/github/commonality/archetypes-rules/badge.svg?style=flat-square |
| 276 | +[coveralls-url]: https://coveralls.io/github/commonality/archetypes-rules |
| 277 | +[daviddm-image]: |
| 278 | + https://david-dm.org/commonality/archetypes-rules.svg?theme=shields.io&style=flat-square |
| 279 | +[daviddm-url]: https://david-dm.org/commonality/archetypes-rules |
| 280 | +[fossa-image]: |
| 281 | + https://app.fossa.com/api/projects/custom%2B804%2Fgithub.com%2Fcommonality%2Farchetypes-rules.svg?type=shield |
| 282 | +[fossa-legal-notice-url]: |
| 283 | + https://app.fossa.com/attribution/5895d784-6a99-4c46-961c-6aecd9414623 |
| 284 | +[fossa-url]: |
| 285 | + https://app.fossa.com/projects/custom%2B804%2Fgithub.com%2Fcommonality%2Farchetypes-rules?ref=badge_shield |
| 286 | +[license-image]: |
| 287 | + https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square |
| 288 | +[license-url]: http://opensource.org/licenses/MIT |
| 289 | +[npm-image]: https://img.shields.io/npm/v/archetypes-rules.svg?style=flat-square |
| 290 | +[npm-url]: https://npmjs.org/package/archetypes-rules |
| 291 | +[toc-anchor]: #table-of-contents |
| 292 | +[travis-image]: |
| 293 | + https://img.shields.io/travis/com/commonality/archetypes-rules.svg?branch=master&style=flat-square&label=macOS%20%7C%20ubuntu%20builds&logo=travis |
| 294 | +[travis-url]: https://travis-ci.com/commonality/archetypes-rules |
| 295 | +[vulnerabilities-image]: |
| 296 | + https://snyk.io/test/github/commonality/archetypes-rules/badge.svg?style=flat-square&targetFile=package.json |
| 297 | +[vulnerabilities-url]: |
| 298 | + https://snyk.io/test/github/commonality/archetypes-rules?targetFile=package.json |
| 299 | + |
| 300 | +daviddm-dev-image]: |
| 301 | +https://david-dm.org/commonality/archetypes-rules/dev-status.svg?theme=shields.io&style=flat-square |
| 302 | +io/codacy/coverage/c6edb2d74fca44279c24b1c4a35b8ad9.svg?style=flat-square |
234 | 303 |
|
235 | 304 | <!-- Octicon img references -->
|
236 | 305 |
|
|
0 commit comments