stacks 0.0.9 → 0.37.3

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.
Files changed (219) hide show
  1. package/.gitignore +10 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +65 -104
  4. package/auto-imports.d.ts +826 -0
  5. package/bin/stacks.mjs +4 -0
  6. package/components.d.ts +22 -0
  7. package/core/actions/README.md +59 -0
  8. package/core/actions/node_modules/.bin/markdown-it +17 -0
  9. package/core/actions/node_modules/.bin/mkdist +17 -0
  10. package/core/actions/node_modules/.bin/tsc +17 -0
  11. package/core/actions/node_modules/.bin/tsserver +17 -0
  12. package/core/actions/package.json +64 -0
  13. package/core/actions/src/copy-types.ts +22 -0
  14. package/core/actions/src/generate/component-meta.ts +94 -0
  15. package/core/actions/src/generate/index.ts +4 -0
  16. package/core/actions/src/generate/lib-entries.ts +106 -0
  17. package/core/actions/src/generate/package-json.ts +87 -0
  18. package/core/actions/src/generate/vscode-custom-data.ts +28 -0
  19. package/core/actions/src/generate/vue-compat.ts +17 -0
  20. package/core/actions/src/generate-component-meta.ts +19 -0
  21. package/core/actions/src/generate-ide-helpers.ts +23 -0
  22. package/core/actions/src/generate-lib-entries.ts +22 -0
  23. package/core/actions/src/generate-package-json.ts +15 -0
  24. package/core/actions/src/generate-vscode-custom-data.ts +20 -0
  25. package/core/actions/src/generate-vue-compat.ts +10 -0
  26. package/core/arrays/README.md +59 -0
  27. package/core/arrays/node_modules/.bin/mkdist +17 -0
  28. package/core/arrays/node_modules/.bin/tsc +17 -0
  29. package/core/arrays/node_modules/.bin/tsserver +17 -0
  30. package/core/arrays/package.json +50 -0
  31. package/core/arrays/src/index.ts +3 -0
  32. package/core/build/README.md +59 -0
  33. package/core/build/entries/README.md +7 -0
  34. package/core/build/node_modules/.bin/acorn +17 -0
  35. package/core/build/node_modules/.bin/browserslist +17 -0
  36. package/core/build/node_modules/.bin/jiti +17 -0
  37. package/core/build/node_modules/.bin/mkdist +17 -0
  38. package/core/build/node_modules/.bin/rollup +17 -0
  39. package/core/build/node_modules/.bin/vite +17 -0
  40. package/core/build/node_modules/.bin/vite-ssg +17 -0
  41. package/core/build/node_modules/.bin/vue-docgen-web-types +17 -0
  42. package/core/build/package.json +71 -0
  43. package/core/build/src/example-vue.ts +26 -0
  44. package/core/build/src/example-wc.ts +26 -0
  45. package/core/build/src/functions.ts +56 -0
  46. package/core/build/src/index.ts +7 -0
  47. package/core/build/src/pages.ts +50 -0
  48. package/core/build/src/stacks.ts +204 -0
  49. package/core/build/src/vue-components.ts +76 -0
  50. package/core/build/src/web-components.ts +63 -0
  51. package/core/build/web-types.config.cjs +4 -0
  52. package/core/build/web-types.ts +14 -0
  53. package/core/collections/README.md +59 -0
  54. package/core/collections/node_modules/.bin/mkdist +17 -0
  55. package/core/collections/node_modules/.bin/tsc +17 -0
  56. package/core/collections/node_modules/.bin/tsserver +17 -0
  57. package/core/collections/package.json +54 -0
  58. package/core/collections/src/index.ts +1 -0
  59. package/core/fs/README.md +59 -0
  60. package/core/fs/node_modules/.bin/mkdist +17 -0
  61. package/core/fs/package.json +56 -0
  62. package/core/fs/src/index.ts +170 -0
  63. package/core/helpers/node_modules/.bin/mkdist +17 -0
  64. package/core/helpers/package.json +58 -0
  65. package/core/helpers/src/index.ts +129 -0
  66. package/core/modules/README.md +61 -0
  67. package/core/modules/node_modules/.bin/acorn +17 -0
  68. package/core/modules/node_modules/.bin/mkdist +17 -0
  69. package/core/modules/package.json +51 -0
  70. package/core/modules/src/i18n.ts +23 -0
  71. package/core/modules/src/nprogress.ts +12 -0
  72. package/core/modules/src/pwa.ts +12 -0
  73. package/core/objects/README.md +59 -0
  74. package/core/objects/node_modules/.bin/mkdist +17 -0
  75. package/core/objects/node_modules/.bin/tsc +17 -0
  76. package/core/objects/node_modules/.bin/tsserver +17 -0
  77. package/core/objects/package.json +51 -0
  78. package/core/objects/src/index.ts +1 -0
  79. package/core/paths/node_modules/.bin/mkdist +17 -0
  80. package/core/paths/node_modules/.bin/tsc +17 -0
  81. package/core/paths/node_modules/.bin/tsserver +17 -0
  82. package/core/paths/package.json +51 -0
  83. package/core/paths/src/index.ts +178 -0
  84. package/core/router/README.md +59 -0
  85. package/core/router/node_modules/.bin/mkdist +17 -0
  86. package/core/router/package.json +51 -0
  87. package/core/router/src/index.ts +14 -0
  88. package/core/security/README.md +59 -0
  89. package/core/security/node_modules/.bin/mkdist +17 -0
  90. package/core/security/package.json +56 -0
  91. package/core/security/src/crypt.ts +14 -0
  92. package/core/security/src/hash.ts +52 -0
  93. package/core/security/src/index.ts +3 -0
  94. package/core/security/src/key.ts +11 -0
  95. package/core/strings/README.md +59 -0
  96. package/core/strings/node_modules/.bin/mkdist +17 -0
  97. package/core/strings/node_modules/.bin/tsc +17 -0
  98. package/core/strings/node_modules/.bin/tsserver +17 -0
  99. package/core/strings/package.json +63 -0
  100. package/core/strings/src/index.ts +14 -0
  101. package/core/types/README.md +59 -0
  102. package/core/types/node_modules/.bin/markdown-it +17 -0
  103. package/core/types/node_modules/.bin/mkdist +17 -0
  104. package/core/types/node_modules/.bin/vite +17 -0
  105. package/core/types/node_modules/.bin/vitepress +17 -0
  106. package/core/types/package.json +60 -0
  107. package/core/types/src/app.ts +131 -0
  108. package/core/types/src/auto-imports.ts +3 -0
  109. package/core/types/src/build.ts +3 -0
  110. package/core/types/src/cli.ts +49 -0
  111. package/core/types/src/components.ts +66 -0
  112. package/core/types/src/deploy.ts +11 -0
  113. package/core/types/src/docs.ts +3 -0
  114. package/core/types/src/exit-code.ts +10 -0
  115. package/core/types/src/fs.ts +17 -0
  116. package/core/types/src/git.ts +131 -0
  117. package/core/types/src/hashing.ts +107 -0
  118. package/core/types/src/i18n.ts +19 -0
  119. package/core/types/src/index.ts +21 -0
  120. package/core/types/src/inspect.ts +10 -0
  121. package/core/types/src/layout.ts +8 -0
  122. package/core/types/src/library.ts +148 -0
  123. package/core/types/src/manifest.ts +9 -0
  124. package/core/types/src/markdown.ts +198 -0
  125. package/core/types/src/pages.ts +8 -0
  126. package/core/types/src/pwa.ts +8 -0
  127. package/core/types/src/ssg.ts +3 -0
  128. package/core/types/src/ui.ts +141 -0
  129. package/core/ui/README.md +60 -0
  130. package/core/ui/node_modules/.bin/mkdist +17 -0
  131. package/core/ui/node_modules/.bin/tsc +17 -0
  132. package/core/ui/node_modules/.bin/tsserver +17 -0
  133. package/core/ui/node_modules/.bin/vite +17 -0
  134. package/core/ui/node_modules/.bin/vue-tsc +17 -0
  135. package/core/ui/package.json +62 -0
  136. package/core/ui/src/index.ts +60 -0
  137. package/custom-elements.json +14 -0
  138. package/examples/vue-components/App.vue +12 -0
  139. package/examples/vue-components/favicon.png +0 -0
  140. package/examples/vue-components/index.html +20 -0
  141. package/examples/web-components/favicon.png +0 -0
  142. package/examples/web-components/index.html +13 -0
  143. package/functions/node_modules/.bin/artisan +17 -0
  144. package/functions/node_modules/.bin/stacks +17 -0
  145. package/functions/node_modules/.bin/stx +17 -0
  146. package/functions/package.json +40 -0
  147. package/netlify.toml +18 -0
  148. package/nitro.config.ts +6 -0
  149. package/package.json +224 -27
  150. package/pages/App.vue +26 -0
  151. package/pages/index.html +23 -0
  152. package/pages/main.ts +26 -0
  153. package/pages/public/_headers +3 -0
  154. package/pages/public/favicon-dark.svg +3 -0
  155. package/pages/public/favicon.svg +3 -0
  156. package/pages/public/pwa-192x192.png +0 -0
  157. package/pages/public/pwa-512x512.png +0 -0
  158. package/pages/public/safari-pinned-tab.svg +41 -0
  159. package/pages/styles/main.css +29 -0
  160. package/pages/styles/markdown.css +28 -0
  161. package/scripts/ensure-env.sh +248 -0
  162. package/shims.d.ts +29 -0
  163. package/simple-git-hooks.cjs +4 -0
  164. package/src/cli/actions/build.ts +160 -0
  165. package/src/cli/actions/commit.ts +9 -0
  166. package/src/cli/actions/dev.ts +47 -0
  167. package/src/cli/actions/examples.ts +74 -0
  168. package/src/cli/actions/fresh.ts +9 -0
  169. package/src/cli/actions/generate.ts +159 -0
  170. package/src/cli/actions/index.ts +12 -0
  171. package/src/cli/actions/key.ts +31 -0
  172. package/src/cli/actions/lint.ts +19 -0
  173. package/src/cli/actions/make.ts +116 -0
  174. package/src/cli/actions/release.ts +9 -0
  175. package/src/cli/actions/test.ts +39 -0
  176. package/src/cli/actions/types.ts +180 -0
  177. package/src/cli/actions/update.ts +90 -0
  178. package/src/cli/build.ts +49 -0
  179. package/src/cli/create.ts +71 -0
  180. package/src/cli/dev.ts +28 -0
  181. package/src/cli/example.ts +28 -0
  182. package/src/cli/generate.ts +64 -0
  183. package/src/cli/index.ts +13 -0
  184. package/src/cli/key.ts +12 -0
  185. package/src/cli/make.ts +47 -0
  186. package/src/cli/test.ts +24 -0
  187. package/src/cli/types.ts +18 -0
  188. package/src/cli/update.ts +17 -0
  189. package/src/cli/utility.ts +39 -0
  190. package/src/cli.ts +48 -0
  191. package/src/docs.ts +4 -0
  192. package/src/index.ts +22 -0
  193. package/tsconfig.json +96 -0
  194. package/vitest.config.ts +22 -0
  195. package/vue-components/dist/.gitkeep +0 -0
  196. package/vue-components/index.html +13 -0
  197. package/vue-components/main.ts +18 -0
  198. package/vue-components/node_modules/.bin/artisan +17 -0
  199. package/vue-components/node_modules/.bin/stacks +17 -0
  200. package/vue-components/node_modules/.bin/stx +17 -0
  201. package/vue-components/node_modules/.vite/deps/@vueuse_core.js +7847 -0
  202. package/vue-components/node_modules/.vite/deps/@vueuse_core.js.map +7 -0
  203. package/vue-components/node_modules/.vite/deps/_metadata.json +13 -0
  204. package/vue-components/node_modules/.vite/deps/package.json +1 -0
  205. package/vue-components/package.json +40 -0
  206. package/web-components/dist/.gitkeep +0 -0
  207. package/web-components/node_modules/.bin/artisan +17 -0
  208. package/web-components/node_modules/.bin/stacks +17 -0
  209. package/web-components/node_modules/.bin/stx +17 -0
  210. package/web-components/package.json +40 -0
  211. package/web-types.json +67 -0
  212. package/.npmignore +0 -1
  213. package/.travis.yml +0 -4
  214. package/examples/stringReverse.js +0 -41
  215. package/examples/sumServer.js +0 -21
  216. package/examples/sumWorker.js +0 -23
  217. package/index.js +0 -1
  218. package/lib/stacks.js +0 -398
  219. package/test/test.stacks.js +0 -148
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * This action generates the web-types.json & custom-elements.json
5
+ * files for the components.
6
+ */
7
+
8
+ import consola from 'consola'
9
+ import { hasComponents } from '@stacksjs/fs'
10
+ import { generateVsCodeCustomData } from './generate/vscode-custom-data'
11
+
12
+ async function generate() {
13
+ if (hasComponents())
14
+ await generateVsCodeCustomData()
15
+
16
+ else
17
+ consola.info('No components found. Skipping VS Code custom data generation.')
18
+ }
19
+
20
+ generate()
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Thanks for inspiration:
5
+ * https://github.com/vueuse/vueuse/blob/main/scripts/fix-types.ts
6
+ */
7
+
8
+ import { generateVueCompat } from './generate'
9
+
10
+ generateVueCompat(['wip'])
@@ -0,0 +1,59 @@
1
+ # Stacks Arrays
2
+
3
+ This package contains the Stacks Arrays source.
4
+
5
+ ## ☘️ Features
6
+
7
+ wip
8
+
9
+ - ⚡️
10
+
11
+ wip
12
+
13
+ ## 🤖 Usage
14
+
15
+ wip
16
+
17
+ ```bash
18
+ pnpm i -D @stacksjs/arrays
19
+ ```
20
+
21
+ Now, you can use it in your project:
22
+
23
+ ```js
24
+ import * as arrays from '@stacksjs/arrays'
25
+
26
+ // wip
27
+ ```
28
+
29
+ Learn more in the docs.
30
+
31
+ ## 🧪 Testing
32
+
33
+ ```bash
34
+ pnpm test
35
+ ```
36
+
37
+ ## 📈 Changelog
38
+
39
+ Please see our [releases](https://github.com/stacksjs/stacksjs/releases) page for more information on what has changed recently.
40
+
41
+ ## 💪🏼 Contributing
42
+
43
+ Please see [CONTRIBUTING](../../.github/CONTRIBUTING.md) for details.
44
+
45
+ ## 🏝 Community
46
+
47
+ For help, discussion about best practices, or any other conversation that would benefit from being searchable:
48
+
49
+ [Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
50
+
51
+ For casual chit-chat with others using this package:
52
+
53
+ [Join the Open Web Discord Server](https://discord.ow3.org)
54
+
55
+ ## 📄 License
56
+
57
+ The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
58
+
59
+ Made with ❤️
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/mkdist@0.3.13_typescript@4.8.4/node_modules/mkdist/dist/cli.cjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/mkdist@0.3.13_typescript@4.8.4/node_modules/mkdist/dist/cli.cjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/bin/tsc" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/bin/tsc" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/bin/tsserver" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/bin/tsserver" "$@"
17
+ fi
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@stacksjs/arrays",
3
+ "type": "module",
4
+ "version": "0.37.3",
5
+ "packageManager": "pnpm@7.13.6",
6
+ "description": "The Stacks array utilities.",
7
+ "author": "Chris Breuer",
8
+ "license": "MIT",
9
+ "funding": "https://github.com/sponsors/chrisbbreuer",
10
+ "homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/arrays#readme",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/stacksjs/stacks.git",
14
+ "directory": "./.stacks/core/arrays"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/stacksjs/stacks/issues"
18
+ },
19
+ "keywords": [
20
+ "arrays",
21
+ "collections",
22
+ "contains",
23
+ "utilities",
24
+ "functions",
25
+ "stacks"
26
+ ],
27
+ "main": "dist/index.mjs",
28
+ "module": "dist/index.mjs",
29
+ "types": "dist/index.d.ts",
30
+ "contributors": [
31
+ "Chris Breuer <chris@ow3.org>"
32
+ ],
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "engines": {
37
+ "node": ">=v18.10.0",
38
+ "pnpm": ">=7.13.6"
39
+ },
40
+ "scripts": {
41
+ "build": "mkdist -d",
42
+ "dev": "mkdist -d",
43
+ "prepublishOnly": "pnpm run build",
44
+ "typecheck": "tsc --noEmit"
45
+ },
46
+ "devDependencies": {
47
+ "mkdist": "^0.3.13",
48
+ "typescript": "^4.8.4"
49
+ }
50
+ }
@@ -0,0 +1,3 @@
1
+ export function contains(needle: string, haystack: string[]) {
2
+ return haystack.some(hay => needle.includes(hay))
3
+ }
@@ -0,0 +1,59 @@
1
+ # Stacks Build
2
+
3
+ This package contains the web development build tooling. In simple terms, here lives the Vite & Nitro engine code.
4
+
5
+ ## ☘️ Features
6
+
7
+ wip
8
+
9
+ - ⚡️
10
+
11
+ wip
12
+
13
+ ## 🤖 Usage
14
+
15
+ wip
16
+
17
+ ```bash
18
+ pnpm i -D @stacksjs/actions
19
+ ```
20
+
21
+ Now, you can use it in your project:
22
+
23
+ ```js
24
+ import * as build from '@stacksjs/build'
25
+
26
+ // wip
27
+ ```
28
+
29
+ Learn more in the docs.
30
+
31
+ ## 🧪 Testing
32
+
33
+ ```bash
34
+ pnpm test
35
+ ```
36
+
37
+ ## 📈 Changelog
38
+
39
+ Please see our [releases](https://github.com/stacksjs/stacksjs/releases) page for more information on what has changed recently.
40
+
41
+ ## 💪🏼 Contributing
42
+
43
+ Please see [CONTRIBUTING](../../.github/CONTRIBUTING.md) for details.
44
+
45
+ ## 🏝 Community
46
+
47
+ For help, discussion about best practices, or any other conversation that would benefit from being searchable:
48
+
49
+ [Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
50
+
51
+ For casual chit-chat with others using this package:
52
+
53
+ [Join the Open Web Discord Server](https://discord.ow3.org)
54
+
55
+ ## 📄 License
56
+
57
+ The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
58
+
59
+ Made with ❤️
@@ -0,0 +1,7 @@
1
+ # Entries
2
+
3
+ This is a placeholder folder for auto-generated entry files. In other words, Stacks auto-generates:
4
+
5
+ - a function (composables) library entry point
6
+ - a Vue Component library entry point
7
+ - a Web Component library entry point
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/acorn@7.4.1/node_modules/acorn/bin/acorn" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/acorn@7.4.1/node_modules/acorn/bin/acorn" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/browserslist@4.21.4/node_modules/browserslist/cli.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/browserslist@4.21.4/node_modules/browserslist/cli.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/jiti@1.16.0/node_modules/jiti/bin/jiti.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/jiti@1.16.0/node_modules/jiti/bin/jiti.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/mkdist@0.3.13/node_modules/mkdist/dist/cli.cjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/mkdist@0.3.13/node_modules/mkdist/dist/cli.cjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/bin/rollup" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/bin/rollup" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@3.1.8/node_modules/vite/bin/vite.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite@3.1.8/node_modules/vite/bin/vite.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.21.1_3dlpmnjq3xaq6x2ip7web643qm/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.21.1_3dlpmnjq3xaq6x2ip7web643qm/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="$NODE_PATH:/Users/chrisbreuer/Code/stacks/node_modules/.pnpm/node_modules"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.2.41/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.2.41/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
17
+ fi
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@stacksjs/build",
3
+ "type": "module",
4
+ "version": "0.37.3",
5
+ "packageManager": "pnpm@7.13.6",
6
+ "description": "The Stacks framework build tools and configurations.",
7
+ "author": "Chris Breuer",
8
+ "license": "MIT",
9
+ "funding": "https://github.com/sponsors/chrisbbreuer",
10
+ "homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/build#readme",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/stacksjs/stacks.git",
14
+ "directory": "./.stacks/core/build"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/stacksjs/stacks/issues"
18
+ },
19
+ "keywords": [
20
+ "build",
21
+ "stacks",
22
+ "framework",
23
+ "typescript",
24
+ "javascript",
25
+ "vite",
26
+ "nitro",
27
+ "vue"
28
+ ],
29
+ "contributors": [
30
+ "Chris Breuer <chris@ow3.org>"
31
+ ],
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "engines": {
36
+ "node": ">=v18.10.0",
37
+ "pnpm": ">=7.13.6"
38
+ },
39
+ "scripts": {
40
+ "build": "mkdist -d",
41
+ "dev": "mkdist -d",
42
+ "prepublishOnly": "pnpm run build",
43
+ "typecheck": "tsc --noEmit"
44
+ },
45
+ "dependencies": {
46
+ "@intlify/vite-plugin-vue-i18n": "^6.0.3",
47
+ "@stacksjs/paths": "workspace:*",
48
+ "@stacksjs/types": "workspace:*",
49
+ "@types/markdown-it-link-attributes": "^3.0.1",
50
+ "defu": "^6.1.0",
51
+ "jiti": "^1.16.0",
52
+ "markdown-it-link-attributes": "^4.0.1",
53
+ "markdown-it-shiki": "^0.5.1",
54
+ "unplugin-auto-import": "^0.11.2",
55
+ "unplugin-vue-components": "^0.22.8",
56
+ "vite": "^3.1.8",
57
+ "vite-plugin-inspect": "^0.7.5",
58
+ "vite-plugin-pages": "^0.27.0",
59
+ "vite-plugin-pwa": "^0.13.1",
60
+ "vite-plugin-vue-component-preview": "^0.3.3",
61
+ "vite-plugin-vue-layouts": "^0.7.0",
62
+ "vite-plugin-vue-markdown": "^0.22.1",
63
+ "vite-ssg": "^0.21.1",
64
+ "vite-ssg-sitemap": "^0.4.3",
65
+ "vue-docgen-web-types": "^0.1.8",
66
+ "vue-i18n": "^9.2.2"
67
+ },
68
+ "devDependencies": {
69
+ "mkdist": "^0.3.13"
70
+ }
71
+ }
@@ -0,0 +1,26 @@
1
+ import { defineConfig } from 'vite'
2
+ import type { ViteConfig } from '@stacksjs/types'
3
+ import { examplesPath } from '@stacksjs/paths'
4
+ import { alias } from '../../../alias'
5
+ import { uiEngine } from '.'
6
+
7
+ export const vueComponentsExampleConfig: ViteConfig = {
8
+ root: examplesPath('vue-components'),
9
+
10
+ resolve: {
11
+ alias,
12
+ },
13
+
14
+ server: {
15
+ port: 3333,
16
+ open: true,
17
+ },
18
+
19
+ plugins: [
20
+ uiEngine(),
21
+ ],
22
+ }
23
+
24
+ export default defineConfig(() => {
25
+ return vueComponentsExampleConfig
26
+ })
@@ -0,0 +1,26 @@
1
+ import { defineConfig } from 'vite'
2
+ import type { ViteConfig } from '@stacksjs/types'
3
+ import { examplesPath } from '@stacksjs/paths'
4
+ import { alias } from '../../../alias'
5
+ import { uiEngine } from '.'
6
+
7
+ export const webComponentsExampleConfig: ViteConfig = {
8
+ root: examplesPath('web-components'),
9
+
10
+ resolve: {
11
+ alias,
12
+ },
13
+
14
+ server: {
15
+ port: 3333,
16
+ open: true,
17
+ },
18
+
19
+ plugins: [
20
+ uiEngine(true),
21
+ ],
22
+ }
23
+
24
+ export default defineConfig(() => {
25
+ return webComponentsExampleConfig
26
+ })
@@ -0,0 +1,56 @@
1
+ import type { BuildOptions as ViteBuildOptions } from 'vite'
2
+ import { defineConfig } from 'vite'
3
+ import type { ViteConfig } from '@stacksjs/types'
4
+ import { buildEntriesPath, frameworkPath, functionsPath, projectPath } from '@stacksjs/paths'
5
+ import { library } from '../../../config'
6
+ import { alias } from '../../../alias'
7
+ import { autoImports } from '.'
8
+
9
+ export const functionsConfig: ViteConfig = {
10
+ root: functionsPath(),
11
+ envDir: projectPath(),
12
+ envPrefix: 'APP_',
13
+
14
+ resolve: {
15
+ alias,
16
+ },
17
+
18
+ plugins: [
19
+ autoImports(),
20
+ ],
21
+
22
+ build: functionsBuildOptions(),
23
+ }
24
+
25
+ export function functionsBuildOptions(): ViteBuildOptions {
26
+ return {
27
+ outDir: frameworkPath('functions/dist'),
28
+ emptyOutDir: true,
29
+ sourcemap: library.functions.shouldGenerateSourcemap,
30
+ lib: {
31
+ entry: buildEntriesPath('functions.ts'),
32
+ name: library.functions.name,
33
+ formats: library.functions.shouldBuildIife ? ['cjs', 'es', 'iife'] : ['cjs', 'es'],
34
+ fileName: (format: string) => {
35
+ if (format === 'es')
36
+ return 'index.mjs'
37
+
38
+ if (format === 'cjs')
39
+ return 'index.cjs'
40
+
41
+ if (format === 'iife')
42
+ return 'index.iife.js'
43
+
44
+ return 'index.?.js'
45
+ },
46
+ },
47
+ }
48
+ }
49
+
50
+ export default defineConfig(({ command }) => {
51
+ if (command === 'serve')
52
+ return functionsConfig
53
+
54
+ // command === 'build'
55
+ return functionsConfig
56
+ })
@@ -0,0 +1,7 @@
1
+ export * from './example-vue'
2
+ export * from './example-wc'
3
+ export * from './functions'
4
+ export * from './pages'
5
+ export * from './vue-components'
6
+ export * from './web-components'
7
+ export * from './stacks'
@@ -0,0 +1,50 @@
1
+ import { defineConfig } from 'vite'
2
+ import generateSitemap from 'vite-ssg-sitemap'
3
+ import type { ViteConfig } from '@stacksjs/types'
4
+ import { functionsPath, projectPath } from '@stacksjs/paths'
5
+ import { alias } from '../../../alias'
6
+ import { atomicCssEngine, autoImports, components, i18n, inspect, layouts, markdown, pages, preview, pwa, uiEngine } from '.'
7
+
8
+ export const pagesConfig: ViteConfig = {
9
+ root: functionsPath(),
10
+ envDir: projectPath(),
11
+ envPrefix: 'APP_',
12
+
13
+ resolve: {
14
+ alias,
15
+ },
16
+
17
+ plugins: [
18
+ preview(),
19
+ uiEngine(),
20
+ pages(),
21
+ atomicCssEngine(),
22
+ components(),
23
+ layouts(),
24
+ i18n(),
25
+ markdown(),
26
+ autoImports(),
27
+ pwa(),
28
+ inspect(),
29
+ ],
30
+
31
+ // https://github.com/antfu/vite-ssg
32
+ ssgOptions: {
33
+ script: 'async',
34
+ formatting: 'minify',
35
+ onFinished() { generateSitemap() },
36
+ },
37
+
38
+ ssr: {
39
+ // TODO: workaround until they support native ESM
40
+ noExternal: ['workbox-window', /vue-i18n/],
41
+ },
42
+ }
43
+
44
+ export default defineConfig(({ command }) => {
45
+ if (command === 'serve')
46
+ return pagesConfig
47
+
48
+ // command === 'build'
49
+ return pagesConfig
50
+ })