mirror of
https://github.com/fmhy/edit.git
synced 2026-03-11 08:55:38 +00:00
chore: add flake.nix
add instructions for nix
This commit is contained in:
parent
5536f0699a
commit
d996c2a1a1
6 changed files with 53 additions and 12 deletions
20
.github/CONTRIBUTING.md
vendored
20
.github/CONTRIBUTING.md
vendored
|
|
@ -96,6 +96,8 @@ ### Using the GitHub editor
|
||||||
|
|
||||||
### Manually setting up a development environment
|
### Manually setting up a development environment
|
||||||
|
|
||||||
|
#### Manually
|
||||||
|
|
||||||
1. Fork the repository by clicking the "Fork" button in the top right corner.
|
1. Fork the repository by clicking the "Fork" button in the top right corner.
|
||||||
|
|
||||||
2. Make sure you have [Node.js](https://nodejs.org/en/), [pnpm](https://pnpm.io/), [git](https://git-scm.com/), and [VSCode](https://code.visualstudio.com/) or any other editor installed.
|
2. Make sure you have [Node.js](https://nodejs.org/en/), [pnpm](https://pnpm.io/), [git](https://git-scm.com/), and [VSCode](https://code.visualstudio.com/) or any other editor installed.
|
||||||
|
|
@ -107,3 +109,21 @@ ### Manually setting up a development environment
|
||||||
5. Add your changes with git (`git add <file>`) and commit (`git commit -m "commit message"`), then push them (`git push`).
|
5. Add your changes with git (`git add <file>`) and commit (`git commit -m "commit message"`), then push them (`git push`).
|
||||||
|
|
||||||
6. Create a pull request by clicking the "New Pull Request" button in your forked repository, and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed.
|
6. Create a pull request by clicking the "New Pull Request" button in your forked repository, and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed.
|
||||||
|
|
||||||
|
#### Nix
|
||||||
|
|
||||||
|
You can use [nix](https://nixos.org/) to set up a development environment, we have a [flake](https://nixos.wiki/wiki/Flakes) that setups `nodejs` and `pnpm`.
|
||||||
|
|
||||||
|
1. Fork the repository by clicking the "Fork" button in the top right corner and clone your forked repository to your local machine.
|
||||||
|
|
||||||
|
2. Run `nix flake update` to update the flake lock file.
|
||||||
|
|
||||||
|
3. Run `nix develop` to enter the development environment.
|
||||||
|
|
||||||
|
4. Make changes.
|
||||||
|
|
||||||
|
5. Exit the development environment by running `exit`.
|
||||||
|
|
||||||
|
6. Commit your changes and push them to your forked repository.
|
||||||
|
|
||||||
|
7. Create a pull request by clicking the "New Pull Request" button in your forked repository, and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed.
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,3 +9,4 @@ node_modules
|
||||||
dist
|
dist
|
||||||
.eslintcache
|
.eslintcache
|
||||||
docs/.vitepress/.temp
|
docs/.vitepress/.temp
|
||||||
|
result
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.nodejs_20
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -35,11 +35,12 @@ :root {
|
||||||
--vp-custom-block-tip-text: theme('colors.meadow.800');
|
--vp-custom-block-tip-text: theme('colors.meadow.800');
|
||||||
--vp-custom-block-tip-text-deep: theme('colors.meadow.900');
|
--vp-custom-block-tip-text-deep: theme('colors.meadow.900');
|
||||||
/** Warning */
|
/** Warning */
|
||||||
--vp-custom-block-warning-bg: theme('colors.merlin.100'),
|
--vp-custom-block-warning-bg: theme('colors.merlin.100');
|
||||||
--vp-custom-block-warning-border: theme('colors.merlin.800'),
|
--vp-custom-block-warning-border: theme('colors.merlin.800');
|
||||||
--vp-custom-block-warning-text: theme('colors.merlin.800'),
|
--vp-custom-block-warning-text: theme('colors.merlin.800');
|
||||||
--vp-custom-block-warning-text-deep: theme('colors.merlin.900'),
|
--vp-custom-block-warning-text-deep: theme('colors.merlin.900');
|
||||||
/** Danger */ --vp-custom-block-danger-bg: theme('colors.carnation.100');
|
/** Danger */
|
||||||
|
--vp-custom-block-danger-bg: theme('colors.carnation.100');
|
||||||
--vp-custom-block-danger-border: theme('colors.carnation.800');
|
--vp-custom-block-danger-border: theme('colors.carnation.800');
|
||||||
--vp-custom-block-danger-text: theme('colors.carnation.800');
|
--vp-custom-block-danger-text: theme('colors.carnation.800');
|
||||||
--vp-custom-block-danger-text-deep: theme('colors.carnation.900');
|
--vp-custom-block-danger-text-deep: theme('colors.carnation.900');
|
||||||
|
|
|
||||||
BIN
flake.lock
Normal file
BIN
flake.lock
Normal file
Binary file not shown.
26
flake.nix
Normal file
26
flake.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
outputs = {nixpkgs, ...}: let
|
||||||
|
forAllSystems = f:
|
||||||
|
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
f pkgs);
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (pkgs: {
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forAllSystems (pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
pnpm
|
||||||
|
git
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue