forked from shukerullah/react-geocode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP20200108 - Added type definition build step to package lib, (SEE: s…
- Loading branch information
1 parent
b2d82bf
commit eea7b59
Showing
4 changed files
with
133 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
|
||
const config = { | ||
"comments": false | ||
} | ||
|
||
const presets = [ | ||
["minify", { | ||
"mangle": false, | ||
"keepFnName": true | ||
}], | ||
["@babel/preset-env", { | ||
"targets": { | ||
"esmodules": true | ||
}, | ||
"modules": "cjs" | ||
}], | ||
"@babel/preset-typescript" | ||
]; | ||
|
||
const plugins = [ | ||
["@babel/plugin-proposal-class-properties", { "loose": false }] | ||
]; | ||
|
||
return { | ||
...config, | ||
presets, | ||
plugins | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
{ | ||
"name": "react-geocode", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A module to transform a description of a location (i.e. street address, town name, etc.) into geographic coordinates (i.e. latitude and longitude) and vice versa.", | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"author": "Pir Shukarulalh Shah <[email protected]> (http://www.shukarullah.com)", | ||
"contributors": [ | ||
{ | ||
"name": "Mike Pouncy", | ||
"url": "https://github.com/pouncyisdead/" | ||
} | ||
], | ||
"license": "MIT", | ||
"homepage": "https://github.com/shukerullah/react-geocode#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/shukerullah/react-geocode.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/shukerullah/react-geocode/issues" | ||
}, | ||
"keywords": [ | ||
"google", | ||
"geocode", | ||
"geocoder", | ||
"geocoding" | ||
], | ||
"author": "Pir Shukarulalh Shah <[email protected]> (http://www.shukarullah.com)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/shukerullah/react-geocode/issues" | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:types && npm run build:js", | ||
"build:js": "babel src -d lib --extensions '.js'", | ||
"build:types": "tsc --emitDeclarationOnly" | ||
}, | ||
"homepage": "https://github.com/shukerullah/react-geocode#readme", | ||
"dependencies": { | ||
"regenerator-runtime": "^0.13.3" | ||
} | ||
"devDependencies": { | ||
"@babel/cli": "^7.7.7", | ||
"@babel/core": "^7.7.7", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/preset-env": "^7.7.7", | ||
"@babel/preset-typescript": "^7.7.7", | ||
"babel-preset-minify": "^0.5.1", | ||
"typescript": "^3.7.4" | ||
}, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
{ | ||
"compilerOptions": { /* Enable incremental compilation */ | ||
"target": "ES5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, | ||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | ||
"lib": [ "ES2015", "DOM" ] /* Specify library files to be included in the compilation. */, | ||
"allowJs": true /* Allow javascript files to be compiled. */, | ||
"checkJs": true /* Report errors in .js files. */, | ||
"declaration": true /* Generates corresponding '.d.ts' file. */, | ||
"noEmit": false /* Do not emit outputs. */, | ||
"strict": true /* Enable all strict type-checking options. */, | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, | ||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, | ||
"outDir": "lib/" | ||
} | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "commonjs", | ||
"lib": ["ES2015", "DOM"], | ||
"baseUrl": "./src", | ||
"outDir": "./lib", | ||
"declaration": true, | ||
"noEmit": false, | ||
"sourceMap": false, | ||
"importHelpers": false, | ||
"allowJs": true, | ||
"checkJs": true, | ||
"strict": true, | ||
"alwaysStrict": true, | ||
"strictNullChecks": true, | ||
"esModuleInterop": true, | ||
"removeComments": true, | ||
"allowSyntheticDefaultImports": true, | ||
"allowUnreachableCode": false, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"exclude": ["lib", "node_modules", "babel.config.js"], | ||
} |