mirror of https://github.com/TriliumNext/Notes
Merge branch 'develop' into renovate/electron-36.x
commit
13a8c6c488
@ -1,2 +1,7 @@
|
||||
_regroup
|
||||
_regroup_monorepo
|
||||
_regroup_monorepo
|
||||
|
||||
# Asset copying respects .gitignore / .nxignore for some reason.
|
||||
# See https://github.com/nrwl/nx/issues/20309
|
||||
!dist
|
||||
!node_modules
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript"
|
||||
},
|
||||
"target": "es2016"
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const { join } = require('path');
|
||||
|
||||
const outputDir = join(__dirname, 'dist');
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: outputDir,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/i,
|
||||
type: "asset/source"
|
||||
}
|
||||
]
|
||||
},
|
||||
target: [ "node" ],
|
||||
plugins: [
|
||||
new NxAppWebpackPlugin({
|
||||
target: 'node',
|
||||
compiler: 'tsc',
|
||||
main: './src/electron-main.ts',
|
||||
tsConfig: './tsconfig.app.json',
|
||||
assets: ["./src/assets"],
|
||||
optimization: false,
|
||||
outputHashing: 'none',
|
||||
generatePackageJson: false,
|
||||
externalDependencies: [
|
||||
"electron/main",
|
||||
"@electron/remote/main",
|
||||
"electron",
|
||||
"@electron/remote",
|
||||
"better-sqlite3"
|
||||
]
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: "../client/dist",
|
||||
to: join(outputDir, "public")
|
||||
},
|
||||
{
|
||||
from: "../server/dist/node_modules",
|
||||
to: join(outputDir, "node_modules")
|
||||
},
|
||||
{
|
||||
from: "../server/dist/assets",
|
||||
to: join(outputDir, "assets")
|
||||
},
|
||||
{
|
||||
from: "node_modules/@electron/remote",
|
||||
to: join(outputDir, "node_modules/@electron/remote")
|
||||
},
|
||||
{
|
||||
from: "node_modules/prebuild-install",
|
||||
to: join(outputDir, "node_modules/better-sqlite3/node_modules/prebuild-install")
|
||||
},
|
||||
{
|
||||
from: "package.json",
|
||||
to: join(outputDir, "package.json")
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
||||
@ -1,53 +0,0 @@
|
||||
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const { join } = require('path');
|
||||
|
||||
const outputDir = join(__dirname, 'dist');
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: join(__dirname, 'dist'),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/i,
|
||||
type: "asset/source"
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new NxAppWebpackPlugin({
|
||||
target: 'node',
|
||||
compiler: 'tsc',
|
||||
main: './src/electron-docs-main.ts',
|
||||
tsConfig: './tsconfig.app.json',
|
||||
optimization: false,
|
||||
outputHashing: 'none',
|
||||
generatePackageJson: true,
|
||||
externalDependencies: [
|
||||
"electron/main",
|
||||
"@electron/remote/main",
|
||||
"electron",
|
||||
"@electron/remote",
|
||||
"better-sqlite3"
|
||||
]
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: "../desktop/dist/node_modules",
|
||||
to: join(outputDir, "node_modules")
|
||||
},
|
||||
{
|
||||
from: "../desktop/dist/assets",
|
||||
to: join(outputDir, "assets")
|
||||
},
|
||||
{
|
||||
from: "../desktop/dist/public",
|
||||
to: join(outputDir, "public")
|
||||
},
|
||||
]
|
||||
})
|
||||
],
|
||||
};
|
||||
@ -1,3 +1,4 @@
|
||||
TRILIUM_ENV=dev
|
||||
TRILIUM_DATA_DIR=./apps/server/data
|
||||
TRILIUM_RESOURCE_DIR=./apps/server/dist
|
||||
TRILIUM_PUBLIC_SERVER=http://localhost:4200
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"better-sqlite3": "11.10.0"
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const { join } = require('path');
|
||||
|
||||
const outputDir = join(__dirname, 'dist');
|
||||
|
||||
function buildFilesToCopy() {
|
||||
const files = [];
|
||||
|
||||
files.push({
|
||||
from: "../client/dist",
|
||||
to: join(outputDir, "public")
|
||||
});
|
||||
|
||||
const nodePaths = [
|
||||
// Required as they are native dependencies and cannot be well bundled.
|
||||
"better-sqlite3",
|
||||
"bindings",
|
||||
"file-uri-to-path"
|
||||
];
|
||||
|
||||
for (const nodePath of nodePaths) {
|
||||
files.push({
|
||||
from: join("node_modules", nodePath),
|
||||
to: join(outputDir, "node_modules", nodePath)
|
||||
})
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
path: outputDir
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/i,
|
||||
type: "asset/source"
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new NxAppWebpackPlugin({
|
||||
target: 'node',
|
||||
compiler: 'tsc',
|
||||
main: './src/main.ts',
|
||||
tsConfig: './tsconfig.app.json',
|
||||
assets: ["./src/assets"],
|
||||
optimization: false,
|
||||
outputHashing: 'none',
|
||||
generatePackageJson: true,
|
||||
additionalEntryPoints: [
|
||||
"./src/docker_healthcheck.ts"
|
||||
],
|
||||
externalDependencies: [
|
||||
"electron/main",
|
||||
"@electron/remote/main",
|
||||
"electron",
|
||||
"@electron/remote",
|
||||
"better-sqlite3"
|
||||
]
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: buildFilesToCopy()
|
||||
})
|
||||
]
|
||||
};
|
||||
@ -1,22 +0,0 @@
|
||||
{
|
||||
"jsc": {
|
||||
"target": "es2017",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
"transform": {
|
||||
"decoratorMetadata": true,
|
||||
"legacyDecorator": true
|
||||
},
|
||||
"keepClassNames": true,
|
||||
"externalHelpers": true,
|
||||
"loose": true
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"exclude": ["jest.config.ts",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$"]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue