From 147e0f5242d65bef0a1dccf39f2e0ee6373a7154 Mon Sep 17 00:00:00 2001 From: Basile Bruneau Date: Wed, 6 May 2020 21:39:57 +0200 Subject: [PATCH] fix: module import --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e6946cd..ea5734e 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ const fs = require('fs'); const proj4 = require('proj4'); const inside = require('point-in-geopolygon'); -const geojsonWorld = JSON.parse(fs.readFileSync('./countries.geo.json', { encoding: 'utf8' })); +const geojsonWorld = JSON.parse(fs.readFileSync(__dirname + '/countries.geo.json', { encoding: 'utf8' })); const geojsonByCountry = geojsonWorld.features.reduce((countries, feature) => { countries[feature.id] = feature; return countries; diff --git a/package.json b/package.json index ba3df5a..07f8364 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "dotted-map-generator", + "name": "dotted-map", "version": "1.0.0", "description": "", "main": "index.js",