version 0.1.0

This commit is contained in:
Ivan Dimitrov 2023-12-19 16:33:47 +02:00
parent 59e5d22a5a
commit 54bd70ddc5
6 changed files with 1590 additions and 52 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules node_modules
outputs outputs
pid pid
result

BIN
bun.lockb

Binary file not shown.

View File

@ -15,50 +15,52 @@
}; };
outputs = { self, nixpkgs, flake-utils, systems, ide }: outputs = { self, nixpkgs, flake-utils, systems, ide }:
flake-utils.lib.eachDefaultSystem (system: let
let system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pname = "cv"; pname = "cv";
version = "0.0.1"; version = "0.1.0";
src = ./.; src = ./.;
nvim = ide.nvim.${system}.standalone { nvim = ide.nvim.${system}.standalone {
plugins = { plugins = {
lsp.servers = { lsp.servers = {
tsserver.enable = true; tsserver.enable = true;
jsonls.enable = true; jsonls.enable = true;
tailwindcss.enable = true; tailwindcss.enable = true;
};
}; };
}; };
buildInputs = with pkgs; [ };
nvim buildInputs = with pkgs; [
]; nvim
nativeBuildInputs = with pkgs; [ inotify-tools
nodejs_20 ];
bun nativeBuildInputs = with pkgs; [
inotify-tools bun
]; ];
shellHook = '' shellHook = ''
echo "$$" > ./pid echo "$$" > ./pid
monitor() { monitor() {
while true; do while true; do
inotifywait -e modify ${pname}.tsx > /dev/null 2>&1 inotifywait -e modify ${pname}.tsx > /dev/null 2>&1
make make
pkill -HUP mupdf pkill -HUP mupdf
done done
} }
monitor > /dev/null 2>&1 & monitor > /dev/null 2>&1 &
'';
in
{
devShells.default = pkgs.mkShell {
inherit pname buildInputs nativeBuildInputs shellHook;
};
packages.${system}.default = pkgs.buildNpmPackage rec {
inherit nativeBuildInputs pname version src;
npmDepsHash = "sha256-1fqP3HFhziup3U97t+Kx8JMAd+ZpJmz5WZATR1CaQZY=";
postInstall = ''
ls -alh
mkdir -p $out
rm -rf $out/lib
''; '';
in };
{ };
devShells.default = pkgs.mkShell {
inherit pname buildInputs nativeBuildInputs shellHook;
};
packages.default = pkgs.stdenv.mkDerivation {
inherit buildInputs nativeBuildInputs pname version src;
};
});
} }

View File

@ -2,12 +2,12 @@ main = $(pname).tsx
default: all default: all
all: all:
-bun $(main) bun $(main)
clean: clean:
rm -f $(pname) rm -f $(pname)
install: $(pname) install: $(pname)
mkdir -p $(out)/bin mkdir -p $(out)
install $(pname).pdf $(out)/bin/$(pname) install $(pname).pdf $(out)/$(pname)

1531
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,23 @@
{ {
"name": "cv", "name": "cv",
"version": "0.1.0",
"module": "cv.tsx", "module": "cv.tsx",
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {
"bun-types": "latest" "bun-types": "latest"
}, },
"scripts": {
"build": "bun cv.tsx"
},
"peerDependencies": { "peerDependencies": {
"typescript": "^5.0.0" "typescript": "latest"
}, },
"dependencies": { "dependencies": {
"@react-pdf/renderer": "^3.1.14", "@react-pdf/renderer": "latest",
"@types/node": "^20.9.0", "@types/node": "latest",
"@types/react": "^18.2.37", "@types/react": "latest",
"react": "^18.2.0", "react": "latest",
"react-pdf-tailwind": "^2.1.0" "react-pdf-tailwind": "latest"
}, },
"prettier": { "prettier": {
"trailingComma": "es5", "trailingComma": "es5",