lemmy-ui: init at 0.12.2

This commit is contained in:
Bill Ewanick 2021-09-09 10:28:32 -04:00 committed by Jonathan Ringer
parent eeb2a590b0
commit 62f24d0c57
4 changed files with 9410 additions and 0 deletions

View File

@ -0,0 +1,113 @@
{
"name": "lemmy-ui",
"version": "0.12.2",
"description": "An isomorphic UI for lemmy",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"scripts": {
"build:dev": "webpack --mode=development",
"build:prod": "webpack --mode=production",
"clean": "yarn run rimraf dist",
"dev": "yarn start",
"lint": "node generate_translations.js && tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src",
"prebuild:dev": "yarn clean && node generate_translations.js",
"prebuild:prod": "yarn clean && node generate_translations.js",
"start": "yarn build:dev --watch"
},
"repository": "https://github.com/LemmyNet/lemmy-ui",
"dependencies": {
"@typescript-eslint/parser": "^4.28.3",
"autosize": "^5.0.1",
"choices.js": "^9.0.1",
"emoji-short-name": "^1.0.0",
"express": "~4.17.1",
"i18next": "^20.3.3",
"inferno": "^7.4.9",
"inferno-create-element": "^7.4.9",
"inferno-helmet": "^5.2.1",
"inferno-hydrate": "^7.4.9",
"inferno-i18next": "github:nimbusec-oss/inferno-i18next#semver:^7.4.2",
"inferno-router": "^7.4.9",
"inferno-server": "^7.4.9",
"isomorphic-cookie": "^1.2.4",
"jwt-decode": "^3.1.2",
"markdown-it": "^12.1.0",
"markdown-it-container": "^3.0.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"moment": "^2.29.1",
"reconnecting-websocket": "^4.4.0",
"register-service-worker": "^1.7.2",
"rxjs": "^7.2.0",
"serialize-javascript": "^6.0.0",
"tippy.js": "^6.3.1",
"toastify-js": "^1.11.1",
"tributejs": "^5.1.3",
"ws": "^8.2.0"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/plugin-transform-typescript": "^7.14.6",
"@babel/preset-env": "7.15.0",
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.14.6",
"@types/autosize": "^4.0.0",
"@types/express": "^4.17.13",
"@types/node": "^16.7.1",
"@types/node-fetch": "^2.5.11",
"@types/serialize-javascript": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"babel-loader": "^8.2.2",
"babel-plugin-inferno": "^6.3.0",
"bootstrap": "^5.0.2",
"bootswatch": "^5.0.2",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^6.0.0",
"eslint": "^7.30.0",
"eslint-plugin-prettier": "^3.4.1",
"husky": "^7.0.1",
"import-sort-style-module": "^6.0.0",
"iso-639-1": "^2.1.9",
"lemmy-js-client": "0.12.0",
"lint-staged": "^11.0.1",
"mini-css-extract-plugin": "^2.1.0",
"node-fetch": "^2.6.1",
"node-sass": "^6.0.1",
"prettier": "^2.3.2",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^2.2.0",
"prettier-plugin-packagejson": "^2.2.11",
"rimraf": "^3.0.2",
"run-node-webpack-plugin": "^1.3.0",
"sass-loader": "^12.1.0",
"sortpack": "^2.2.0",
"style-loader": "^3.1.0",
"terser": "^5.7.1",
"typescript": "^4.3.5",
"webpack": "5.51.1",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "4.0.0",
"webpack-node-externals": "^3.0.0"
},
"engines": {
"node": ">=8.9.0"
},
"engineStrict": true,
"lint-staged": {
"*.{ts,tsx,js}": [
"prettier --write",
"eslint --fix"
],
"package.json": [
"sortpack"
]
},
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
}
}

View File

@ -0,0 +1,74 @@
{ lib
, mkYarnPackage
, libsass
, nodejs
, python3
, pkg-config
, writeShellScriptBin
, fetchFromGitHub
}:
let
pkgConfig = {
node-sass = {
nativeBuildInputs = [ ];
buildInputs = [ libsass pkg-config python3 ];
postInstall = ''
LIBSASS_EXT=auto yarn --offline run build
rm build/config.gypi
'';
};
};
name = "lemmy-ui";
version = "0.12.2";
unwrapped = mkYarnPackage {
src = fetchFromGitHub {
owner = "LemmyNet";
repo = name;
rev = version;
fetchSubmodules = true;
sha256 = "sha256-iFLJqUnz4m9/JTSaJSUugzY5KkiKtH0sMYY4ALm2Ebk=";
};
inherit pkgConfig name version;
extraBuildInputs = [ libsass ];
yarnNix = ./yarn.nix;
# Fails mysteriously on source/package.json
# Upstream package.json is missing a newline at the end
packageJSON = ./package.json;
yarnPreBuild = ''
export npm_config_nodedir=${nodejs}
'';
buildPhase = ''
# Yarn writes cache directories etc to $HOME.
export HOME=$PWD/yarn_home
ln -sf $PWD/node_modules $PWD/deps/lemmy-ui/
yarn --offline build:prod
'';
distPhase = "true";
meta = with lib; {
description = "Building a federated alternative to reddit in rust";
homepage = "https://join-lemmy.org/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada billewanick ];
platforms = platforms.linux;
};
};
in
(writeShellScriptBin "lemmy-ui" ''
${nodejs}/bin/node ${unwrapped}/libexec/lemmy-ui/node_modules/lemmy-ui/dist/js/server.js
'').overrideAttrs (oldAttrs: {
passthru = { inherit unwrapped; };
})

File diff suppressed because it is too large Load Diff

View File

@ -20136,6 +20136,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
lemmy-ui = callPackage ../servers/web-apps/lemmy/ui.nix { };
lighttpd = callPackage ../servers/http/lighttpd { };
livepeer = callPackage ../servers/livepeer { };