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.
- package/.gitignore +10 -0
- package/LICENSE.md +21 -0
- package/README.md +65 -104
- package/auto-imports.d.ts +826 -0
- package/bin/stacks.mjs +4 -0
- package/components.d.ts +22 -0
- package/core/actions/README.md +59 -0
- package/core/actions/node_modules/.bin/markdown-it +17 -0
- package/core/actions/node_modules/.bin/mkdist +17 -0
- package/core/actions/node_modules/.bin/tsc +17 -0
- package/core/actions/node_modules/.bin/tsserver +17 -0
- package/core/actions/package.json +64 -0
- package/core/actions/src/copy-types.ts +22 -0
- package/core/actions/src/generate/component-meta.ts +94 -0
- package/core/actions/src/generate/index.ts +4 -0
- package/core/actions/src/generate/lib-entries.ts +106 -0
- package/core/actions/src/generate/package-json.ts +87 -0
- package/core/actions/src/generate/vscode-custom-data.ts +28 -0
- package/core/actions/src/generate/vue-compat.ts +17 -0
- package/core/actions/src/generate-component-meta.ts +19 -0
- package/core/actions/src/generate-ide-helpers.ts +23 -0
- package/core/actions/src/generate-lib-entries.ts +22 -0
- package/core/actions/src/generate-package-json.ts +15 -0
- package/core/actions/src/generate-vscode-custom-data.ts +20 -0
- package/core/actions/src/generate-vue-compat.ts +10 -0
- package/core/arrays/README.md +59 -0
- package/core/arrays/node_modules/.bin/mkdist +17 -0
- package/core/arrays/node_modules/.bin/tsc +17 -0
- package/core/arrays/node_modules/.bin/tsserver +17 -0
- package/core/arrays/package.json +50 -0
- package/core/arrays/src/index.ts +3 -0
- package/core/build/README.md +59 -0
- package/core/build/entries/README.md +7 -0
- package/core/build/node_modules/.bin/acorn +17 -0
- package/core/build/node_modules/.bin/browserslist +17 -0
- package/core/build/node_modules/.bin/jiti +17 -0
- package/core/build/node_modules/.bin/mkdist +17 -0
- package/core/build/node_modules/.bin/rollup +17 -0
- package/core/build/node_modules/.bin/vite +17 -0
- package/core/build/node_modules/.bin/vite-ssg +17 -0
- package/core/build/node_modules/.bin/vue-docgen-web-types +17 -0
- package/core/build/package.json +71 -0
- package/core/build/src/example-vue.ts +26 -0
- package/core/build/src/example-wc.ts +26 -0
- package/core/build/src/functions.ts +56 -0
- package/core/build/src/index.ts +7 -0
- package/core/build/src/pages.ts +50 -0
- package/core/build/src/stacks.ts +204 -0
- package/core/build/src/vue-components.ts +76 -0
- package/core/build/src/web-components.ts +63 -0
- package/core/build/web-types.config.cjs +4 -0
- package/core/build/web-types.ts +14 -0
- package/core/collections/README.md +59 -0
- package/core/collections/node_modules/.bin/mkdist +17 -0
- package/core/collections/node_modules/.bin/tsc +17 -0
- package/core/collections/node_modules/.bin/tsserver +17 -0
- package/core/collections/package.json +54 -0
- package/core/collections/src/index.ts +1 -0
- package/core/fs/README.md +59 -0
- package/core/fs/node_modules/.bin/mkdist +17 -0
- package/core/fs/package.json +56 -0
- package/core/fs/src/index.ts +170 -0
- package/core/helpers/node_modules/.bin/mkdist +17 -0
- package/core/helpers/package.json +58 -0
- package/core/helpers/src/index.ts +129 -0
- package/core/modules/README.md +61 -0
- package/core/modules/node_modules/.bin/acorn +17 -0
- package/core/modules/node_modules/.bin/mkdist +17 -0
- package/core/modules/package.json +51 -0
- package/core/modules/src/i18n.ts +23 -0
- package/core/modules/src/nprogress.ts +12 -0
- package/core/modules/src/pwa.ts +12 -0
- package/core/objects/README.md +59 -0
- package/core/objects/node_modules/.bin/mkdist +17 -0
- package/core/objects/node_modules/.bin/tsc +17 -0
- package/core/objects/node_modules/.bin/tsserver +17 -0
- package/core/objects/package.json +51 -0
- package/core/objects/src/index.ts +1 -0
- package/core/paths/node_modules/.bin/mkdist +17 -0
- package/core/paths/node_modules/.bin/tsc +17 -0
- package/core/paths/node_modules/.bin/tsserver +17 -0
- package/core/paths/package.json +51 -0
- package/core/paths/src/index.ts +178 -0
- package/core/router/README.md +59 -0
- package/core/router/node_modules/.bin/mkdist +17 -0
- package/core/router/package.json +51 -0
- package/core/router/src/index.ts +14 -0
- package/core/security/README.md +59 -0
- package/core/security/node_modules/.bin/mkdist +17 -0
- package/core/security/package.json +56 -0
- package/core/security/src/crypt.ts +14 -0
- package/core/security/src/hash.ts +52 -0
- package/core/security/src/index.ts +3 -0
- package/core/security/src/key.ts +11 -0
- package/core/strings/README.md +59 -0
- package/core/strings/node_modules/.bin/mkdist +17 -0
- package/core/strings/node_modules/.bin/tsc +17 -0
- package/core/strings/node_modules/.bin/tsserver +17 -0
- package/core/strings/package.json +63 -0
- package/core/strings/src/index.ts +14 -0
- package/core/types/README.md +59 -0
- package/core/types/node_modules/.bin/markdown-it +17 -0
- package/core/types/node_modules/.bin/mkdist +17 -0
- package/core/types/node_modules/.bin/vite +17 -0
- package/core/types/node_modules/.bin/vitepress +17 -0
- package/core/types/package.json +60 -0
- package/core/types/src/app.ts +131 -0
- package/core/types/src/auto-imports.ts +3 -0
- package/core/types/src/build.ts +3 -0
- package/core/types/src/cli.ts +49 -0
- package/core/types/src/components.ts +66 -0
- package/core/types/src/deploy.ts +11 -0
- package/core/types/src/docs.ts +3 -0
- package/core/types/src/exit-code.ts +10 -0
- package/core/types/src/fs.ts +17 -0
- package/core/types/src/git.ts +131 -0
- package/core/types/src/hashing.ts +107 -0
- package/core/types/src/i18n.ts +19 -0
- package/core/types/src/index.ts +21 -0
- package/core/types/src/inspect.ts +10 -0
- package/core/types/src/layout.ts +8 -0
- package/core/types/src/library.ts +148 -0
- package/core/types/src/manifest.ts +9 -0
- package/core/types/src/markdown.ts +198 -0
- package/core/types/src/pages.ts +8 -0
- package/core/types/src/pwa.ts +8 -0
- package/core/types/src/ssg.ts +3 -0
- package/core/types/src/ui.ts +141 -0
- package/core/ui/README.md +60 -0
- package/core/ui/node_modules/.bin/mkdist +17 -0
- package/core/ui/node_modules/.bin/tsc +17 -0
- package/core/ui/node_modules/.bin/tsserver +17 -0
- package/core/ui/node_modules/.bin/vite +17 -0
- package/core/ui/node_modules/.bin/vue-tsc +17 -0
- package/core/ui/package.json +62 -0
- package/core/ui/src/index.ts +60 -0
- package/custom-elements.json +14 -0
- package/examples/vue-components/App.vue +12 -0
- package/examples/vue-components/favicon.png +0 -0
- package/examples/vue-components/index.html +20 -0
- package/examples/web-components/favicon.png +0 -0
- package/examples/web-components/index.html +13 -0
- package/functions/node_modules/.bin/artisan +17 -0
- package/functions/node_modules/.bin/stacks +17 -0
- package/functions/node_modules/.bin/stx +17 -0
- package/functions/package.json +40 -0
- package/netlify.toml +18 -0
- package/nitro.config.ts +6 -0
- package/package.json +224 -27
- package/pages/App.vue +26 -0
- package/pages/index.html +23 -0
- package/pages/main.ts +26 -0
- package/pages/public/_headers +3 -0
- package/pages/public/favicon-dark.svg +3 -0
- package/pages/public/favicon.svg +3 -0
- package/pages/public/pwa-192x192.png +0 -0
- package/pages/public/pwa-512x512.png +0 -0
- package/pages/public/safari-pinned-tab.svg +41 -0
- package/pages/styles/main.css +29 -0
- package/pages/styles/markdown.css +28 -0
- package/scripts/ensure-env.sh +248 -0
- package/shims.d.ts +29 -0
- package/simple-git-hooks.cjs +4 -0
- package/src/cli/actions/build.ts +160 -0
- package/src/cli/actions/commit.ts +9 -0
- package/src/cli/actions/dev.ts +47 -0
- package/src/cli/actions/examples.ts +74 -0
- package/src/cli/actions/fresh.ts +9 -0
- package/src/cli/actions/generate.ts +159 -0
- package/src/cli/actions/index.ts +12 -0
- package/src/cli/actions/key.ts +31 -0
- package/src/cli/actions/lint.ts +19 -0
- package/src/cli/actions/make.ts +116 -0
- package/src/cli/actions/release.ts +9 -0
- package/src/cli/actions/test.ts +39 -0
- package/src/cli/actions/types.ts +180 -0
- package/src/cli/actions/update.ts +90 -0
- package/src/cli/build.ts +49 -0
- package/src/cli/create.ts +71 -0
- package/src/cli/dev.ts +28 -0
- package/src/cli/example.ts +28 -0
- package/src/cli/generate.ts +64 -0
- package/src/cli/index.ts +13 -0
- package/src/cli/key.ts +12 -0
- package/src/cli/make.ts +47 -0
- package/src/cli/test.ts +24 -0
- package/src/cli/types.ts +18 -0
- package/src/cli/update.ts +17 -0
- package/src/cli/utility.ts +39 -0
- package/src/cli.ts +48 -0
- package/src/docs.ts +4 -0
- package/src/index.ts +22 -0
- package/tsconfig.json +96 -0
- package/vitest.config.ts +22 -0
- package/vue-components/dist/.gitkeep +0 -0
- package/vue-components/index.html +13 -0
- package/vue-components/main.ts +18 -0
- package/vue-components/node_modules/.bin/artisan +17 -0
- package/vue-components/node_modules/.bin/stacks +17 -0
- package/vue-components/node_modules/.bin/stx +17 -0
- package/vue-components/node_modules/.vite/deps/@vueuse_core.js +7847 -0
- package/vue-components/node_modules/.vite/deps/@vueuse_core.js.map +7 -0
- package/vue-components/node_modules/.vite/deps/_metadata.json +13 -0
- package/vue-components/node_modules/.vite/deps/package.json +1 -0
- package/vue-components/package.json +40 -0
- package/web-components/dist/.gitkeep +0 -0
- package/web-components/node_modules/.bin/artisan +17 -0
- package/web-components/node_modules/.bin/stacks +17 -0
- package/web-components/node_modules/.bin/stx +17 -0
- package/web-components/package.json +40 -0
- package/web-types.json +67 -0
- package/.npmignore +0 -1
- package/.travis.yml +0 -4
- package/examples/stringReverse.js +0 -41
- package/examples/sumServer.js +0 -21
- package/examples/sumWorker.js +0 -23
- package/index.js +0 -1
- package/lib/stacks.js +0 -398
- 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,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,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,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,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
|
+
})
|