diff --git a/.gitignore b/.gitignore index 42a5a4c..d55e209 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ .idea/ docs/ -coverage/ \ No newline at end of file +coverage/ +output/ diff --git a/README.md b/README.md index 80a5179..082d5c7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a simple coupon creation project using NodeJS. [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yusufshakeel/couponjs) -[![npm version](https://img.shields.io/badge/npm-0.8.17-blue.svg)](https://www.npmjs.com/package/couponjs) +[![npm version](https://img.shields.io/badge/npm-0.8.18-blue.svg)](https://www.npmjs.com/package/couponjs) [![Build Status](https://travis-ci.com/yusufshakeel/couponjs.svg?branch=master)](https://travis-ci.com/yusufshakeel/couponjs) [![Coverage Status](https://coveralls.io/repos/github/yusufshakeel/couponjs/badge.svg?branch=master)](https://coveralls.io/github/yusufshakeel/couponjs?branch=master) @@ -684,6 +684,8 @@ To check performance run the following command in the terminal. > npm run performance ``` +Performance will be recorded in `output/PERFORMANCE.md` file. + ## License It's free :smiley: diff --git a/package-lock.json b/package-lock.json index 9f367da..f9d4ea2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "couponjs", - "version": "0.8.17", + "version": "0.8.18", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b11e891..82009fb 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "couponjs", - "version": "0.8.17", + "version": "0.8.18", "description": "This is a simple coupon creation project using NodeJS.", "main": "index.js", "scripts": { + "project:init": "mkdir -p output && npm i && npm run test", "test": "jest -c jest.config.json", "generate-docs": "npx jsdoc -c jsdocs.config.json", "lint": "npx eslint -c .eslintrc.json ./index.js ./app ./tests ./performance", diff --git a/performance/index.js b/performance/index.js index 7a20217..8d7191f 100644 --- a/performance/index.js +++ b/performance/index.js @@ -4,14 +4,14 @@ const fs = require('fs'); const CouponJS = require('../index.js'); const { startSection } = require('./template.js'); -const maxCoupons = [1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 5e6]; +const maxCoupons = [1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6]; -const couponLengths = [6, 8, 12, 16]; +const couponLengths = [6, 8, 12, 16, 20]; const roundNumbers = [1, 2, 3]; const performanceMdData = { - file: './PERFORMANCE.md', + file: './output/PERFORMANCE.md', timestamp: new Date().toISOString(), divider: '============================================================' };