11.0.1 • Published 2 years ago

@whook/cli v11.0.1

Weekly downloads
92
License
MIT
Repository
github
Last release
2 years ago

@whook/cli

The Whook server CLI

GitHub license

This is the Whook server CLI tool. Its goal is to allow you to create commands right in your project instead of in external tools. By doing so, it provides you a convenient way to reuse your Whook's project configuration, services and handlers easily in you day to day command line programs.

To create new commands, you simply have to create new files in the src/commands folder of your Whook project and let the autoloader detect it ;).

By setting @whook/cli in the WHOOK_PLUGINS constant, you will benefit of the commands provided by this module:

  // (...)
  // Setup your own whook plugins or avoid whook defaults by leaving it empty
-  $.register(constant('WHOOK_PLUGINS', ['@whook/whook']));
+  $.register(constant('WHOOK_PLUGINS', ['@whook/cli', '@whook/whook']));
  // (...)

See the Whook example server commands for simple examples on creating your own commands in a whook project.

You can also create a new command by running:

npx whook create --type commands

Dev

To test the CLI script, go to a project (in this repo @whook/example):

npm run build
cd ../whook-example

# Debugging compiled commands
node ../whook-cli/bin/whook.js ls

# Debugging source commands
PROJECT_SRC="$PWD/src" NODE_ENV=${NODE_ENV:-development} npm run cli -- ts-node --esm --files -- ../whook-cli/bin/whook.js ls

API

Authors

License

MIT

10.0.5

2 years ago

10.0.6

2 years ago

10.0.0

3 years ago

10.0.1

3 years ago

10.0.2

3 years ago

10.0.3

2 years ago

10.0.4

2 years ago

11.0.0

2 years ago

11.0.1

2 years ago

9.0.1

3 years ago

9.0.0

3 years ago

8.5.1

3 years ago

8.5.0

3 years ago

8.4.2

3 years ago

8.4.1

3 years ago

8.4.0

3 years ago

8.3.0

3 years ago

8.1.0

4 years ago

8.1.1

4 years ago

8.0.4

4 years ago

8.0.3

4 years ago

8.0.1

4 years ago

8.0.0

4 years ago

8.0.2

4 years ago

7.1.5

4 years ago

7.1.4

4 years ago

7.1.3

4 years ago

7.1.1

4 years ago

7.1.0

4 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.1.6

4 years ago

5.1.5

4 years ago

5.1.4

4 years ago

5.1.3

4 years ago

5.1.2

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

4.0.0-alpha.44

5 years ago

4.0.0-alpha.43

5 years ago

4.0.0-alpha.42

5 years ago

4.0.0-alpha.41

5 years ago

4.0.0-alpha.40

5 years ago

4.0.0-alpha.39

5 years ago

4.0.0-alpha.38

5 years ago

4.0.0-alpha.37

5 years ago

4.0.0-alpha.36

5 years ago

4.0.0-alpha.35

5 years ago

4.0.0-alpha.34

5 years ago

4.0.0-alpha.33

5 years ago

4.0.0-alpha.32

5 years ago

4.0.0-alpha.31

5 years ago

4.0.0-alpha.30

5 years ago

4.0.0-alpha.29

5 years ago

4.0.0-alpha.28

5 years ago

4.0.0-alpha.27

5 years ago

4.0.0-alpha.26

5 years ago

4.0.0-alpha.25

5 years ago

4.0.0-alpha.24

5 years ago

4.0.0-alpha.20

5 years ago

4.0.0-alpha.23

5 years ago

4.0.0-alpha.22

5 years ago

4.0.0-alpha.21

5 years ago

4.0.0-alpha.19

5 years ago

4.0.0-alpha.18

5 years ago

4.0.0-alpha.17

5 years ago

4.0.0-alpha.16

5 years ago

4.0.0-alpha.15

5 years ago

4.0.0-alpha.14

5 years ago

4.0.0-alpha.13

5 years ago

4.0.0-alpha.12

5 years ago

4.0.0-alpha.11

5 years ago

4.0.0-alpha.10

6 years ago

4.0.0-alpha.9

6 years ago

4.0.0-alpha.8

6 years ago

4.0.0-alpha.7

6 years ago

4.0.0-alpha.6

6 years ago

4.0.0-alpha.5

6 years ago

4.0.0-alpha.4

6 years ago

4.0.0-alpha.3

6 years ago

4.0.0-alpha.1

6 years ago

4.0.0-alpha.0

6 years ago