0.83.0 • Published 7 months ago

@feltjs/gro v0.83.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

gro

task runner and toolkit extending SvelteKit

limitations:

  • Windows is not yet supported
  • Gro has been actively used since 2019 but it has few users, so you'll likely encounter problems and undesirable limitations -- please open issues!

about

Gro is a task runner and toolkit extending SvelteKit, Vite, and esbuild for making web frontends, servers, and libraries. It includes:

docs

install

depends on node >=20.5

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

npm i -D @feltjs/gro

It's handy to install globally too:

npm i -g @feltjs/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

15 tasks in ./src/lib:

build      build the project
changeset  call changeset with gro patterns
check      check that everything is ready to commit
clean      remove temporary dev and build files, and optionally prune git branches
commit     commit and push to a new branch
deploy     deploy to a branch
dev        start SvelteKit and other dev plugins
exports    writes the exports property of package.json for the lib
format     format source files
gen        run code generation scripts
lint       run eslint on the given directories and files
publish    bump version, publish to npm, and git push
test       run tests
typecheck  run tsc on 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 some/dir # list all tasks inside `src/lib/some/dir`
gro some/file # run `src/lib/some/file.task.ts`
gro some/file.task.ts # same as above
gro test # run `src/lib/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 some.test another.test
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/lib/docs/deploy.md)

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

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

gro publish # flush changeset to changelog, bump version, publish to npm, and git push

Etc:

gro clean # delete all build artifacts from the filesystem
gro clean --sveltekit --nodemodules --git # also deletes dirs and prunes git branches
gro upgrade excluded-dep-1 excluded-dep-2 # npm updates to the latest everything
gro --version # print the Gro version

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

develop

npm i
npm run build # build and link `gro` - needed only once
gro build # same as `npm run build` when the `gro` CLI is available
gro test # make sure everything looks good - same as `npm test`
gro test some.test another.test

# use your development version of `gro` locally in another project:
gro build # updates the `gro` CLI, same as `npm run build`
cd ../otherproject
npm link ../gro # from `otherproject/`
gro build # from `../gro` on changes

credits 🐢🐢🐢

Gro builds on TypeScriptSvelteSvelteKitViteesbuilduvumrichokidarzod@grogarden/utilESLintPrettiersvelte-checkJSON Schemajson-schema-to-typescript & more

license 🐦

MIT

0.82.2

7 months ago

0.82.3

7 months ago

0.82.4

7 months ago

0.82.5

7 months ago

0.80.0

9 months ago

0.81.0

8 months ago

0.82.0

7 months ago

0.81.1

8 months ago

0.83.0

7 months ago

0.82.1

7 months ago

0.81.2

8 months ago

0.79.1

9 months ago

0.78.2

10 months ago

0.79.0

10 months ago

0.82.6

7 months ago

0.82.7

7 months ago

0.82.8

7 months ago

0.82.9

7 months ago

0.78.1

10 months ago

0.74.0

1 year ago

0.73.0

1 year ago

0.76.0

11 months ago

0.75.1

1 year ago

0.75.0

1 year ago

0.78.0

11 months ago

0.75.3

12 months ago

0.77.0

11 months ago

0.76.1

11 months ago

0.75.2

1 year ago

0.75.5

11 months ago

0.75.4

11 months ago

0.72.0

1 year ago

0.71.0

1 year ago

0.70.5

1 year ago

0.70.4

1 year ago

0.70.3

1 year ago

0.70.2

1 year ago

0.70.1

1 year ago

0.70.0

1 year ago