mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-22 10:52:16 +00:00
Changed back to prebuilt but this time it will build on install to allow theme.styl
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
6c2b3466ba
commit
2569db42f8
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,6 +4,8 @@ node_modules/
|
||||
*.js
|
||||
!src/dzeio/stylusUtils.js
|
||||
*.d.ts
|
||||
types/
|
||||
!rollup.config.js
|
||||
!src/stylus.d.ts
|
||||
!.storybook/*.js
|
||||
style.css
|
||||
|
20
package.json
20
package.json
@ -2,8 +2,8 @@
|
||||
"name": "@dzeio/components",
|
||||
"version": "0.5.2",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.mjs",
|
||||
"types": "./src/index.d.ts",
|
||||
"main": "./index.mjs",
|
||||
"types": "./types/index.d.ts",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/preset-env": "^7.12.16",
|
||||
@ -21,10 +21,8 @@
|
||||
"react-dom": "^17.0.1",
|
||||
"react-feather": "^2.0.9",
|
||||
"style-loader": "^2.0.0",
|
||||
"stylus": "^0.54.8",
|
||||
"stylus-loader": "^4.3.3",
|
||||
"ts-loader": "^8.0.17",
|
||||
"typescript": "^4.1.3",
|
||||
"webpack": "^4.44.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@ -34,8 +32,16 @@
|
||||
"react-feather": "^2.0.9"
|
||||
},
|
||||
"scripts": {
|
||||
"storybook": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
|
||||
"build": "tsc && mv src/index.js src/index.mjs",
|
||||
"prepublishOnly": "yarn build"
|
||||
"dev": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
|
||||
"build": "rollup --config",
|
||||
"prepublishOnly": "yarn build",
|
||||
"postinstall": "rollup --config"
|
||||
},
|
||||
"dependencies": {
|
||||
"rollup": "^2.44.0",
|
||||
"rollup-plugin-styles": "^3.14.1",
|
||||
"rollup-plugin-typescript2": "^0.30.0",
|
||||
"stylus": "^0.54.8",
|
||||
"typescript": "^4.2.3"
|
||||
}
|
||||
}
|
||||
|
27
rollup.config.js
Normal file
27
rollup.config.js
Normal file
@ -0,0 +1,27 @@
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import styles from 'rollup-plugin-styles'
|
||||
import pkg from './package.json';
|
||||
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.ts',
|
||||
external: ['ms'],
|
||||
plugins: [
|
||||
styles({
|
||||
modules: true,
|
||||
url: false,
|
||||
autoModules: true,
|
||||
mode: 'extract',
|
||||
|
||||
}),
|
||||
typescript({useTsconfigDeclarationDir: true}), // so Rollup can convert TypeScript to JavaScript
|
||||
],
|
||||
output: [
|
||||
{
|
||||
file: pkg.main,
|
||||
format: 'es',
|
||||
assetFileNames: 'style.css'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
@ -1,3 +1,9 @@
|
||||
/**
|
||||
* Copyright (c) 2021
|
||||
*
|
||||
* @summary DZEIO Component Library
|
||||
*/
|
||||
|
||||
import Box from './dzeio/Box'
|
||||
import Button from './dzeio/Button'
|
||||
import Checkbox from './dzeio/Checkbox'
|
||||
|
@ -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": "src",
|
||||
"declarationDir": "types",
|
||||
// "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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user