Skip to content

Commit

Permalink
chore: add unbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
varugasu committed Sep 5, 2023
1 parent d11efbf commit d3a73a2
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
dist/
2 changes: 1 addition & 1 deletion packages/vue-shining-text/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist/
./dist/
19 changes: 19 additions & 0 deletions packages/vue-shining-text/build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineBuildConfig } from "unbuild";

export default defineBuildConfig({
entries: [
{
builder: "mkdist",
input: "src/",
outDir: "dist/",
},
{
builder: "mkdist",
input: "src/",
outDir: "dist/",
format: "cjs",
},
],
declaration: true,
clean: true,
});
4 changes: 2 additions & 2 deletions packages/vue-shining-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"require": "./dist/index.js"
}
},
"main": "./dist/index.cjs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<template>
Hello World
</template>

3 changes: 2 additions & 1 deletion packages/vue-shining-text/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./ShiningText.vue";
import ShiningText from "./components/ShiningText.vue";
export { ShiningText };
4 changes: 2 additions & 2 deletions playground/vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import { ShiningText } from "vue-shining-text"
</script>

<template>
hi
<ShiningText />
</template>

<style>
Expand Down

0 comments on commit d3a73a2

Please sign in to comment.