{"id":17749333,"url":"https://github.com/ryanatkn/gro","last_synced_at":"2025-08-21T17:31:59.125Z","repository":{"id":39662022,"uuid":"201098497","full_name":"ryanatkn/gro","owner":"ryanatkn","description":"task runner and toolkit extending SvelteKit 🌰 generate, run, optimize","archived":false,"fork":false,"pushed_at":"2024-11-25T16:18:31.000Z","size":5365,"stargazers_count":18,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-29T11:02:34.216Z","etag":null,"topics":["svelte","sveltekit","task-runner","typescript","vite","web"],"latest_commit_sha":null,"homepage":"https://gro.ryanatkn.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanatkn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ryanatkn","patreon":"ryanatkn"}},"created_at":"2019-08-07T17:40:24.000Z","updated_at":"2024-11-21T21:29:22.000Z","dependencies_parsed_at":"2023-09-24T18:13:11.592Z","dependency_job_id":"5b982d3f-fab6-47a3-a7ac-cf304b89bcad","html_url":"https://github.com/ryanatkn/gro","commit_stats":{"total_commits":2016,"total_committers":7,"mean_commits":288.0,"dds":"0.38541666666666663","last_synced_commit":"ff820b03fc7bd350d793125611bc53639e8b163f"},"previous_names":["feltcoop/gro","grogarden/gro","feltjs/gro","ryanatkn/gro"],"tags_count":421,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanatkn%2Fgro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanatkn%2Fgro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanatkn%2Fgro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanatkn%2Fgro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanatkn","download_url":"https://codeload.github.com/ryanatkn/gro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230523761,"owners_count":18239445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["svelte","sveltekit","task-runner","typescript","vite","web"],"created_at":"2024-10-26T11:22:51.551Z","updated_at":"2025-08-21T17:31:59.098Z","avatar_url":"https://github.com/ryanatkn.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ryanatkn","https://patreon.com/ryanatkn"],"categories":[],"sub_categories":[],"readme":"# gro \u003cimg src=\"static/logo.svg\" alt=\"a pixelated green oak acorn with a glint of sun\" width=\"32\" height=\"32\"\u003e\n\n[\u003cimg src=\"static/logo.svg\" alt=\"a pixelated green oak acorn with a glint of sun\" align=\"right\" width=\"192\" height=\"192\"\u003e](https://gro.ryanatkn.com/)\n\n\u003e task runner and toolkit extending SvelteKit 🌰 generate, run, optimize\n\n[`npm i -D @ryanatkn/gro`](https://www.npmjs.com/package/@ryanatkn/gro)\n\n[Windows won't be supported](https://github.com/ryanatkn/gro/issues/319), I chose Bash instead.\n\nNeed help or want to share thoughts? See the\n[issues](https://github.com/ryanatkn/gro/issues) and\n[discussions](https://github.com/ryanatkn/gro/discussions).\n\n## about\n\nGro is a task runner and toolkit\nextending [SvelteKit](https://github.com/sveltejs/kit),\n[Vite](https://github.com/vitejs/vite),\nand [esbuild](https://github.com/evanw/esbuild)\nfor making web frontends, servers, and libraries with TypeScript.\nIt's a dev tool, not for production use.\nIt includes:\n\n- [task runner](/src/docs/task.md) that uses the filesystem convention `*.task.ts`\n  - lots of [common builtin tasks](/src/docs/tasks.md) that users can easily override and compose\n- tools and patterns for\n  [developing](/src/docs/dev.md),\n  [building](/src/docs/build.md),\n  [testing](/src/docs/test.md),\n  [deploying](/src/docs/deploy.md),\n  and [publishing](/src/docs/publish.md)\n  [SvelteKit](https://github.com/sveltejs/kit) apps, library packages, and Node servers\n  - integrated [TypeScript](https://github.com/microsoft/typescript),\n    [Svelte](https://github.com/sveltejs/svelte),\n    and [SvelteKit](https://github.com/sveltejs/kit)\n  - defers to SvelteKit and Vite for the frontend and\n    [`@sveltejs/package`](https://kit.svelte.dev/docs/packaging) for the library\n  - exposes all of its internals in `$lib`\n  - uses [Changesets](https://github.com/changesets/changesets) for versioning and changelogs\n  - provides a [Node loader](/src/lib/loader.ts) with a [register hook](/src/lib/register.ts)\n    - uses Node's type stripping and supports importing JSON, SvelteKit shims,\n      and SSR'd Svelte files in tests/tasks/scripts\n    - supports [SvelteKit module imports](https://kit.svelte.dev/docs/modules) for\n      `$lib`, `$env`, and `$app` in tasks, tests, Node servers,\n      and other code outside of the SvelteKit frontend,\n      so you can use SvelteKit patterns everywhere\n      (these are best-effort shims, not perfect)\n    - supports running TypeScript files directly without a task via `gro run a.ts`\n      or `node --import @ryanatkn/gro/register.js a.ts`\n  - [configurable plugins](/src/docs/plugin.md) to support SvelteKit,\n    [auto-restarting Node servers](/src/lib/gro_plugin_server.ts),\n    and other external build processes\n    - see the [Gro config docs](/src/docs/config.md) and\n      [the default config](https://github.com/ryanatkn/gro/blob/main/src/lib/gro.config.default.ts)\n    - see [`fuz_template`](https://github.com/fuz-dev/fuz_template)\n      for a simple starter project example, and\n      [`@feltjs/felt`](https://github.com/feltjs/felt) for a more complex example with custom tasks\n- [testing](/src/docs/test.md) with [`uvu`](https://github.com/lukeed/uvu)\n- codegen by convention with [`gen`](/src/docs/gen.md)\n- linting with [ESLint](https://github.com/eslint/eslint)\n  (I also maintain [`@feltjs/eslint-config`](https://github.com/feltjs/eslint-config))\n- formatting with [Prettier](https://github.com/prettier/prettier)\n\n## docs\n\n- developing web frontends, servers, and libraries\n  - [config](/src/docs/config.md)\n  - [dev](/src/docs/dev.md)\n  - [build](/src/docs/build.md) for production\n  - [deploy](/src/docs/deploy.md) to a branch, like for GitHub pages\n  - [publish](/src/docs/publish.md) to npm\n- [`Task`](/src/docs/task.md) runner\n  - builtin [tasks](/src/docs/tasks.md) list\n- [testing](/src/docs/test.md) with [`uvu`](https://github.com/lukeed/uvu)\n- [`gen`](/src/docs/gen.md) code generation\n- [`public` package](/src/docs/package_json.md#public-packages) features (nonstandard)\n- full [docs index](/src/docs#readme)\n\n## install\n\n\u003e depends on node \u003e=20.12\n\nTypical usage installs [@ryanatkn/gro](https://www.npmjs.com/package/@ryanatkn/gro)\nas a dev dependency:\n\n```bash\nnpm i -D @ryanatkn/gro\nnpx @ryanatkn/gro # note the package is namespaced, don't install `gro`\n```\n\nIt's handy to install globally too:\n\n```bash\nnpm i -g @ryanatkn/gro\ngro\n```\n\n## usage\n\nGro has a task runner that discovers and runs TypeScript modules with the `.task.` subextension.\nRunning `gro` with no args prints the tasks\nit finds in the current directory along with its builtin tasks:\n\n```bash\ngro # prints available tasks - defers to any local gro installation\n```\n\n```\nRun a task: gro [name]\nView help:  gro [name] --help\n\n19 tasks in gro:\n\nbuild      build the project\nchangeset  call changeset with gro patterns\ncheck      check that everything is ready to commit\nclean      remove temporary dev and build files, and optionally prune git branches\ncommit     commit and push to a new branch\ndeploy     deploy to a branch\ndev        start SvelteKit and other dev plugins\nformat     format source files\ngen        run code generation scripts\nlint       run eslint\npublish    bump version, publish to the configured registry, and git push\nreinstall  refreshes package-lock.json with the latest and cleanest deps\nrelease    publish and deploy\nresolve    diagnostic that logs resolved filesystem info for the given input paths\nrun        execute a file with the loader, like `node` but works for TypeScript\nsync       run `gro gen`, update `package.json`, and optionally install packages to sync up\ntest       run tests with uvu\ntypecheck  run svelte-check or tsc on the project without emitting any files\nupgrade    upgrade deps\n```\n\nTo run tasks, Gro matches your CLI input against its filesystem conventions.\nIt tries to do the right thing, where right is helpful but not surprising,\nwith some magic but not too much:\n\n```bash\ngro # displays all available tasks matching `src/lib/**/*.task.ts` and Gro's builtins\ngro a # tries to run `src/lib/a.task.ts`, then `./a.task.ts`, then Gro's builtin if one exists\ngro a --help # displays docs for the \"a\" task and its args, works for every task\ngro some/dir # lists all tasks inside `src/lib/some/dir`\ngro some/file # runs `src/lib/some/file.task.ts`\ngro some/file.task.ts # same as above\n```\n\nGro can also run non-task TypeScript files directly\nwith [the `gro run` task](/src/lib/run.task.ts) or [register hook](/src/lib/register.ts):\n\n```bash\ngro run foo.ts\nnode --import @ryanatkn/gro/register.js foo.ts\n```\n\nOr programmatically:\n\n```js\n// myfile.js\nimport {register} from 'node:module';\nregister('@ryanatkn/gro/loader.js', import.meta.url);\nawait import('./foo.ts');\n```\n\nGro has a number of builtin tasks that you can run with the CLI.\nTo learn more [see the task docs](/src/docs/task.md)\nand [the generated task index](/src/docs/tasks.md).\n\n```bash\ngro dev # start developing in watch mode\ngro dev -- vite --port 3003 # forward args by separating sections with --\n```\n\n```bash\ngro build # build everything for production\n```\n\n[Testing](/src/docs/test.md) with [`uvu`](https://github.com/lukeed/uvu),\nincluding shims for [SvelteKit modules](https://kit.svelte.dev/docs/modules):\n\n```bash\ngro test # run all tests for `*.test.ts` files with `uvu`\ngro test filepattern1 some.test another.test\ngro test -- uvu --forwarded_args 'to uvu'\n```\n\nCheck all the things:\n\n```bash\ngro check # does all of the following:\ngro typecheck # svelte-check with tsc fallback\ngro test # run tests\ngro gen --check # ensure generated files are current\ngro format --check # ensure everything is formatted\ngro lint # eslint\n```\n\nFor a usage example see [the `check.yml` CI config](.github/workflows/check.yml).\n\nFormatting with [`prettier`](https://github.com/prettier/prettier):\n\n```bash\ngro format # format all of the source files using Prettier\ngro format --check # check that all source files are formatted\n```\n\nCodegen with [`gen`](/src/docs/gen.md):\n\n```bash\ngro gen # run codegen for all `*.gen.*` files\ngro gen --check # error if any generated files are new or different\n```\n\nTo deploy: (also see [`src/docs/deploy.md`](/src/docs/deploy.md))\n\n```bash\ngro deploy # build and push to the `deploy` branch\n```\n\nTo publish: (also see [`src/docs/publish.md`](/src/docs/publish.md))\n\n```bash\ngro publish # flush changeset to changelog, bump version, publish to npm, and git push\n```\n\nMore:\n\n```bash\ngro clean # delete all build artifacts from the filesystem\ngro clean --sveltekit --nodemodules --git # also deletes dirs and prunes git branches\ngro upgrade excluded-dep-1 excluded-dep-2 # npm updates to the latest everything\ngro --version # print the Gro version\n```\n\nFor more see [the tasks index](/src/docs/tasks.md),\n[the task feature docs](/src/docs/task.md), and [the docs index](/src/docs/README.md).\n\n## develop\n\n```bash\nnpm i\nnpm run bootstrap # build and link `gro` without itself - needed only once\ngro build # same as `npm run bootstrap` when the `gro` CLI is available\ngro test # make sure everything looks good - same as `npm test`\ngro test some.test another.test\n\n# use your development version of `gro` locally in another project:\ngro build # updates the `gro` CLI, same as `npm run bootstrap`\ncd ../otherproject\nnpm link ../gro # from `otherproject/`\ngro build # from `../gro` on changes\n```\n\n## credits 🐢\u003csub\u003e🐢\u003c/sub\u003e\u003csub\u003e\u003csub\u003e🐢\u003c/sub\u003e\u003c/sub\u003e\n\nGro builds on\n[TypeScript](https://github.com/microsoft/TypeScript) ∙\n[Svelte](https://github.com/sveltejs/svelte) ∙\n[SvelteKit](https://github.com/sveltejs/kit) ∙\n[Vite](https://github.com/vitejs/vite) ∙\n[esbuild](https://github.com/evanw/esbuild) ∙\n[uvu](https://github.com/lukeed/uvu) ∙\n[mri](https://github.com/lukeed/mri) ∙\n[chokidar](https://github.com/paulmillr/chokidar) ∙\n[zod](https://github.com/colinhacks/zod) ∙\n[@ryanatkn/belt](https://github.com/ryanatkn/belt) ∙\n[ESLint](https://github.com/eslint/eslint) ∙\n[Prettier](https://github.com/prettier/prettier) ∙\n[svelte-check](https://github.com/sveltejs/language-tools/tree/master/packages/svelte-check) \u0026\n[more](package.json)\n\n## license [🐦](https://wikipedia.org/wiki/Free_and_open-source_software)\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanatkn%2Fgro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanatkn%2Fgro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanatkn%2Fgro/lists"}