listmonk: build frontend using yarn{Config,Build}Hook
This commit is contained in:
parent
ef845dd609
commit
e5cb34b6c7
@ -1,37 +1,34 @@
|
||||
{ mkYarnPackage
|
||||
{ stdenv
|
||||
, fetchYarnDeps
|
||||
, yarnConfigHook
|
||||
, yarnBuildHook
|
||||
, nodejs
|
||||
, meta
|
||||
, version
|
||||
, src
|
||||
}:
|
||||
|
||||
mkYarnPackage {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "listmonk-frontend";
|
||||
inherit version;
|
||||
|
||||
src = "${src}/frontend";
|
||||
packageJSON = ./package.json;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/frontend/yarn.lock";
|
||||
hash = "sha256-TdrglyRtb2Q8SFtoiCoDj/zBV2+7DwzIm/Fzlt0ZvSo=";
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
ln -s $node_modules node_modules
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
yarn --offline build
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
yarnConfigHook
|
||||
yarnBuildHook
|
||||
nodejs
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -R dist/* $out
|
||||
'';
|
||||
|
||||
doDist = false;
|
||||
|
||||
|
||||
inherit meta;
|
||||
}
|
||||
})
|
||||
|
@ -1,45 +0,0 @@
|
||||
{
|
||||
"name": "listmonk",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"lint": "eslint --ext .js,.vue --ignore-path .gitignore src",
|
||||
"prebuild": "eslint --ext .js,.vue --ignore-path .gitignore src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tinymce/tinymce-vue": "^3",
|
||||
"axios": "^1.6.2",
|
||||
"buefy": "^0.9.25",
|
||||
"bulma": "^0.9.4",
|
||||
"chart.js": "^4.4.1",
|
||||
"codeflask": "^1.4.1",
|
||||
"dayjs": "^1.11.10",
|
||||
"indent.js": "^0.3.5",
|
||||
"qs": "^6.10.1",
|
||||
"textversionjs": "^1.1.3",
|
||||
"tinymce": "^5.10.9",
|
||||
"turndown": "^7.1.2",
|
||||
"vue": "^2.7.14",
|
||||
"vue-chartjs": "^5.3.0",
|
||||
"vue-i18n": "^8.28.2",
|
||||
"vue-router": "^3.2.0",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue2": "^2.3.1",
|
||||
"@vue/eslint-config-airbnb": "^7.0.1",
|
||||
"cypress": "13.6.1",
|
||||
"cypress-file-upload": "^5.0.2",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-define-config": "^2.0.0",
|
||||
"eslint-plugin-import": "^2.23.3",
|
||||
"eslint-plugin-vue": "^9.19.2",
|
||||
"sass": "^1.34.0",
|
||||
"vite": "^5.0.12",
|
||||
"vue-eslint-parser": "^9.3.2",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user