Skip to content

Commit

Permalink
remove csv as production dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
regevbr committed Aug 20, 2019
1 parent 5a49e90 commit 61c93e9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ yarn add country-ip-spoofer
Before you begin, you need to prepare the data set to be used by the module (only perform once).

Please download the `IPV4 CSV` file from [IP2Location™](https://lite.ip2location.com/database/ip-country) and run
the following temp script:
the following temp script (install the `csv` package if it is missing - you can delete it later):

```typescript
import {createDataTable} from 'country-ip-spoofer';
import {createDataTable} from 'country-ip-spoofer/dataTableCreator';

const csfFile = 'path to the downloaded csv file';
const outputFile = 'path to output the data set';
Expand Down
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "country-ip-spoofer",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generates random ip that belongs to a desired country",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -49,9 +49,8 @@
"tempfile": "^3.0.0",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typescript": "^3.5.3"
},
"dependencies": {
"typescript": "^3.5.3",
"csv": "^4.0.0"
}
},
"dependencies": {}
}
3 changes: 2 additions & 1 deletion src/example/example.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import {getIpOfCountry, setDataTable, createDataTable, DataTable} from '../';
import {getIpOfCountry, setDataTable, DataTable} from '../';
import {createDataTable} from '../dataTableCreator';
import * as request from 'request';
import * as fs from 'fs';

Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {numberToIp} from './numberToIp';
import {DataTable, IIpRange} from './types';

export * from './types';
export {createDataTable} from './dataTableCreator';

let dataTable: DataTable | undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/test/dataTableCreator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as fs from 'fs';
import tempFile = require('tempfile');
import {expect} from 'chai';
import {createDataTable} from '../';
import {createDataTable} from '../dataTableCreator';
import {DataTable} from '../types';

describe('data table creator', () => {
Expand Down

0 comments on commit 61c93e9

Please sign in to comment.