Skip to content

Commit

Permalink
fix: repair build and package export
Browse files Browse the repository at this point in the history
  • Loading branch information
plc-dev committed Sep 13, 2024
1 parent 4e7f4f9 commit 2ed75f1
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 17 deletions.
11 changes: 7 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
'extends': [
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting",
"plugin:storybook/recommended"
],
parserOptions: {
ecmaVersion: 'latest'
ecmaVersion: "latest",
ecmaFeatures: {
jsx: false
}
}
}
};
7 changes: 5 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carpet-component-library",
"version": "0.0.4",
"version": "0.0.5",
"author": "Paul Christ",
"files": [
"dist",
Expand All @@ -13,16 +13,22 @@
"component",
"library"
],
"main": "./dist/carpet-component-library.umd.cjs",
"module": "./dist/carpet-component-library.js",
"type": "module",
"main": "dist/carpet-component-library.umd.cjs",
"exports": {
".": {
"import": "./dist/carpet-component-library.js",
"require": "./dist/carpet-component-library.umd.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/carpet-component-library.js"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/carpet-component-library.umd.cjs"
}
},
"./style.css": "./dist/style.css"
},
"types": "./dist/index.d.ts",
"types": "dist/index.d.ts",
"engines": {
"node": "22.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/DOTGraph/DOTGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const renderGraph = (description: string) => {
const renderIfGraph = () => {
let dotDescription = "";
if (component.validate()) {
dotDescription = <string>getDOTDescription();
dotDescription = (<string>getDOTDescription()) as string;
}
renderGraph(dotDescription);
};
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"baseUrl": ".",
"outDir": "dist",
"declaration": true
}
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
}
],
"compilerOptions": {
"composite": true,
"outDir": "dist",
"declaration": true
"declaration": true,
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["src/App.vue", "src/main.ts"]
}
3 changes: 3 additions & 0 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"paths": {
"@/*": ["./src/*"]
},

"module": "ESNext",
"moduleResolution": "Bundler",
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.vitest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
"paths": {
"@/*": ["./src/*"]
},

"lib": [],
"types": ["node", "jsdom"]
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import dts from "vite-plugin-dts";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueDevTools(), dts({ insertTypesEntry: true })],
plugins: [vue(), vueDevTools(), dts({ tsconfigPath: "./tsconfig.app.json", rollupTypes: true })],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url))
Expand Down

0 comments on commit 2ed75f1

Please sign in to comment.