create-streetui 0.0.0-stage → 3.2.2
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/LICENSE +15 -0
- package/README.md +20 -2
- package/index.js +43 -0
- package/package.json +26 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-streetui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `npm create streetui@latest` initializer for StreetUI projects.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm create streetui@latest my-app
|
|
7
|
+
cd my-app
|
|
8
|
+
npm install
|
|
9
|
+
npm run dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Templates:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm create streetui@latest my-app -- --template basic # minimal app
|
|
16
|
+
npm create streetui@latest my-app -- --template ssr # SSR + hydration app
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This package is a thin wrapper over `@streetui/cli`; it contains no framework
|
|
20
|
+
logic. StreetUI uses its own independent toolchain (no Vite, no bundler
|
|
21
|
+
dependency for application builds).
|
package/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* create-streetui — the `npm create streetui@latest` initializer.
|
|
4
|
+
*
|
|
5
|
+
* This is a tiny wrapper over the published `@streetui/cli`. It exists so that
|
|
6
|
+
* `npm create streetui@latest <dir>` resolves `create-streetui` on the registry
|
|
7
|
+
* and delegates to the real StreetUI scaffolder. It contains no framework logic.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const { createProject, FRAMEWORK_VERSION } = require('@streetui/cli');
|
|
11
|
+
const path = require('node:path');
|
|
12
|
+
|
|
13
|
+
async function main() {
|
|
14
|
+
const args = process.argv.slice(2);
|
|
15
|
+
const target = args.find((a) => !a.startsWith('-') && a !== 'create');
|
|
16
|
+
if (!target) {
|
|
17
|
+
console.error('Usage: npm create streetui@latest <dir> [--template <name>]');
|
|
18
|
+
console.error('Run "npx @streetui/cli create --help" to list templates.');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
const i = args.indexOf('--template');
|
|
22
|
+
const template = i >= 0 ? args[i + 1] : undefined;
|
|
23
|
+
|
|
24
|
+
const logger = {
|
|
25
|
+
info: (m) => console.log(m),
|
|
26
|
+
success: (m) => console.log(m),
|
|
27
|
+
warn: (m) => console.warn(m),
|
|
28
|
+
error: (m) => console.error(m),
|
|
29
|
+
plain: (m) => console.log(m),
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
await createProject({
|
|
33
|
+
targetDir: path.resolve(process.cwd(), target),
|
|
34
|
+
...(template ? { template } : {}),
|
|
35
|
+
frameworkVersion: FRAMEWORK_VERSION,
|
|
36
|
+
logger,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
main().catch((error) => {
|
|
41
|
+
console.error(error && error.message ? error.message : error);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-streetui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "3.2.2",
|
|
4
|
+
"description": "The `npm create streetui@latest` initializer for StreetUI projects.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-streetui": "index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"index.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18.0.0"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@streetui/cli": "3.2.2"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"streetui",
|
|
22
|
+
"create",
|
|
23
|
+
"scaffold"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
}
|
|
28
|
+
}
|