-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Typescript-ify. * Add TS to build process. * Fix build script. * Remove proptypes. * Timeout should use the return type of setTimeout, as it could be NodeJS.Timeout in node, or number in the browser. * Check for existing instance before checking for instance.target. * Fixed createInstance Element warning. * Fixed createInstance element warning (2) * Clean up package.json. * Remove prop-types from rollup config.
- Loading branch information
Showing
12 changed files
with
345 additions
and
232 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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
{ | ||
"plugins": ["@babel/plugin-proposal-class-properties"], | ||
"presets": [ | ||
["@babel/preset-env", { "modules": false }], | ||
"@babel/preset-react" | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": ["@babel/plugin-proposal-class-properties"], | ||
"env": { | ||
"test": { | ||
"plugins": ["@babel/plugin-proposal-class-properties"], | ||
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] | ||
"presets": [ | ||
["@babel/preset-env", { "targets": { "node": "current" } }] | ||
] | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
import babel from 'rollup-plugin-babel'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
|
||
const extensions = ['.js', '.jsx', '.ts', '.tsx']; | ||
|
||
export default { | ||
input: 'src/index.js', | ||
input: 'src/index.ts', | ||
output: { | ||
file: 'build/index.js', | ||
format: 'cjs', | ||
}, | ||
plugins: [ | ||
resolve({ extensions }), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
extensions, | ||
}), | ||
], | ||
external: ['countup.js', 'prop-types', 'react', 'react-dom', 'warning'], | ||
external: ['countup.js', 'react', 'react-dom', 'warning'], | ||
}; |
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
File renamed without changes.
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,24 @@ | ||
{ | ||
"compilerOptions": {/* Basic Options */ | ||
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ | ||
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ | ||
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | ||
"declaration": true, /* Generates corresponding '.d.ts' file. */ | ||
"noEmit": true, /* Do not emit outputs. */ | ||
|
||
/* Strict Type-Checking Options */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | ||
"strictNullChecks": true, /* Enable strict null checks. */ | ||
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ | ||
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ | ||
|
||
/* Additional Checks */ | ||
"noUnusedLocals": true, /* Report errors on unused locals. */ | ||
"noUnusedParameters": true, /* Report errors on unused parameters. */ | ||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ | ||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ | ||
|
||
"esModuleInterop": true, | ||
} | ||
} |
Oops, something went wrong.