Skip to content

Commit

Permalink
🎉Release v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBoy committed May 24, 2018
1 parent 3416d23 commit 624d3bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 624d3bf

Please sign in to comment.