Skip to content

Commit

Permalink
Merge branch 'release/3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
georgique committed Oct 18, 2024
2 parents 526de98 + bdf46b3 commit 6147872
Show file tree
Hide file tree
Showing 12 changed files with 16,819 additions and 11,243 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
Expand All @@ -25,7 +25,7 @@ jobs:
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
Expand Down
5 changes: 5 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// @ts-ignore
module.exports = (grunt) => {

grunt.initConfig({
vars: {
srcPath: './',
Expand Down Expand Up @@ -33,6 +35,7 @@ module.exports = (grunt) => {
command: 'git log $(git describe --tags --abbrev=0)..HEAD --format="* %s (%h) by %aN;" --no-merges',
options: {
stdout: false,
// @ts-ignore
callback: function (err, stdout, stderr, cb) {
grunt.option('history', stdout);
cb();
Expand Down Expand Up @@ -67,6 +70,7 @@ module.exports = (grunt) => {

var changelog = grunt.file.read(changelogPath);
if (changelog.match(regex)) {
// @ts-ignore
changelog = changelog.replace(regex, function(match, p1, p2, offset, string, groups) {
return [
groups.title,
Expand All @@ -88,6 +92,7 @@ module.exports = (grunt) => {
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date + ' ' + time;
// @ts-ignore
grunt.log.ok(dateTime['green']);
});

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ JSON files can be read from the directory in which the package was downloaded.
Node.js applications can use the provided helper functions to synchronously load the JSON as a JavaScript object.

```javascript
const geoJson = require('world-geojson') // or `import geoJson from 'world-geojson'`
const geoJson = require('world-geojson') // or `import * as geoJson from 'world-geojson'`

geoJson.forCountry('Antigua & Barbuda') // returns the contents of /countries/antigua_and_barbuda.json
geoJson.forState('Australia', 'New South Wales') // returns the contents of /states/australia/new_south_wales.json
geoJson.forCountry('Antigua & Barbuda'); // returns the contents of /countries/antigua_and_barbuda.json
geoJson.forState('Australia', 'New South Wales'); // returns the contents of /states/australia/new_south_wales.json
geoJson.forArea('U.S.A.', 'U.S. Virgin Islands'); // returns the contents of /areas/usa/us_virgin_islands.json
geoJson.forCountry('abcd') // returns `null`

// Combine multiple GeoJSONs into one
const combined = geoJson.combineGeoJson([
{countryName: 'Antigua & Barbuda'},
{countryName: 'Australia', stateName: 'New South Wales'},
{countryName: 'U.S.A.', areaName: 'U.S. Virgin Islands'}
]);

```

## Countries (release 1.0)
Expand Down
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const presets = ["@babel/preset-flow"];
export const plugins = ["@babel/plugin-syntax-flow"];
Loading

0 comments on commit 6147872

Please sign in to comment.