@streetcredlabs/categories
Advanced tools
Comparing version 2.3.2 to 3.0.0
{ | ||
"name": "@streetcredlabs/categories", | ||
"version": "2.3.2", | ||
"version": "3.0.0", | ||
"description": "JS utility wrapper for places category taxonomy", | ||
@@ -14,13 +14,12 @@ "repository": { | ||
"main": "dist/bundle.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "NODE_ENV=test jest", | ||
"test": "tslint -p . && NODE_ENV=test jest", | ||
"test-watch": "NODE_ENV=test jest --watch", | ||
"start": "ROLLUP_WATCH=true rollup -c --watch", | ||
"build": "rollup -c" | ||
"build": "rollup -c", | ||
"release": "./release.sh" | ||
}, | ||
"jest": { | ||
"testURL": "http://localhost/" | ||
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"*.ts": [ | ||
"prettier --write", | ||
@@ -33,14 +32,25 @@ "git add" | ||
"devDependencies": { | ||
"@types/jest": "^24.0.11", | ||
"@types/lodash.camelcase": "^4.3.6", | ||
"@types/lodash.isempty": "^4.4.6", | ||
"@types/lodash.isobjectlike": "^4.0.6", | ||
"@types/lodash.isstring": "^4.0.6", | ||
"@types/lodash.xor": "^4.5.6", | ||
"babel-plugin-external-helpers": "6.22.0", | ||
"babel-preset-es2015": "6.24.1", | ||
"husky": "1.0.0-rc.13", | ||
"jest": "23.4.2", | ||
"jest": "24.5.0", | ||
"lint-staged": "7.2.0", | ||
"prettier": "1.14.0", | ||
"rollup": "0.63.4", | ||
"rollup-plugin-babel": "3.0.7", | ||
"rollup-plugin-commonjs": "9.1.4", | ||
"rollup": "1.7.3", | ||
"rollup-plugin-commonjs": "^9.2.2", | ||
"rollup-plugin-json": "3.0.0", | ||
"rollup-plugin-node-resolve": "3.3.0", | ||
"rollup-plugin-uglify": "4.0.0" | ||
"rollup-plugin-typescript2": "^0.20.1", | ||
"rollup-plugin-uglify": "4.0.0", | ||
"ts-jest": "24.0.0", | ||
"tslib": "1.9.3", | ||
"tslint": "^5.14.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "3.3.4000" | ||
}, | ||
@@ -52,5 +62,17 @@ "husky": { | ||
}, | ||
"jest": { | ||
"testURL": "http://localhost", | ||
"preset": "ts-jest", | ||
"testEnvironment": "node" | ||
}, | ||
"files": [ | ||
"dist/" | ||
] | ||
], | ||
"dependencies": { | ||
"lodash.camelcase": "^4.3.0", | ||
"lodash.isempty": "^4.4.0", | ||
"lodash.isobjectlike": "^4.0.0", | ||
"lodash.isstring": "^4.0.1", | ||
"lodash.xor": "^4.5.0" | ||
} | ||
} |
@@ -48,6 +48,7 @@ # Categories [![Build Status](https://travis-ci.com/streetcredlabs/categories.svg?token=kd4tyu6APW8yEuYYcqLi&branch=master)](https://travis-ci.com/streetcredlabs/categories) | ||
### dump | ||
Returns the entire categories array. | ||
```JavaScript | ||
import { dump } from '@streetcredlabs/categories'; | ||
import { dump } from "@streetcredlabs/categories"; | ||
const categories = dump(); | ||
@@ -68,4 +69,14 @@ ``` | ||
------------------- | ||
### getCompleteness | ||
Determines how complete a place is based on our scoring system. | ||
```javascript | ||
import { getCompleteness } from '@streetcredlabs/categories'; | ||
const place = funcThatGetsAStandardPlaceObj(); | ||
console.log(getCompleteness(place)); // 0.75 | ||
``` | ||
--- | ||
# Contributing to this project | ||
@@ -85,4 +96,2 @@ | ||
yarn | ||
or | ||
npm i | ||
``` | ||
@@ -94,18 +103,14 @@ | ||
yarn test-watch | ||
or | ||
npm run test-watch | ||
``` | ||
#### Run tests once: | ||
```bash | ||
yarn test | ||
or | ||
npm run test | ||
``` | ||
### Run build and watch for changes: | ||
```JavaScript | ||
```bash | ||
yarn start | ||
or | ||
npm run start | ||
``` | ||
@@ -115,6 +120,18 @@ | ||
```JavaScript | ||
```bash | ||
yarn build | ||
or | ||
npm run build | ||
``` | ||
## Releasing | ||
Release a new version of this module based off the version in `package.json`. **Note** you will need to have publish access to the `streetcredlabs` npm account and be authenticated. | ||
```bash | ||
yarn release | ||
``` | ||
The script does a few things: | ||
- Builds the `dist` version with `yarn build` (⚠️ _NOTE: This needs improvement. Right now, if this results in changes, they won't be committed and it could be weird_) | ||
- Creates a new git tag from the `package.json` version | ||
- Attempts to publish to npm with `npm publish` |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193235
10
782
133
5
23
+ Addedlodash.camelcase@^4.3.0
+ Addedlodash.isempty@^4.4.0
+ Addedlodash.isobjectlike@^4.0.0
+ Addedlodash.isstring@^4.0.1
+ Addedlodash.xor@^4.5.0
+ Addedlodash.camelcase@4.3.0(transitive)
+ Addedlodash.isempty@4.4.0(transitive)
+ Addedlodash.isobjectlike@4.0.0(transitive)
+ Addedlodash.isstring@4.0.1(transitive)
+ Addedlodash.xor@4.5.0(transitive)