sandstone-cli 1.2.0 → 1.2.1
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/lib/create.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -19
- package/lib/shared.d.ts +1 -0
- package/lib/shared.js +19 -0
- package/package.json +1 -1
- package/src/create.ts +1 -1
- package/src/index.ts +1 -21
- package/src/shared.ts +20 -0
package/lib/create.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Argument, Command } from 'commander';
|
|
3
3
|
import figlet from 'figlet';
|
|
4
4
|
import { createCommand } from './commands/index.js';
|
|
5
|
-
import { BuildDeclares } from './
|
|
5
|
+
import { BuildDeclares } from './shared.js';
|
|
6
6
|
const commander = new Command();
|
|
7
7
|
console.log(figlet.textSync('Sandstone'));
|
|
8
8
|
const createCLI = commander
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export
|
|
2
|
+
export {};
|
package/lib/index.js
CHANGED
|
@@ -2,30 +2,12 @@
|
|
|
2
2
|
import { Argument, Command } from 'commander';
|
|
3
3
|
import figlet from 'figlet';
|
|
4
4
|
import { buildCommand, createCommand, watchCommand, installNativeCommand, installVanillaCommand, uninstallVanillaCommand, refreshCommand } from './commands/index.js';
|
|
5
|
+
import { BuildDeclares } from './shared.js';
|
|
5
6
|
const commander = new Command();
|
|
6
7
|
console.log(figlet.textSync('Sandstone'));
|
|
7
8
|
const CLI = commander
|
|
8
9
|
.version('1.0.0')
|
|
9
10
|
.description('The CLI for Sandstone - the minecraft pack creation library.');
|
|
10
|
-
export const BuildDeclares = {
|
|
11
|
-
// Flags
|
|
12
|
-
dry: ['-d, --dry', 'Do not save the pack. Mostly useful with `verbose`.'],
|
|
13
|
-
verbose: ['-v, --verbose', 'Log all resulting resources: functions, advancements...'],
|
|
14
|
-
root: ['-r, --root', 'Save the pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.'],
|
|
15
|
-
fullTrace: ['-t, --full-trace', 'Show the full stack trace on errors.'],
|
|
16
|
-
strictErrors: ['-s, --strict-errors', 'Stop pack compilation on type errors.'],
|
|
17
|
-
production: ['-p, --production', 'Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".'],
|
|
18
|
-
// Values
|
|
19
|
-
path: ['--path <path>', 'Path of the folder containing source files.', './src'],
|
|
20
|
-
config: ['--config-path', 'Path of the sandstone.config.ts folder.', './'],
|
|
21
|
-
name: ['-n, --name <name>', 'Name of the datapack. Override the value specified in the configuration file.'],
|
|
22
|
-
namespace: ['-ns, --namespace <namespace>', 'The default namespace. Override the value specified in the configuration file.'],
|
|
23
|
-
world: ['-w, --world <name>', 'The name of the world to save the packs in. Override the value specified in the configuration file.'],
|
|
24
|
-
clientPath: ['-c, --client-path <path>', 'Path of the client folder. Override the value specified in the configuration file.'],
|
|
25
|
-
serverPath: ['--server-path <path>', 'Path of the server folder. Override the value specified in the configuration file.'],
|
|
26
|
-
// TODO: ssh
|
|
27
|
-
// TODO: reimplement auto reload
|
|
28
|
-
}; // Haha TypeScript funny
|
|
29
11
|
const build = CLI
|
|
30
12
|
.command('build')
|
|
31
13
|
.description('Build the pack(s). ⛏');
|
package/lib/shared.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BuildDeclares: Record<string, [string, string, RegExp, boolean]>;
|
package/lib/shared.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const BuildDeclares = {
|
|
2
|
+
// Flags
|
|
3
|
+
dry: ['-d, --dry', 'Do not save the pack. Mostly useful with `verbose`.'],
|
|
4
|
+
verbose: ['-v, --verbose', 'Log all resulting resources: functions, advancements...'],
|
|
5
|
+
root: ['-r, --root', 'Save the pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.'],
|
|
6
|
+
fullTrace: ['-t, --full-trace', 'Show the full stack trace on errors.'],
|
|
7
|
+
strictErrors: ['-s, --strict-errors', 'Stop pack compilation on type errors.'],
|
|
8
|
+
production: ['-p, --production', 'Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".'],
|
|
9
|
+
// Values
|
|
10
|
+
path: ['--path <path>', 'Path of the folder containing source files.', './src'],
|
|
11
|
+
config: ['--config-path', 'Path of the sandstone.config.ts folder.', './'],
|
|
12
|
+
name: ['-n, --name <name>', 'Name of the datapack. Override the value specified in the configuration file.'],
|
|
13
|
+
namespace: ['-ns, --namespace <namespace>', 'The default namespace. Override the value specified in the configuration file.'],
|
|
14
|
+
world: ['-w, --world <name>', 'The name of the world to save the packs in. Override the value specified in the configuration file.'],
|
|
15
|
+
clientPath: ['-c, --client-path <path>', 'Path of the client folder. Override the value specified in the configuration file.'],
|
|
16
|
+
serverPath: ['--server-path <path>', 'Path of the server folder. Override the value specified in the configuration file.'],
|
|
17
|
+
// TODO: ssh
|
|
18
|
+
// TODO: reimplement auto reload
|
|
19
|
+
}; // Haha TypeScript funny
|
package/package.json
CHANGED
package/src/create.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Argument, Command } from 'commander';
|
|
3
3
|
import figlet from 'figlet';
|
|
4
4
|
import { buildCommand, createCommand, watchCommand, installNativeCommand, installVanillaCommand, uninstallVanillaCommand, refreshCommand } from './commands/index.js';
|
|
5
|
+
import { BuildDeclares } from './shared.js';
|
|
5
6
|
|
|
6
7
|
const commander = new Command()
|
|
7
8
|
|
|
@@ -11,27 +12,6 @@ const CLI = commander
|
|
|
11
12
|
.version('1.0.0')
|
|
12
13
|
.description('The CLI for Sandstone - the minecraft pack creation library.')
|
|
13
14
|
|
|
14
|
-
export const BuildDeclares = {
|
|
15
|
-
// Flags
|
|
16
|
-
dry: ['-d, --dry', 'Do not save the pack. Mostly useful with `verbose`.'],
|
|
17
|
-
verbose: ['-v, --verbose', 'Log all resulting resources: functions, advancements...'],
|
|
18
|
-
root: ['-r, --root', 'Save the pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.'],
|
|
19
|
-
fullTrace: ['-t, --full-trace', 'Show the full stack trace on errors.'],
|
|
20
|
-
strictErrors: ['-s, --strict-errors', 'Stop pack compilation on type errors.'],
|
|
21
|
-
production: ['-p, --production', 'Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".'],
|
|
22
|
-
|
|
23
|
-
// Values
|
|
24
|
-
path: ['--path <path>', 'Path of the folder containing source files.', './src'],
|
|
25
|
-
config: ['--config-path', 'Path of the sandstone.config.ts folder.', './'],
|
|
26
|
-
name: ['-n, --name <name>', 'Name of the datapack. Override the value specified in the configuration file.'],
|
|
27
|
-
namespace: ['-ns, --namespace <namespace>', 'The default namespace. Override the value specified in the configuration file.'],
|
|
28
|
-
world: ['-w, --world <name>', 'The name of the world to save the packs in. Override the value specified in the configuration file.'],
|
|
29
|
-
clientPath: ['-c, --client-path <path>', 'Path of the client folder. Override the value specified in the configuration file.'],
|
|
30
|
-
serverPath: ['--server-path <path>', 'Path of the server folder. Override the value specified in the configuration file.'],
|
|
31
|
-
// TODO: ssh
|
|
32
|
-
// TODO: reimplement auto reload
|
|
33
|
-
} as unknown as Record<string, [string, string, RegExp, boolean]> // Haha TypeScript funny
|
|
34
|
-
|
|
35
15
|
const build = CLI
|
|
36
16
|
.command('build')
|
|
37
17
|
.description('Build the pack(s). ⛏')
|
package/src/shared.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const BuildDeclares = {
|
|
2
|
+
// Flags
|
|
3
|
+
dry: ['-d, --dry', 'Do not save the pack. Mostly useful with `verbose`.'],
|
|
4
|
+
verbose: ['-v, --verbose', 'Log all resulting resources: functions, advancements...'],
|
|
5
|
+
root: ['-r, --root', 'Save the pack & resource pack in the .minecraft/datapacks & .minecraft/resource_packs folders. Override the value specified in the configuration file.'],
|
|
6
|
+
fullTrace: ['-t, --full-trace', 'Show the full stack trace on errors.'],
|
|
7
|
+
strictErrors: ['-s, --strict-errors', 'Stop pack compilation on type errors.'],
|
|
8
|
+
production: ['-p, --production', 'Runs Sandstone in production mode. This sets process.env.SANDSTONE_ENV to "production".'],
|
|
9
|
+
|
|
10
|
+
// Values
|
|
11
|
+
path: ['--path <path>', 'Path of the folder containing source files.', './src'],
|
|
12
|
+
config: ['--config-path', 'Path of the sandstone.config.ts folder.', './'],
|
|
13
|
+
name: ['-n, --name <name>', 'Name of the datapack. Override the value specified in the configuration file.'],
|
|
14
|
+
namespace: ['-ns, --namespace <namespace>', 'The default namespace. Override the value specified in the configuration file.'],
|
|
15
|
+
world: ['-w, --world <name>', 'The name of the world to save the packs in. Override the value specified in the configuration file.'],
|
|
16
|
+
clientPath: ['-c, --client-path <path>', 'Path of the client folder. Override the value specified in the configuration file.'],
|
|
17
|
+
serverPath: ['--server-path <path>', 'Path of the server folder. Override the value specified in the configuration file.'],
|
|
18
|
+
// TODO: ssh
|
|
19
|
+
// TODO: reimplement auto reload
|
|
20
|
+
} as unknown as Record<string, [string, string, RegExp, boolean]> // Haha TypeScript funny
|