@tsparticles/cli-create 4.0.0-beta.12

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Matteo Bruni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @tsparticles/cli-create
2
+
3
+ Minimal CLI for scaffolding tsParticles packages. This is a thin wrapper around `@tsparticles/cli-command-create`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install --save-dev @tsparticles/cli-create
9
+ # or
10
+ pnpm add -D @tsparticles/cli-create
11
+ # or
12
+ yarn add -D @tsparticles/cli-create
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ tsparticles-create [options]
19
+ ```
20
+
21
+ For usage details, see the command package docs under `cli/commands/create`.
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { Command } = require("commander");
4
+ const { readFile } = require("node:fs/promises");
5
+ const path = require("node:path");
6
+
7
+ (async () => {
8
+ const { createCommand } = await import("@tsparticles/cli-command-create"),
9
+ rootPkgPath = path.join(__dirname, "..", "package.json"),
10
+ pkg = JSON.parse(await readFile(rootPkgPath, "utf-8")),
11
+ [, , firstArg] = process.argv,
12
+ directArgs = new Set(["create", "help", "-h", "--help", "-v", "--version"]),
13
+ commandArgv =
14
+ !firstArg ||
15
+ firstArg.startsWith("-") ||
16
+ !directArgs.has(firstArg)
17
+ ? [process.argv[0], process.argv[1], "create", ...process.argv.slice(2)]
18
+ : process.argv;
19
+
20
+ const program = new Command();
21
+
22
+ program.name("tsparticles-create");
23
+ program.description("tsParticles Create CLI");
24
+ program.version(pkg.version, "-v, --version", "output the current version");
25
+ program.addCommand(createCommand);
26
+ program.parse(commandArgv);
27
+ })().catch((error) => {
28
+ console.error(error);
29
+ process.exit(1);
30
+ });
31
+
32
+
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@tsparticles/cli-create",
3
+ "version": "4.0.0-beta.12",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "bin": {
7
+ "tsparticles-create": "bin/tsparticles-create.cjs"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "tagVersionPrefix": "v"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
16
+ "directory": "cli/packages/cli-create"
17
+ },
18
+ "prettier": "@tsparticles/prettier-config",
19
+ "dependencies": {
20
+ "commander": "^14.0.3",
21
+ "@tsparticles/cli-command-create": "^4.0.0-beta.12"
22
+ },
23
+ "devDependencies": {
24
+ "@tsparticles/prettier-config": "^4.0.0-beta.12"
25
+ },
26
+ "description": "tsParticles CLI - Create command only",
27
+ "author": "Matteo Bruni <matteo.bruni@me.com>",
28
+ "scripts": {
29
+ "prettify:ci:readme": "prettier --check ./README.md",
30
+ "prettify:readme": "prettier --write ./README.md",
31
+ "build": "pnpm run prettify:readme",
32
+ "build:ci": "pnpm run prettify:ci:readme"
33
+ }
34
+ }
package/project.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@tsparticles/cli-create",
3
+ "$schema": "https://json.schemastore.org/nx-project.json",
4
+ "projectType": "library",
5
+ "sourceRoot": "cli/packages/cli-create",
6
+ "targets": {
7
+ "build": {
8
+ "executor": "nx:run-commands",
9
+ "options": {
10
+ "commands": ["pnpm run build"],
11
+ "cwd": "cli/packages/cli-create"
12
+ },
13
+ "dependsOn": ["^build"]
14
+ }
15
+ }
16
+ }
17
+
18
+