sunpeak 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/template/src/App.tsx
CHANGED
package/template/tsconfig.json
CHANGED
|
@@ -22,12 +22,7 @@
|
|
|
22
22
|
"declarationMap": true,
|
|
23
23
|
"sourceMap": true,
|
|
24
24
|
|
|
25
|
-
"baseUrl": "."
|
|
26
|
-
"paths": {
|
|
27
|
-
"sunpeak": ["../src/index.ts"],
|
|
28
|
-
"sunpeak/*": ["../src/*"],
|
|
29
|
-
"~/*": ["../src/*"]
|
|
30
|
-
}
|
|
25
|
+
"baseUrl": "."
|
|
31
26
|
},
|
|
32
27
|
"include": ["src", "dev"],
|
|
33
28
|
"references": [{ "path": "./tsconfig.node.json" }]
|
|
@@ -4,6 +4,10 @@ import path from 'path';
|
|
|
4
4
|
import tailwindcss from '@tailwindcss/vite';
|
|
5
5
|
import { readFileSync, writeFileSync, unlinkSync, existsSync } from 'fs';
|
|
6
6
|
|
|
7
|
+
// Check if we're in the sunpeak workspace (directory is named "template")
|
|
8
|
+
const isTemplate = path.basename(__dirname) === 'template';
|
|
9
|
+
const parentSrc = path.resolve(__dirname, '../src');
|
|
10
|
+
|
|
7
11
|
// Plugin to inline CSS into the JS bundle
|
|
8
12
|
function inlineCssPlugin() {
|
|
9
13
|
return {
|
|
@@ -35,8 +39,11 @@ export default defineConfig({
|
|
|
35
39
|
},
|
|
36
40
|
resolve: {
|
|
37
41
|
alias: {
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
// In workspace dev mode, use local sunpeak source
|
|
43
|
+
...(isTemplate && {
|
|
44
|
+
'sunpeak': parentSrc,
|
|
45
|
+
'~': parentSrc,
|
|
46
|
+
}),
|
|
40
47
|
},
|
|
41
48
|
conditions: ['style', 'import', 'module', 'browser', 'default'],
|
|
42
49
|
},
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { defineConfig } from 'vitest/config';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
+
// Check if we're in the sunpeak workspace (directory is named "template")
|
|
5
|
+
const isTemplate = path.basename(__dirname) === 'template';
|
|
6
|
+
const parentSrc = path.resolve(__dirname, '../src');
|
|
7
|
+
|
|
4
8
|
export default defineConfig({
|
|
5
9
|
test: {
|
|
6
10
|
globals: true,
|
|
@@ -9,8 +13,11 @@ export default defineConfig({
|
|
|
9
13
|
},
|
|
10
14
|
resolve: {
|
|
11
15
|
alias: {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
// In workspace dev mode, use local sunpeak source
|
|
17
|
+
...(isTemplate && {
|
|
18
|
+
'sunpeak': parentSrc,
|
|
19
|
+
'~': parentSrc,
|
|
20
|
+
}),
|
|
14
21
|
},
|
|
15
22
|
},
|
|
16
23
|
});
|