Just built

This commit is contained in:
Cris Stringfellow 2023-01-11 11:37:35 +08:00
parent 896bcf576f
commit 3f05da672c
No known key found for this signature in database
3 changed files with 19 additions and 8 deletions

View File

@ -1,10 +1,9 @@
{
"name": "diskernet",
"version": "2.4.11",
"type": "module",
"version": "2.6.0",
"description": "Library server and an archivist browser controller.",
"main": "src/app.js",
"module": "dist/22120-module.js",
"main": "build/22120.js",
"module": "src/app.js",
"bin": {
"diskernet": "build/22120.js"
},
@ -27,11 +26,21 @@
"url": "git+https://github.com/dosyago/22120.git"
},
"pkg": {
"patches": {
"./node_modules/fetch-blob/streams.cjs": [
"Object.assign(globalThis, require('node:stream/web'))",
"Object.assign(globalThis, require('stream').web)"
]
},
"scripts": "build/*.js",
"assets": "public/**/*",
"outputPath": "bin"
},
"keywords": [
"web-archive",
"search-engine",
"self-hosted",
"offline",
"archivist",
"library"
],
@ -62,6 +71,7 @@
"nodemon": "latest",
"npx": "^3.0.0",
"webpack": "latest",
"webpack-cli": "latest"
"webpack-cli": "latest",
"rollup-plugin-terser": "^7.0.2"
}
}

View File

@ -36,6 +36,7 @@ fi
npm run bundle
echo "Bundling javascript..."
export NODE_ENV='production'
npx webpack
chmod +x ./build/22120.js
echo "Building for windows nix and macos..."

View File

@ -1,5 +1,5 @@
import path from 'path';
import {fileURLToPath} from 'url';
//import {fileURLToPath} from 'url';
export const DEBUG = process.env.DEBUG_22120 || false;
export const SHOW_FETCH = false;
@ -40,8 +40,8 @@ export const SNIP_CONTEXT = 31;
export const NO_SANDBOX = process.env.DEBUG_22120 || false;
//export const APP_ROOT = '.';
//export const APP_ROOT = __dirname;
export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
export const APP_ROOT = __dirname;
//export const APP_ROOT = path.dirname(fileURLToPath(import.meta.url));
export const sleep = ms => new Promise(res => setTimeout(res, ms));