-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
2,541 additions
and
7,380 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,40 +1,40 @@ | ||
const path = require("path"); | ||
import { dirname, join } from "path"; | ||
import remarkGfm from "remark-gfm"; | ||
|
||
module.exports = { | ||
stories: [ | ||
"../stories/**/*.stories.mdx", | ||
"../stories/**/*.stories.@(js|jsx|ts|tsx)", | ||
], | ||
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], | ||
|
||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-a11y", | ||
"@storybook/addon-storysource", | ||
"@storybook/addon-actions", | ||
getAbsolutePath("@storybook/addon-links"), | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@storybook/addon-a11y"), | ||
getAbsolutePath("@storybook/addon-storysource"), | ||
getAbsolutePath("@storybook/addon-actions"), | ||
getAbsolutePath("@storybook/addon-mdx-gfm"), | ||
{ | ||
name: "@storybook/addon-docs", | ||
options: { | ||
mdxPluginOptions: { | ||
mdxCompileOptions: { | ||
remarkPlugins: [remarkGfm], | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
|
||
typescript: { | ||
check: false, | ||
}, | ||
core: { | ||
builder: "webpack5", | ||
}, | ||
webpackFinal: (config) => { | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
"@nightingale-elements/nightingale-new-core": path.resolve( | ||
__dirname, | ||
"../packages/nightingale-new-core/src/index.ts", | ||
), | ||
}; | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
include: path.resolve(__dirname, "../packages"), | ||
loader: "ts-loader", | ||
}); | ||
config.module.rules.push({ | ||
test: /\.(tsv)$/, | ||
type: "asset/source", | ||
}); | ||
return config; | ||
|
||
framework: { | ||
name: getAbsolutePath("@storybook/web-components-vite"), | ||
options: {}, | ||
}, | ||
|
||
docs: {}, | ||
}; | ||
|
||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} |
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ export const parameters = { | |
}, | ||
}, | ||
}; | ||
export const tags = ["autodocs"]; |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,31 @@ | ||
import { defineConfig } from "vite"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import css from "rollup-plugin-css-only"; | ||
import dts from "vite-plugin-dts"; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
{ | ||
...css(), | ||
enforce: "post", | ||
}, | ||
commonjs(), | ||
dts({ | ||
outputDir: "dist/types", | ||
}), | ||
], | ||
build: { | ||
lib: { | ||
entry: "src/index.ts", | ||
formats: ["es"], | ||
fileName: "index", | ||
}, | ||
sourcemap: true, | ||
rollupOptions: { | ||
external: (id) => /@nightingale-elements/.test(id), | ||
output: { | ||
dir: "./dist", | ||
}, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.