Skip to content

Commit

Permalink
Merge pull request #62 from DataChefHQ/fix/nodejs-template
Browse files Browse the repository at this point in the history
fix: NodeJs template
  • Loading branch information
farbodahm authored Nov 7, 2024
2 parents f324280 + baababf commit c026180
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ _subdirectory: template/{{ language }}

# Execute these commands on destination after copy
_tasks:
- devenv shell nixfmt .
- devenv shell nixfmt devenv.nix
- git init
- git add .
- git commit -am 'This is the Inception 🎉'
Expand Down
2 changes: 1 addition & 1 deletion includes/base.nix.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
pre-commit.hooks = {
nixfmt-rfc-style = {
enable = true;
excludes = [ ".devenv.flake.nix" ];
excludes = [ ".devenv.flake.nix" "node_modules/**" ];
};
yamllint = {
enable = true;
Expand Down
31 changes: 16 additions & 15 deletions template/Node.js/devenv.nix.jinja
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{% extends pathjoin("includes", "base.nix.jinja") %}

{% block languages %}
rust = {
enable = true;

# https://devenv.sh/reference/options/#languagesrustchannel
channel = "nightly";
{% block packages %}
pkgs.nodePackages.vscode-langservers-extracted
pkgs.nodePackages.typescript-language-server
{% endblock %}

components = [
"rustc"
"cargo"
"clippy"
"rustfmt"
"rust-analyzer"
];
};
{% block languages %}
javascript.enable = true;
javascript.npm = {
enable = true;
install.enable = true;
};
typescript.enable = true;
{% endblock %}

{% block hooks %}
editorconfig-checker.enable = true;
prettier.enable = true;
editorconfig-checker.enable = true;
eslint = {
enable = true;
};
{% endblock %}
2 changes: 1 addition & 1 deletion template/Node.js/devenv.yaml.jinja
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% include pathjoin("includes", "devenv.rust.yaml") %}
{% include pathjoin("includes", "devenv.yaml") %}

0 comments on commit c026180

Please sign in to comment.