Moved types to the module folder

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-03-15 17:23:04 +01:00
parent 3a908ccce0
commit 8b12c56fe7
5 changed files with 730 additions and 958 deletions

View File

@ -18,7 +18,7 @@ module.exports = {
});
newConfig.resolve.extensions.push('.ts', '.tsx');
// SCSS
// Stylus
newConfig.module.rules.push({
test: /\.styl$/,
use: ['style-loader', {

View File

@ -4,13 +4,11 @@
"license": "MIT",
"main": "./index.js",
"module": "./module/index.js",
"types": "./types/index.d.ts",
"dependencies": {},
"types": "./module/index.d.ts",
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/preset-env": "^7.12.16",
"@babel/preset-react": "^7.12.13",
"@rollup/plugin-typescript": "^8.2.0",
"@storybook/addon-essentials": "^6.1.14",
"@storybook/cli": "^6.1.14",
"@storybook/react": "^6.1.14",
@ -25,6 +23,7 @@
"react-feather": "^2.0.9",
"rollup": "^2.39.0",
"rollup-plugin-styles": "^3.14.1",
"rollup-plugin-typescript2": "^0.30.0",
"style-loader": "^2.0.0",
"stylus": "^0.54.8",
"stylus-loader": "^4.3.3",
@ -41,7 +40,7 @@
"scripts": {
"storybook": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
"build-storybook": "build-storybook",
"build": "tsc && rollup --config",
"build": "rollup --config",
"prepublishOnly": "yarn build"
}
}

View File

@ -1,4 +1,4 @@
import typescript from '@rollup/plugin-typescript';
import typescript from 'rollup-plugin-typescript2';
import styles from 'rollup-plugin-styles'
import pkg from './package.json';
@ -14,7 +14,7 @@ export default [
mode: 'extract',
}),
typescript(), // so Rollup can convert TypeScript to JavaScript
typescript({useTsconfigDeclarationDir: true}), // so Rollup can convert TypeScript to JavaScript
],
output: [
{

View File

@ -11,7 +11,7 @@
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"declarationDir": "types",
"declarationDir": "./module",
// "outDir": "./dist", /* Redirect output structure to the directory. */
// "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */

1673
yarn.lock

File diff suppressed because it is too large Load Diff