Skip to content

Commit

Permalink
Fix typos, licenses details and more
Browse files Browse the repository at this point in the history
  • Loading branch information
Dah-kenangnon committed Dec 29, 2023
1 parent 39d2d3e commit 73b44f5
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 7 deletions.
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
"main": "./public/dist/bundle.js",
"description": "Benin Republic territory data for web and JS apps",
"version": "1.0.3",
"keywords": [
"Benin",
"Benin Republic",
"Territory",
"Location",
"Data",
"Cotonou",
"Porto-Novo",
"Parakou",
"Djougou",
"Bohicon",
"Kandi",
"Abomey"
],
"maintainers": [
{
"name": "Justin Y. Dah-kenangnon",
"email": "[email protected]",
"web": "https://dah-kenangnon.com",
"twitter": "https://twitter.com/dahkenangnon",
"github": "https://github.com/Dahkenangnon"
}
],
"homepage": "https://dahkenangnon.github.io/location_data_bj_js/",
"author": {
"name": "Justin Y. Dah-kenangnon",
"email": "[email protected]"
Expand Down
7 changes: 2 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BjLocationData sample </title>
<title>BjLocationData Demo </title>
<style>
/* General styles for the widget container */
#locationDataBJ-widget {
Expand Down Expand Up @@ -75,7 +74,7 @@
text-align: center;
}

/* Highlight the JSON outputed in the state element */
/* Highlight the JSON outputted in the state element */
#state {
font-family: 'Courier New', monospace;
white-space: 'break-space';
Expand Down Expand Up @@ -155,8 +154,6 @@ <h1 class="text-center">BjLocationData, javascript library</h1>
stateDiv.innerHTML = JSON.stringify(locationData);
},
});

</script>
</body>

</html>
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For raw data version, please visit [bj_location_data_raw](https://github.com/Dah
>
> Department: 12
>
> Twon: 77
> Town: 77
>
> District: 546
>
Expand Down
8 changes: 8 additions & 0 deletions src/data/departments.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/

import { IDepartment } from "../types/interfaces";

const departments : IDepartment[] = [
Expand Down
7 changes: 7 additions & 0 deletions src/data/districts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { IDistrict } from "../types/interfaces"

const districts : IDistrict[] = [
Expand Down
7 changes: 7 additions & 0 deletions src/data/neighborhoods.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { INeighborhood } from "../types/interfaces"

const neighborhoods: INeighborhood[] = [
Expand Down
7 changes: 7 additions & 0 deletions src/data/towns.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { ITown } from "../types/interfaces"

const towns: ITown[] = [
Expand Down
7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import departments from './data/departments';
import towns from './data/towns';
import districts from './data/districts';
Expand Down
10 changes: 10 additions & 0 deletions src/types/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { BjLocationData } from "./type";

/** Department is the first administrative territory division in the country */
Expand Down Expand Up @@ -28,6 +35,9 @@ export interface INeighborhood {
}


/**
* The options to provide to the widget
*/
export interface BjLocationWidgetOptions {

[key: string]: any;
Expand Down
7 changes: 7 additions & 0 deletions src/types/type.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { IDepartment, IDistrict, INeighborhood, ITown } from "./interfaces";
export type BjLocationData = (IDepartment | ITown | IDistrict | INeighborhood) & { type?: string };
export type BjLocationType = "department" | "town" | "district" | "neighborhood";
7 changes: 7 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import { townsOfDepartment, districtsOfTown, neighborhoodsOfDistrict, departmentList, townsList, districtList, neighborhoodList } from ".";
import { IDepartment, ITown, IDistrict, INeighborhood } from "./types/interfaces";
import { BjLocationType, BjLocationData } from "./types/type";
Expand Down
7 changes: 7 additions & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* @license
* Copyright Justin Dah-kenangnon - All Rights Reserved.
*
* @link https://dah-kenangnon.com
* For more details, see LICENSE.md file in root folder
*/
import {
departmentList,
townsList,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "ES6",
"module": "ESNext",
"outDir": "public/dist",
"typeRoots": ["node_modules/@types", "src/@types"],
"typeRoots": ["node_modules/@types", "src/types"],
"declaration": true,
"rootDir": "./src",
"moduleResolution": "node",
Expand Down

0 comments on commit 73b44f5

Please sign in to comment.