Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/swap-prettier-for-tsv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@fuzdev/gro': minor
---

feat: replace Prettier with [`tsv`](https://github.com/fuzdev/tsv)

4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Gro (`@fuzdev/gro`) is a dev tool for building TypeScript projects with
SvelteKit, providing: convention-based task runner, Node loader for
TypeScript/Svelte/SvelteKit modules, code generation system, plugin
architecture, and integrations with Vite, esbuild, Vitest, Prettier, ESLint, and
architecture, and integrations with Vite, esbuild, Vitest, tsv, ESLint, and
Changesets. It's designed around conventions and the filesystem, not
configuration files.

Expand Down Expand Up @@ -168,7 +168,7 @@ Naming convention:

Return values:

- String: default filename, auto-formatted with Prettier
- String: default filename, auto-formatted with tsv
- Object: `{content, filename?, format?}` for control
- Array: multiple files from one genfile
- `null`: no-op
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ It includes:
- codegen by convention with [`gen`](/src/docs/gen.md)
- linting with [ESLint](https://github.com/eslint/eslint)
(I also maintain [`@feltjs/eslint-config`](https://github.com/feltjs/eslint-config))
- formatting with [Prettier](https://github.com/prettier/prettier)
- formatting with [`tsv`](https://github.com/fuzdev/tsv)

## docs

Expand Down Expand Up @@ -207,10 +207,10 @@ gro lint # eslint

For a usage example see [the `check.yml` CI config](.github/workflows/check.yml).

Formatting with [`prettier`](https://github.com/prettier/prettier):
Formatting with [`tsv`](https://github.com/fuzdev/tsv):

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

Expand Down Expand Up @@ -274,7 +274,7 @@ Gro builds on
[zod](https://github.com/colinhacks/zod) ∙
[@fuzdev/fuz_util](https://github.com/fuzdev/fuz_util) ∙
[ESLint](https://github.com/eslint/eslint) ∙
[Prettier](https://github.com/prettier/prettier) ∙
[tsv](https://github.com/fuzdev/tsv) ∙
[svelte-check](https://github.com/sveltejs/language-tools/tree/master/packages/svelte-check) &
[more](package.json)

Expand Down
64 changes: 36 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 2 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"bugs": "https://github.com/fuzdev/gro/issues",
"funding": "https://www.ryanatkn.com/funding",
"scripts": {
"bootstrap": "rm -rf .gro dist && svelte-kit sync && svelte-package && chmod +x ./dist/gro.js && npm link -f",
"bootstrap": "rm -rf .gro dist && svelte-kit sync && svelte-package && node -e \"import('./src/lib/dist_rewrite_imports.ts').then((m) => m.rewrite_dist_imports())\" && chmod +x ./dist/gro.js && npm link -f",
"start": "gro dev",
"dev": "gro dev",
"build": "gro build",
Expand Down Expand Up @@ -48,12 +48,11 @@
"typescript"
],
"dependencies": {
"@fuzdev/tsv_wasm": "^0.1.0",
"chokidar": "^5.0.0",
"dotenv": "^17.2.3",
"esm-env": "^1.2.2",
"oxc-parser": "^0.99.0",
"prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.5.1",
"ts-blank-space": "^0.6.2",
"tslib": "^2.8.1"
},
Expand Down Expand Up @@ -115,23 +114,6 @@
"zimmerframe": "^1.1.4",
"zod": "^4.3.6"
},
"prettier": {
"plugins": [
"prettier-plugin-svelte"
],
"useTabs": true,
"printWidth": 100,
"singleQuote": true,
"bracketSpacing": false,
"overrides": [
{
"files": "package.json",
"options": {
"useTabs": false
}
}
]
},
"sideEffects": [
"**/*.css"
],
Expand Down
1 change: 1 addition & 0 deletions src/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# docs


> <sub>[gro](/../..) / docs / README.md</sub>

- [build](build.md)
Expand Down
3 changes: 1 addition & 2 deletions src/docs/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ Some builtin Gro tasks call external commands like
[`svelte-kit`](https://github.com/sveltejs/kit),
[`vite`](https://github.com/vitejs/vite),
[`vitest`](https://github.com/vitest-dev/vitest),
[`tsc`](https://github.com/microsoft/typescript),
and [`prettier`](https://github.com/prettier/prettier).
and [`tsc`](https://github.com/microsoft/typescript).
Gro supports generic agnostic args forwarding to these tasks via the `--` pattern:
for example, to forward args to `svelte-kit` and `vitest`, no matter which task invokes them,
use `gro taskname --taskname-arg -- vitest --arg1 neat --arg2 22 -- svelte-kit --arg3`.
Expand Down
3 changes: 0 additions & 3 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const GRO_DIR = GRO_DIRNAME + '/';
/** @trailing_slash */
export const GRO_DEV_DIR = GRO_DEV_DIRNAME + '/';
export const GRO_CONFIG_FILENAME = 'gro.config.ts';
export const README_FILENAME = 'README.md';
export const SVELTE_CONFIG_FILENAME = 'svelte.config.js';
export const VITE_CONFIG_FILENAME = 'vite.config.ts';
export const NODE_MODULES_DIRNAME = 'node_modules';
Expand All @@ -29,7 +28,6 @@ export const SVELTEKIT_DEV_DIRNAME = '.svelte-kit'; // TODO use Svelte config va
export const SVELTEKIT_BUILD_DIRNAME = 'build';
export const SVELTEKIT_DIST_DIRNAME = 'dist';
export const SVELTEKIT_VITE_CACHE_PATH = NODE_MODULES_DIRNAME + '/.vite';
export const GITHUB_DIRNAME = '.github';
export const GIT_DIRNAME = '.git';
export const TSCONFIG_FILENAME = 'tsconfig.json';

Expand All @@ -47,7 +45,6 @@ export const EVERYTHING_MATCHER = /.*/;

export const JS_CLI_DEFAULT = 'node';
export const PM_CLI_DEFAULT = 'npm';
export const PRETTIER_CLI_DEFAULT = 'prettier';
export const SVELTEKIT_CLI = 'svelte-kit';
export const SVELTE_CHECK_CLI = 'svelte-check';
export const SVELTE_PACKAGE_CLI = 'svelte-package';
Expand Down
4 changes: 3 additions & 1 deletion src/lib/filer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,9 @@ export const filter_dependents = (
const dependent_disknode = get_by_id(dependent_id);
if (!dependent_disknode) {
log?.warn(
`[filer.filter_dependents] dependent source file ${dependent_id} not found for ${current.id}`,
`[filer.filter_dependents] dependent source file ${dependent_id} not found for ${
current.id
}`,
);
continue;
}
Expand Down
Loading