14 Commits

Author SHA1 Message Date
Sigurd Spieckermann
f374fd9baa build: migrate from Poetry to uv 2025-04-22 12:20:23 +02:00
Jairo Llopis
e14f21c22b build(vscode-extensions): update recommendations
Using builtin prettier and ruff extensions is of no help because we use devenv.

Instead, pre-commit and nix-ide extensions integrate perfectly out of the box.

Thus, updating recommendations.
2024-12-03 17:57:36 +01:00
Jairo Llopis
19be0a1a74 build(lint): switch over to ruff; add taplo
Ruff is faster, better integrated, easier to configure... Cool!

Taplo also helps with toml maintenance.
2024-01-15 18:26:48 +00:00
Jairo Llopis
6996b9cc7a feat: add recopy command and function
This new command allows to reapply a template, keeping old answers but discarding subproject evolution.

It is useful when there are bugs replaying an old version of the template, or when the subproject has drifted too much from the template and you need to reset it.

BREAKING CHANGE: All CLI calls to Copier must now include the subcommand as the 1st argument. For example, `copier` must become now `copier update`; also `copier ./tpl ./dst` must become `copier copy ./tpl ./dst`.

BREAKING CHANGE: All flags must go after the subcommand now. For example, `copier -r HEAD update ./dst` must now become `copier update -r HEAD ./dst` or `copier update ./dst -r HEAD`.

BREAKING CHANGE: Automatic mode removed. Since now subcommands are required, the automatic mode is removed.

BREAKING CHANGE: Deprecated `copier.copy` function is removed. Use `copier.run_copy`, `copier.run_update` or `copier.run_recopy` explicitly as needed.

Fix https://github.com/copier-org/copier/issues/1081
Close https://github.com/copier-org/copier/issues/1082
2023-05-17 11:56:13 +01:00
Jairo Llopis
556202f82a build: use new black formatter 2023-05-14 08:51:24 +01:00
Jairo Llopis
0c5a25157d build(gitpod): recommend mermaid markdown plugin
This allows to preview the mermaid chart in docs while writing it in VSCode.
2021-04-20 07:21:36 +01:00
Jairo Llopis
ee776d9a05 build(gitpod): configure docs server vscode task 2021-04-20 07:21:36 +01:00
Yajo
bbdbeb86c3 build: better gitpod and vscode UX
These days, Gitpod supports VSCode workspaces instead of only Theia.

Theia understands settings under `.vscode` as well as under `.theia`, but VSCode only understands settings under `.vscode`. Thus, it seems reasonable to move settings to that new location and then provide a good UX on both local VSCode and Gitpod's.

I also install new tools such as commitizen.

The goal is that just clicking on Gitpod badge, you have a full dev environment ready to hack.
2021-04-15 17:46:24 +01:00
Jairo Llopis
0bde7f575c
Remove .vscode
Complete the agreed part of #126.
2020-02-27 09:15:35 +00:00
Jairo Llopis
e5f96ec1d0
Merge pull request #111 from Tecnativa/update-only-git-diff
Updates respecting evolved git history
2020-01-27 11:24:01 +00:00
Jairo Llopis
1f2ce1ed25
Updates respecting evolved git history
Fix #88 the easiest way possible. Changes summary:

- A new `--vcs-ref` flag that indicates which commit/ref you want to copy, and only applies when the source directory is git-versioned.
- A new `--no-diff` flag to `copier update` skips the smartypants diff behavior.

What it does?

- Checks you are updating a git-versioned destination from a git-versioned source.
- Clones the destination into temp dir.
- Does a `copier copy -f tmp_src tmp_dst` (yes, a temp dir also).
- Gets the git diff between `tmp_dst` and `dst_path`.
- Performs a normal `copier update dst_path`.
- Applies the git diff at the end, to try to respect downstream project evolution.

@Tecnativa TT20357
2020-01-23 12:38:57 +00:00
Jairo Llopis
6dd69a957f
Support custom templates suffix
The `.tmpl` suffix doesn't seem to be a very widely adopted standard on the Jinja world. Others like `.jinja` or `.j2` usually have better IDE integration.

It's not like `.tmpl` is a wrong default, so here I'm leaving it as a default but letting template developers to change it to another one that fits better their environment.

Apart from this, if you really had to produce any `.tmpl` files in your copies, having files that ended with `.tmpl.tmpl` seemed a bit weird, while now you can change that suffix to whatever fits better your project.

@Tecnativa TT20357
2020-01-23 11:30:56 +00:00
Jairo Llopis
f8673465ba
Improve autoformatting
Continues the job started in #104:

- Configure more languages for VSCode to format on save.
- Recommend extensions for VSCode.
- Remove settings from `.prettierrc.yml` that are duplicated in `.editorconfig` (which prettier uses by default).
2020-01-09 13:34:57 +00:00
Jairo Llopis
906216fba8 Configure vscode
With these settings, we enable debugging, and developing in vscode is easier.
2019-12-10 11:52:41 +00:00