Skip to content
Open
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
2 changes: 1 addition & 1 deletion qwik-city-vite/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
# "vscodevim.vim"
"qwik.qwik-vscode"
];
workspace = {
# Runs when a workspace is first created with this `dev.nix` file
Expand Down
19 changes: 18 additions & 1 deletion qwik-city-vite/idx-template.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@
pkgs.nodejs_20
];
bootstrap = ''
set -e
mkdir -p "$WS_NAME"
npm create qwik@latest "empty" "$WS_NAME"

# Pin @eslint/js to version 9 to avoid conflicts
# with eslint-plugin-qwik
cd "$WS_NAME"
node -e '
const fs = require("fs");
const path = "package.json";
const pkg = JSON.parse(fs.readFileSync(path, "utf-8"));
if (pkg.devDependencies && pkg.devDependencies["@eslint/js"]) {
console.log("Pinning @eslint/js to ^9.0.0");
pkg.devDependencies["@eslint/js"] = "^9.0.0";
}
fs.writeFileSync(path, JSON.stringify(pkg, null, 2));
'
cd ..

mkdir -p "$WS_NAME/.idx/"
cp -rf ${./icon.png} "$WS_NAME/.idx/icon.png"
cp -rf ${./dev.nix} "$WS_NAME/.idx/dev.nix"
Expand All @@ -19,4 +36,4 @@

cd "$out"; npm install --package-lock-only --ignore-scripts
'';
}
}