-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dx): improve & simplify the build processes
- Loading branch information
1 parent
9ac1116
commit 0d8aa5d
Showing
18 changed files
with
105 additions
and
72 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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
import { buildComposables as stacks } from '..' | ||
|
||
export default defineBuildConfig(stacks(['../../../packages/composables/index'])) |
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,28 @@ | ||
import type { UserConfig } from '../../stacks' | ||
import { Stacks, alias, defineConfig, buildWebComponents as webComponents } from '../../stacks' | ||
|
||
// https://vitejs.dev/config/ | ||
const config: UserConfig = { | ||
resolve: { | ||
dedupe: ['vue'], | ||
alias, | ||
}, | ||
|
||
optimizeDeps: { | ||
exclude: ['vue', '@vueuse/core', 'unocss/vite'], | ||
}, | ||
|
||
plugins: [ | ||
Stacks(), | ||
], | ||
|
||
build: webComponents(), | ||
} | ||
|
||
export default defineConfig(({ command }) => { | ||
if (command === 'serve') | ||
return config | ||
|
||
// command === 'build' | ||
return config | ||
}) |
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
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
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,10 +1,21 @@ | ||
/** | ||
* Ensure these values are updated to match your component library. | ||
* The environment variables. | ||
* | ||
* Please note: these values may be updated at any time, but if you update the "library name," | ||
* you most likely will create a new npm package on future releases/updates. | ||
*/ | ||
export const ORGANIZATION_NAME = '@ow3' | ||
export const LIBRARY_NAME = 'hello-world' | ||
export const VITE_PLUGIN_NAME = 'vite-plugin-stacks' | ||
export const CLASS_TRIGGER = ':stacks:' | ||
export const CLASS_PREFIX = 'stacks-' | ||
|
||
/** | ||
* We suggest these not be updated unless you have a very strong, specific reason for it. | ||
* Naming conventions are complicated, yet important to get right as a developer of shared code bases. | ||
*/ | ||
export const VUE_PACKAGE_NAME = `${LIBRARY_NAME}-vue` | ||
export const VUE_NPM_PACKAGE_NAME = `${ORGANIZATION_NAME}/${VUE_PACKAGE_NAME}` | ||
export const WEB_COMPONENTS_PACKAGE_NAME = `${LIBRARY_NAME}-elements` | ||
export const WEB_COMPONENTS_NPM_PACKAGE_NAME = `${ORGANIZATION_NAME}/${WEB_COMPONENTS_PACKAGE_NAME}` | ||
export const COMPOSABLE_PACKAGE_NAME = `${LIBRARY_NAME}-composable` | ||
export const CLASS_TRIGGER = ':stacks:' | ||
export const CLASS_PREFIX = 'stacks-' | ||
export const COMPOSABLE_NPM_PACKAGE_NAME = `${ORGANIZATION_NAME}/${COMPOSABLE_PACKAGE_NAME}` |
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.