@stacksjs/build 0.48.2 → 0.49.0

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/dist/pages.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  import { defineConfig } from "vite";
2
- import generateSitemap from "vite-ssg-sitemap";
3
2
  import { functionsPath, projectPath } from "@stacksjs/path";
4
3
  import { alias } from "@stacksjs/alias";
5
- import { autoImports, components, cssEngine, i18n, inspect, layouts, markdown, pages, preview, pwa, uiEngine } from "./index.mjs";
4
+ import { autoImports, components, cssEngine, inspect, layouts, markdown, pages, pwa, uiEngine } from "./index.mjs";
6
5
  export const pagesConfig = {
7
6
  root: functionsPath(),
8
7
  envDir: projectPath(),
@@ -11,26 +10,26 @@ export const pagesConfig = {
11
10
  alias
12
11
  },
13
12
  plugins: [
14
- preview(),
13
+ // preview(),
15
14
  uiEngine(),
16
15
  pages(),
17
16
  cssEngine(),
18
17
  components(),
19
18
  layouts(),
20
- i18n(),
19
+ // i18n(),
21
20
  markdown(),
22
21
  autoImports(),
23
22
  pwa(),
24
23
  inspect()
25
24
  ],
26
- ssgOptions: {
27
- script: "async",
28
- formatting: "minify",
29
- onFinished() {
30
- generateSitemap();
31
- }
32
- },
25
+ // https://github.com/antfu/vite-ssg
26
+ // ssgOptions: {
27
+ // script: 'async',
28
+ // formatting: 'minify',
29
+ // onFinished() { generateSitemap() },
30
+ // },
33
31
  ssr: {
32
+ // TODO: workaround until they support native ESM
34
33
  noExternal: ["workbox-window", /vue-i18n/]
35
34
  }
36
35
  };
package/dist/stacks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { PluginOption } from 'vite';
2
- import type { AutoImportsOptions, ComponentOptions, InspectOptions, LayoutOptions, MarkdownOptions, PagesOptions, i18nOptions } from '@stacksjs/types';
2
+ import type { AutoImportsOptions, ComponentOptions, InspectOptions, LayoutOptions, MarkdownOptions, PagesOptions } from '@stacksjs/types';
3
3
  import { resolve } from '@stacksjs/path';
4
4
  declare function inspect(options?: InspectOptions): import("vite").Plugin;
5
5
  declare function layouts(options?: LayoutOptions): import("vite").Plugin;
@@ -9,7 +9,6 @@ declare function markdown(options?: MarkdownOptions): import("vite").Plugin;
9
9
  declare function autoImports(options?: AutoImportsOptions): any;
10
10
  declare function cssEngine(isWebComponent?: boolean): import("vite").Plugin[];
11
11
  declare function pwa(): import("vite").Plugin[];
12
- declare function i18n(options?: i18nOptions): any;
13
12
  declare function uiEngine(isWebComponent?: boolean): import("vite").Plugin;
14
13
  declare const componentPreset: (isWebComponent?: boolean) => PluginOption;
15
- export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts, i18n };
14
+ export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts };
package/dist/stacks.mjs CHANGED
@@ -5,13 +5,12 @@ import Unocss from "unocss/vite";
5
5
  import Inspect from "vite-plugin-inspect";
6
6
  import Pages from "vite-plugin-pages";
7
7
  import Layouts from "vite-plugin-vue-layouts";
8
- import VueI18n from "@intlify/vite-plugin-vue-i18n";
9
8
  import Markdown from "vite-plugin-vue-markdown";
10
9
  import LinkAttributes from "markdown-it-link-attributes";
11
10
  import Shiki from "markdown-it-shiki";
12
11
  import { VitePWA } from "vite-plugin-pwa";
13
12
  import { defu } from "defu";
14
- import { arraysPath, collectionsPath, componentsPath, frameworkPath, fsPath, functionsPath, langPath, pagesPath, pathPath, projectPath, resolve, securityPath, stringsPath, uiPath } from "@stacksjs/path";
13
+ import { componentsPath, frameworkPath, functionsPath, pagesPath, resolve, uiPath } from "@stacksjs/path";
15
14
  function inspect(options) {
16
15
  return Inspect(options);
17
16
  }
@@ -20,10 +19,12 @@ function layouts(options) {
20
19
  }
21
20
  function components(options) {
22
21
  const defaultOptions = {
22
+ // also allow auto-loading markdown components
23
23
  extensions: ["vue", "md"],
24
24
  include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
25
25
  dirs: [
26
26
  componentsPath()
27
+ // pagesPath(),
27
28
  ],
28
29
  dts: frameworkPath("components.d.ts")
29
30
  };
@@ -61,6 +62,7 @@ function markdown(options) {
61
62
  return Markdown(newOptions);
62
63
  }
63
64
  function autoImports(options) {
65
+ console.log("autoImports here?");
64
66
  const defaultOptions = {
65
67
  imports: [
66
68
  "vue",
@@ -69,24 +71,26 @@ function autoImports(options) {
69
71
  "@vueuse/core",
70
72
  "@vueuse/head",
71
73
  "@vueuse/math",
72
- "vitest",
73
- { "@vueuse/shared": ["isClient", "isDef", "isBoolean", "isFunction", "isNumber", "isString", "isObject", "isWindow", "now", "timestamp", "clamp", "noop", "rand", "isIOS", "hasOwn"] }
74
+ "vitest"
75
+ // { '@vueuse/shared': ['isClient', 'isDef', 'isBoolean', 'isFunction', 'isNumber', 'isString', 'isObject', 'isWindow', 'now', 'timestamp', 'clamp', 'noop', 'rand', 'isIOS', 'hasOwn'] },
74
76
  ],
75
77
  dirs: [
76
78
  functionsPath(),
77
- componentsPath(),
78
- projectPath("config"),
79
- arraysPath("src"),
80
- stringsPath("src"),
81
- collectionsPath("src"),
82
- fsPath("src"),
83
- pathPath("src"),
84
- securityPath("src")
79
+ componentsPath()
80
+ // projectPath('config'),
81
+ // auto imported utilities start here
82
+ // arraysPath('src'),
83
+ // stringsPath('src'),
84
+ // collectionsPath('src'),
85
+ // fsPath('src'),
86
+ // pathPath('src'),
87
+ // securityPath('src'),
85
88
  ],
86
89
  dts: frameworkPath("auto-imports.d.ts"),
87
90
  vueTemplate: true,
88
91
  eslintrc: {
89
92
  enabled: false
93
+ // filepath: frameworkPath('.eslintrc-auto-import.json'),
90
94
  }
91
95
  };
92
96
  const newOptions = defu(options, defaultOptions);
@@ -127,16 +131,8 @@ function pwa() {
127
131
  }
128
132
  });
129
133
  }
130
- function i18n(options) {
131
- const defaultOptions = {
132
- runtimeOnly: true,
133
- compositionOnly: true,
134
- include: [langPath("./**")]
135
- };
136
- const newOptions = defu(options, defaultOptions);
137
- return VueI18n(newOptions);
138
- }
139
134
  function uiEngine(isWebComponent = false) {
135
+ console.log("here", isWebComponent, process.cwd(), __dirname, __filename);
140
136
  if (isWebComponent) {
141
137
  return Vue({
142
138
  include: [/\.vue$/, /\.md$/],
@@ -159,4 +155,4 @@ const componentPreset = (isWebComponent = false) => [
159
155
  components,
160
156
  markdown
161
157
  ];
162
- export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts, i18n };
158
+ export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts };
@@ -1,11 +1,11 @@
1
1
  import { defineConfig } from "vite";
2
2
  import { buildEntriesPath, componentsPath, frameworkPath, projectPath } from "@stacksjs/path";
3
- import { library } from "@stacksjs/config";
4
3
  import { server } from "@stacksjs/server";
5
4
  import { alias } from "@stacksjs/alias";
6
- import { autoImports, components, cssEngine, inspect, preview, uiEngine } from "./index.mjs";
5
+ import { autoImports, components, cssEngine, inspect, uiEngine } from "./index.mjs";
6
+ console.log("componentsPath()", componentsPath());
7
7
  export const vueComponentsConfig = {
8
- root: componentsPath(),
8
+ root: frameworkPath("components/vue"),
9
9
  envDir: projectPath(),
10
10
  envPrefix: "APP_",
11
11
  server,
@@ -17,7 +17,7 @@ export const vueComponentsConfig = {
17
17
  exclude: ["vue"]
18
18
  },
19
19
  plugins: [
20
- preview(),
20
+ // preview(),
21
21
  uiEngine(),
22
22
  cssEngine(),
23
23
  autoImports(),
@@ -32,7 +32,8 @@ export function vueComponentsBuildOptions() {
32
32
  emptyOutDir: true,
33
33
  lib: {
34
34
  entry: buildEntriesPath("vue-components.ts"),
35
- name: library.vueComponents.name,
35
+ // name: library.vueComponents.name,
36
+ name: "test",
36
37
  formats: ["cjs", "es"],
37
38
  fileName: (format) => {
38
39
  if (format === "es")
@@ -53,6 +54,7 @@ export function vueComponentsBuildOptions() {
53
54
  };
54
55
  }
55
56
  export default defineConfig(({ command }) => {
57
+ console.log("command", command);
56
58
  if (command === "serve")
57
59
  return vueComponentsConfig;
58
60
  return vueComponentsConfig;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/build",
3
3
  "type": "module",
4
- "version": "0.48.2",
5
- "packageManager": "pnpm@7.21.0",
4
+ "version": "0.49.0",
5
+ "packageManager": "pnpm@7.25.0",
6
6
  "description": "The Stacks framework build tools and configurations.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -34,38 +34,36 @@
34
34
  "README.md"
35
35
  ],
36
36
  "engines": {
37
- "node": ">=v18.12.1",
38
- "pnpm": ">=7.21.0"
37
+ "node": ">=v18.13.0",
38
+ "pnpm": ">=7.25.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@intlify/unplugin-vue-i18n": "^0.8.1",
42
41
  "@vitejs/plugin-vue": "^4.0.0",
43
42
  "markdown-it-link-attributes": "^4.0.1",
44
43
  "markdown-it-shiki": "^0.7.2",
45
- "unbuild": "^1.0.2",
44
+ "unbuild": "^1.1.1",
46
45
  "unplugin-auto-import": "^0.12.1",
47
46
  "unplugin-vue-components": "^0.22.12",
48
- "vite": "^4.0.3",
49
- "vite-plugin-inspect": "^0.7.12",
47
+ "vite": "^4.0.4",
48
+ "vite-plugin-inspect": "^0.7.14",
50
49
  "vite-plugin-pages": "^0.28.0",
51
- "vite-plugin-pwa": "^0.14.0",
50
+ "vite-plugin-pwa": "^0.14.1",
52
51
  "vite-plugin-vue-layouts": "^0.7.0",
53
52
  "vite-plugin-vue-markdown": "^0.22.2",
54
53
  "vite-ssg": "^0.22.1",
55
54
  "vite-ssg-sitemap": "^0.4.3",
56
55
  "vue-docgen-web-types": "^0.1.8",
57
- "vue-i18n": "^9.2.2",
58
- "@stacksjs/alias": "0.48.2",
59
- "@stacksjs/config": "0.48.2",
60
- "@stacksjs/path": "0.48.2",
61
- "@stacksjs/server": "0.48.2",
62
- "@stacksjs/types": "0.48.2",
63
- "@stacksjs/utils": "0.48.2"
56
+ "@stacksjs/alias": "0.49.0",
57
+ "@stacksjs/config": "0.49.0",
58
+ "@stacksjs/path": "0.49.0",
59
+ "@stacksjs/server": "0.49.0",
60
+ "@stacksjs/types": "0.49.0",
61
+ "@stacksjs/utils": "0.49.0"
64
62
  },
65
63
  "devDependencies": {
66
- "mkdist": "^1.0.0",
64
+ "mkdist": "^1.1.0",
67
65
  "typescript": "^4.9.4",
68
- "@stacksjs/testing": "0.48.2"
66
+ "@stacksjs/testing": "0.49.0"
69
67
  },
70
68
  "scripts": {
71
69
  "build": "mkdist -d",