v0.4.2 - Changed to be used only inconjonction with stylus

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2021-03-29 13:48:50 +02:00
parent af99c13922
commit 803915999b
Signed by: Florian Bouillon
GPG Key ID: 50BD648F12C86AB6
10 changed files with 49 additions and 777 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
module/
node_modules/
*.mjs
*.js
*.d.ts
!src/stylus.d.ts
!.storybook/*.js
style.css
yarn-error.log

View File

@ -1,6 +1,6 @@
.storybook/
node_modules/
src/
*.stories.js
.gitattributes
.gitignore
.npmignore

View File

@ -2,7 +2,7 @@ const path = require("path");
module.exports = {
"stories": [
"../src/dzeio/**/*.stories.@(js|jsx|ts|tsx)",
"../src/dzeio/**/*.stories.@(ts|tsx)",
],
"addons": [
"@storybook/addon-essentials"

View File

@ -20,9 +20,6 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"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",
@ -38,7 +35,6 @@
},
"scripts": {
"storybook": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
"build-storybook": "build-storybook",
"build": "tsc && mv src/index.js src/index.mjs",
"prepublishOnly": "yarn build"
}

View File

@ -1,32 +0,0 @@
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: [
{
dir: './',
format: 'cjs',
assetFileNames: 'style.css'
},
{
file: pkg.module,
format: 'es',
assetFileNames: 'style.css'
}
]
}
];

View File

@ -3,7 +3,7 @@ import Row from '../Row'
import css from './DebugCols.module.styl'
import Col from '.'
import Col from '../Col'
enum Breakpoint {
MOBILE,

View File

@ -52,3 +52,9 @@ $success = $successLight
$danger = $errorLight
$warning = $warningLight
$darkBackground = $backgroundDark
// See https://github.com/stylus/stylus/issues/1872#issuecomment-86553717
use('stylusUtils.js')
@import '../../../../../../theme' if file-exists('../../../../../../theme.styl')

View File

@ -1,4 +1,4 @@
import Box, { BoxBody, BoxHeader, BoxWrapper } from './dzeio/Box'
import Box from './dzeio/Box'
import Button from './dzeio/Button'
import Checkbox from './dzeio/Checkbox'
import Code from './dzeio/Code'
@ -22,13 +22,8 @@ import Table from './dzeio/Table'
import Text from './dzeio/Text'
import * as Util from './dzeio/Util'
import './dzeio/general.styl'
export {
Box,
BoxBody,
BoxHeader,
BoxWrapper,
Button,
Checkbox,
Code,

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": "./module",
"declarationDir": "src",
// "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 */
@ -65,6 +65,6 @@
"exclude": [
"node_modules",
"build",
"*.stories.tsx"
"src/**/*.stories.tsx"
]
}

764
yarn.lock

File diff suppressed because it is too large Load Diff