0.70.0 • Published 1 year ago

@feltcoop/gro v0.70.0

Weekly downloads
-
License
Unlicense
Repository
github
Last release
1 year ago

gro

opinionated webdev toolkit 🌰

limitations:

  • Windows is not yet supported
  • SvelteKit and Vite integration is incomplete
  • Gro is actively used but has few users, so you'll likely find problems and undesirable limitations -- please open issues! or contact us directly
    • example: there are definitely things that should be configurable that aren't
    • gro wants all source code and assets to be in src/ or node_modules/, which may annoy
    • please open issues with questions, bugs, thoughts, etc

about

Gro is an opinionated webdev toolkit that complements SvelteKit and Vite for making web frontends, servers, and libraries. It includes:

docs

install

depends on node >= 16.6

Normally you'll want to install Gro as a dev dependency:

npm i -D @feltcoop/gro

It's handy to install globally too:

npm i -g @feltcoop/gro

usage

Gro has a task runner that discovers and runs TypeScript modules with the .task. subextension. Running gro with no args prints the tasks it finds in the current directory along with its default tasks:

gro # prints available tasks - defers to the project's locally installed version of Gro
Run a task: gro [name]
View help:  gro [name] --help

14 tasks in gro/src:

build      build the project
cert       creates a self-signed cert for https with openssl
check      check that everything is ready to commit
clean      remove temporary dev and build files, and optionally prune git branches
deploy     deploy to a branch
dev        start SvelteKit and other dev plugins
format     format source files
gen        run code generation scripts
help       alias for `gro` with no task name provided
lint       run eslint on the source files
publish    bump version, publish to npm, and git push
test       run tests
typecheck  typecheck the project without emitting any files
upgrade    upgrade deps

Gro matches your CLI input against its filesystem conventions. It tries to do the right thing, where right is helpful but not surprising, with some magic but not too much:

gro # print all available tasks with the pattern `*.task.ts`
gro help # same as `gro`
gro --help # same as `gro`
gro some/dir # list all tasks inside `src/some/dir`
gro some/file # run `src/some/file.task.ts`
gro some/file.task.ts # same as above
gro test # run `src/test.task.ts` if it exists, falling back to Gro's builtin
gro test --help # print info about the "test" task; works for every task

Gro has a number of builtin tasks that you can run with the CLI. To learn more see the task docs and the generated task index.

gro dev # start developing in watch mode
gro dev -- vite --port 3003 # forward args by separating sections with --
gro build # build everything for production

Testing with uvu:

gro test # run all tests for `*.test.ts` files with `uvu`
gro test filepattern1 filepatternB
gro test -- uvu --forwarded_args 'to uvu'

Check all the things:

gro check # does all of the following:
gro typecheck # typecheck JS/TypeScript and Svelte
gro test # run tests
gro gen --check # ensure generated files are current
gro format --check # ensure everything is formatted
gro lint # eslint

Formatting with prettier:

gro format # format all of the source files using Prettier
gro format --check # check that all source files are formatted

Codegen with gen:

gro gen # run codegen for all `*.gen.*` files
gro gen --check # error if any generated files are new or different

To deploy: (also see src/docs/deploy.md)

gro deploy # build and push to the `deploy` branch

To publish: (also see src/docs/publish.md)

gro publish patch # bump version, publish to npm, and git push
gro publish major --and args --are forwarded --to 'npm version'

Etc:

gro clean # delete all build artifacts from the filesystem
gro clean --sveltekit --nodemodules --git # also deletes dirs and prunes git branches
gro cert # uses openssl to create a self-signed certificate for local https testing
gro upgrade excluded-dep-1 excluded-dep-2 # npm updates to the latest everything
gro --version # print the Gro version

For more see src/docs/task.md and src/docs.

develop

npm i
npm run bootstrap # build and link `gro` - needed only once
gro test # make sure everything looks good - same as `npm test`

# development
gro dev # start SvelteKit and other plugins, like API servers; usually you'll keep this running
gro build # update the `gro` CLI locally

# use your development version of `gro` locally in another project
cd ../otherproject
npm link ../gro

# release
gro build # build for release and update the `gro` CLI

credits 🐢🐢🐢

Gro builds on TypeScriptSvelteSvelteKitViteesbuilduvumrifs-extra@feltcoop/utilESLintPrettiersvelte-checkJSON Schemajson-schema-to-typescript & more

license 🐦

public domain ⚘ The Unlicense

0.70.0

1 year ago

0.69.0

1 year ago

0.67.3

1 year ago

0.67.0

1 year ago

0.67.2

1 year ago

0.67.1

1 year ago

0.68.2

1 year ago

0.68.1

1 year ago

0.68.0

1 year ago

0.64.0

1 year ago

0.65.0

1 year ago

0.66.1

1 year ago

0.66.0

1 year ago

0.62.1

2 years ago

0.62.0

2 years ago

0.62.3

1 year ago

0.62.2

2 years ago

0.63.0

1 year ago

0.63.2

1 year ago

0.63.1

1 year ago

0.61.2

2 years ago

0.61.1

2 years ago

0.61.3

2 years ago

0.62.4

1 year ago

0.59.0

2 years ago

0.60.2

2 years ago

0.60.1

2 years ago

0.60.0

2 years ago

0.57.0

2 years ago

0.61.0

2 years ago

0.58.0

2 years ago

0.56.0

2 years ago

0.55.2

2 years ago

0.55.1

2 years ago

0.55.0

2 years ago

0.54.0

2 years ago

0.53.0

2 years ago

0.51.2

2 years ago

0.51.3

2 years ago

0.51.0

2 years ago

0.51.1

2 years ago

0.48.0

2 years ago

0.52.3

2 years ago

0.52.1

2 years ago

0.52.2

2 years ago

0.52.0

2 years ago

0.49.0

2 years ago

0.50.5

2 years ago

0.50.3

2 years ago

0.50.4

2 years ago

0.50.1

2 years ago

0.50.2

2 years ago

0.50.0

2 years ago

0.47.3

2 years ago

0.47.4

2 years ago

0.47.5

2 years ago

0.45.2

2 years ago

0.46.0

2 years ago

0.47.1

2 years ago

0.47.2

2 years ago

0.47.0

2 years ago

0.45.1

2 years ago

0.45.0

2 years ago

0.44.2

3 years ago

0.44.3

3 years ago

0.44.1

3 years ago

0.44.0

3 years ago

0.43.0

3 years ago

0.42.0

3 years ago

0.41.1

3 years ago

0.41.0

3 years ago

0.40.0

3 years ago

0.39.1

3 years ago

0.39.0

3 years ago

0.38.0

3 years ago

0.37.0

3 years ago

0.36.1

3 years ago

0.36.0

3 years ago

0.35.0

3 years ago

0.34.3

3 years ago

0.34.2

3 years ago

0.34.1

3 years ago

0.34.0

3 years ago

0.33.1

3 years ago

0.33.0

3 years ago

0.32.1

3 years ago

0.32.0

3 years ago

0.31.0

3 years ago

0.30.3

3 years ago

0.30.2

3 years ago

0.30.1

3 years ago

0.30.0

3 years ago

0.29.0

3 years ago

0.28.3

3 years ago

0.28.2

3 years ago

0.28.1

3 years ago

0.28.0

3 years ago

0.27.2

3 years ago

0.27.1

3 years ago

0.27.3

3 years ago

0.27.0

3 years ago

0.26.2

3 years ago

0.26.1

3 years ago

0.26.0

3 years ago

0.25.2

3 years ago

0.21.6

3 years ago

0.25.1

3 years ago

0.21.5

3 years ago

0.25.0

3 years ago

0.21.4

3 years ago

0.21.3

3 years ago

0.21.2

3 years ago

0.21.1

3 years ago

0.21.0

3 years ago

0.22.0

3 years ago

0.23.6

3 years ago

0.23.5

3 years ago

0.23.4

3 years ago

0.23.3

3 years ago

0.23.2

3 years ago

0.23.1

3 years ago

0.23.0

3 years ago

0.23.7

3 years ago

0.24.1

3 years ago

0.24.0

3 years ago

0.20.4

3 years ago

0.20.3

3 years ago

0.20.1

3 years ago

0.20.2

3 years ago

0.20.0

3 years ago

0.19.0

3 years ago

0.17.0

3 years ago

0.17.1

3 years ago

0.18.1

3 years ago

0.18.2

3 years ago

0.18.0

3 years ago

0.15.0

3 years ago

0.16.0

3 years ago

0.14.0

3 years ago

0.13.0

3 years ago

0.12.0

3 years ago

0.12.1

3 years ago

0.11.3

3 years ago

0.11.0

3 years ago

0.11.1

3 years ago

0.11.2

3 years ago

0.9.4

3 years ago

0.9.5

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.3

3 years ago

0.8.4

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.6.5

3 years ago

0.7.0

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.5.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago