mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 12:44:20 +00:00
Merge pull request #241339 from NotAShelf/prettierd
prettierd: init at 0.23.4
This commit is contained in:
commit
37878e020c
@ -11420,6 +11420,16 @@
|
|||||||
githubId = 22817873;
|
githubId = 22817873;
|
||||||
name = "Ember Keske";
|
name = "Ember Keske";
|
||||||
};
|
};
|
||||||
|
n3oney = {
|
||||||
|
name = "Michał Minarowski";
|
||||||
|
email = "nixpkgs@neoney.dev";
|
||||||
|
github = "n3oney";
|
||||||
|
githubId = 30625554;
|
||||||
|
matrix = "@neoney:matrix.org";
|
||||||
|
keys = [{
|
||||||
|
fingerprint = "9E6A 25F2 C1F2 9D76 ED00 1932 1261 173A 01E1 0298";
|
||||||
|
}];
|
||||||
|
};
|
||||||
nadrieril = {
|
nadrieril = {
|
||||||
email = "nadrieril@gmail.com";
|
email = "nadrieril@gmail.com";
|
||||||
github = "Nadrieril";
|
github = "Nadrieril";
|
||||||
@ -11995,9 +12005,10 @@
|
|||||||
};
|
};
|
||||||
NotAShelf = {
|
NotAShelf = {
|
||||||
name = "NotAShelf";
|
name = "NotAShelf";
|
||||||
email = "itsashelf@gmail.com";
|
email = "raf@notashelf.dev";
|
||||||
github = "NotAShelf";
|
github = "NotAShelf";
|
||||||
githubId = 62766066;
|
githubId = 62766066;
|
||||||
|
matrix = "@raf:notashelf.dev";
|
||||||
};
|
};
|
||||||
notbandali = {
|
notbandali = {
|
||||||
name = "Amin Bandali";
|
name = "Amin Bandali";
|
||||||
|
51
pkgs/development/tools/prettierd/default.nix
Normal file
51
pkgs/development/tools/prettierd/default.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{ lib
|
||||||
|
, mkYarnPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, makeWrapper
|
||||||
|
, nodejs
|
||||||
|
, fetchYarnDeps
|
||||||
|
,
|
||||||
|
}:
|
||||||
|
mkYarnPackage rec {
|
||||||
|
pname = "prettierd";
|
||||||
|
version = "0.23.4";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "fsouza";
|
||||||
|
repo = "prettierd";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-GTukjkA/53N9ICdfCJr5HAqhdL5T0pth6zAk8Fu/cis=";
|
||||||
|
};
|
||||||
|
|
||||||
|
offlineCache = fetchYarnDeps {
|
||||||
|
yarnLock = src + "/yarn.lock";
|
||||||
|
hash = "sha256-32wMwkVgO5DQuROWnujVGNeCAUq1D6jJurecsD2ROOU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
packageJSON = ./package.json;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
yarn --offline build
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
# prettierd needs to be wrapped with nodejs so that it can be executed
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram "$out/bin/prettierd" --prefix PATH : "${nodejs}/bin"
|
||||||
|
'';
|
||||||
|
|
||||||
|
doDist = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Prettier, as a daemon, for improved formatting speed";
|
||||||
|
homepage = "https://github.com/fsouza/prettierd";
|
||||||
|
license = licenses.isc;
|
||||||
|
changelog = "https://github.com/fsouza/prettierd/blob/${src.rev}/CHANGELOG.md";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ NotAShelf n3oney ];
|
||||||
|
};
|
||||||
|
}
|
46
pkgs/development/tools/prettierd/package.json
Normal file
46
pkgs/development/tools/prettierd/package.json
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"name": "@fsouza/prettierd",
|
||||||
|
"version": "0.23.4",
|
||||||
|
"description": "prettier, as a daemon",
|
||||||
|
"bin": {
|
||||||
|
"prettierd": "./bin/prettierd"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "yarn build",
|
||||||
|
"build": "tsc -b",
|
||||||
|
"run": "node bin/prettierd",
|
||||||
|
"start": "node bin/prettierd start",
|
||||||
|
"prettier:check": "prettier --check .",
|
||||||
|
"prettier:fix": "prettier --write ."
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/fsouza/prettierd.git"
|
||||||
|
},
|
||||||
|
"author": "Francisco Souza",
|
||||||
|
"license": "ISC",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/fsouza/prettierd/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/fsouza/prettierd",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
|
"@types/prettier": "^2.7.2",
|
||||||
|
"typescript": "^5.0.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core_d": "^5.0.1",
|
||||||
|
"nanolru": "^1.0.0",
|
||||||
|
"prettier": "^2.8.8"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"bin",
|
||||||
|
"dist",
|
||||||
|
"LICENSE",
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@babel/parser": "^7.22.3",
|
||||||
|
"@typescript-eslint/typescript-estree": "^5.59.7"
|
||||||
|
}
|
||||||
|
}
|
@ -11706,6 +11706,8 @@ with pkgs;
|
|||||||
|
|
||||||
pretender = callPackage ../tools/security/pretender { };
|
pretender = callPackage ../tools/security/pretender { };
|
||||||
|
|
||||||
|
prettierd = callPackage ../development/tools/prettierd { };
|
||||||
|
|
||||||
pretty-simple = callPackage ../development/tools/pretty-simple { };
|
pretty-simple = callPackage ../development/tools/pretty-simple { };
|
||||||
|
|
||||||
prettyping = callPackage ../tools/networking/prettyping { };
|
prettyping = callPackage ../tools/networking/prettyping { };
|
||||||
|
Loading…
Reference in New Issue
Block a user