Skip to content

Commit b2753b2

Browse files
committed
build: switch to unjs/unbuild
1 parent 351c12d commit b2753b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1088
-1498
lines changed

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

build.config.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import fs from 'fs-extra'
2+
import sass from 'sass'
3+
import { defineBuildConfig } from 'unbuild'
4+
5+
export default defineBuildConfig({
6+
entries: [
7+
{ builder: 'mkdist', input: './src', pattern: ['**/*.vue'], loaders: ['vue'] },
8+
{ builder: 'mkdist', input: './src', pattern: ['**/*.ts'], format: 'cjs', loaders: ['js'] },
9+
{ builder: 'mkdist', input: './src', pattern: ['**/*.ts'], format: 'esm', loaders: ['js'] },
10+
],
11+
hooks: {
12+
'mkdist:done': () => {
13+
const compiledSass = sass.compile('./src/sass/formkit-primevue.scss', { style: 'compressed', loadPaths: ['./node_modules/'] })
14+
15+
fs.writeFileSync(
16+
'dist/style.css',
17+
compiledSass.css,
18+
{ encoding: 'utf-8' },
19+
)
20+
21+
fs.mkdirSync('dist/sass')
22+
fs.copyFileSync(
23+
'src/sass/formkit-primevue.scss',
24+
'dist/sass/formkit-primevue.scss',
25+
26+
)
27+
},
28+
},
29+
declaration: true,
30+
clean: true,
31+
})

src/App.scss renamed to dev/App.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "public/sass/formkit-primevue";
1+
@import "../src/sass/formkit-primevue";
22

33
html {
44
height: 100%;

src/App.vue renamed to dev/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import AppTopBar from '@/components/app/AppTopbar.vue'
3+
import AppFooter from '@/components/app/AppFooter.vue'
34
</script>
45

56
<template>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)