From 624d3bfb1b5f0ed7a1d93e80b7d8e51eb35ac1a4 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 24 May 2018 18:34:24 +0800 Subject: [PATCH] :tada:Release v1.0.4 --- README.md | 20 ++++++++++++++++++++ package.json | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1685b4d..3df39b8 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,26 @@ const newLocation = location.getCurrentAddress(); ``` +## Build your own location.json + +In case the package is not packed with the latest location data, get/clone the data from [mumuy/data_location(list.json)](https://github.com/mumuy/data_location), +and clone this repo and: + +```bash +git clone git@github.com:JasonBoy/china-location.git +cd china-location +npm run reformat -- /path/to/data_location/list.json +# and the location(.min).json will be output to ./dist dir +``` +And in your project, you can: + +```javascript +const yourNewLocation = require('path/to/location.json'); +const ChinaLocation = require('china-location'); +const location = new ChinaLocation(yourNewLocation); +//... +``` + ## LICENSE MIT diff --git a/package.json b/package.json index 48d4a7b..c4821df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "china-location", - "version": "1.0.3", + "version": "1.0.4", "description": "Chinese Administrative Division information, 中国行政区划信息", "main": "dist/china-location.js", "main:next": "index.js",