mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-21 08:31:58 +00:00
fix(capacitor): dist nodejs files correctly
This commit is contained in:
parent
f1f2fe39bb
commit
13e98f12fc
9 changed files with 4666 additions and 481 deletions
|
|
@ -4,7 +4,6 @@ const config = {
|
||||||
appId: 'watch.miru',
|
appId: 'watch.miru',
|
||||||
appName: 'Miru',
|
appName: 'Miru',
|
||||||
webDir: 'build',
|
webDir: 'build',
|
||||||
bundledWebRuntime: false,
|
|
||||||
android: {
|
android: {
|
||||||
buildOptions: {
|
buildOptions: {
|
||||||
keystorePath: './watch.miru',
|
keystorePath: './watch.miru',
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export npm_gyp_defines="target_arch=$node_target_arch v8_target_arch=$node_targe
|
||||||
|
|
||||||
#mv node_modules ../node_modules.bak
|
#mv node_modules ../node_modules.bak
|
||||||
# --from-from-source is used by node-pre-gyp
|
# --from-from-source is used by node-pre-gyp
|
||||||
cd resources/nodejs
|
cd public/nodejs
|
||||||
npm rebuild --build-from-source
|
npm rebuild --build-from-source
|
||||||
# Remove executable permissions from native node modules
|
# Remove executable permissions from native node modules
|
||||||
# find node_modules -iname '*.node' -exec chmod -x '{}' \;
|
# find node_modules -iname '*.node' -exec chmod -x '{}' \;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1b0223dc74dfa359e61131ee24e0fa386c6d12aa
|
Subproject commit 23c55996d50e0f750e4b013a51d212e98dc661ea
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "capacitor",
|
"name": "capacitor",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "cd resources/nodejs/ && npm install",
|
"postinstall": "cd public/nodejs/ && npm install",
|
||||||
"build:app": "cross-env NODE_ENV=production run-s build:web build:assets build:android",
|
"build:app": "cross-env NODE_ENV=production run-s build:web build:assets build:android",
|
||||||
"build:web": "webpack build",
|
"build:web": "webpack build",
|
||||||
"build:android": "cap build android",
|
"build:android": "cap build android",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "capacitor-nodejs-thread",
|
"name": "nodejs-capacitor-thread",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"utp-native": "^2.5.3"
|
"utp-native": "^2.5.3"
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const commonConfig = require('common/webpack.config.cjs')
|
const commonConfig = require('common/webpack.config.cjs')
|
||||||
const { merge } = require('webpack-merge')
|
const { merge } = require('webpack-merge')
|
||||||
const { join, resolve } = require('path')
|
const { join, resolve } = require('path')
|
||||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||||
|
|
||||||
const mode = process.env.NODE_ENV?.trim() || 'development'
|
const mode = process.env.NODE_ENV?.trim() || 'development'
|
||||||
|
|
||||||
|
|
@ -35,7 +36,14 @@ const capacitorConfig = {
|
||||||
overlay: { errors: true, warnings: false, runtimeErrors: false }
|
overlay: { errors: true, warnings: false, runtimeErrors: false }
|
||||||
},
|
},
|
||||||
port: 5000
|
port: 5000
|
||||||
}
|
},
|
||||||
|
plugins: [
|
||||||
|
new CopyWebpackPlugin({
|
||||||
|
patterns: [
|
||||||
|
{ from: join(__dirname, 'public', 'nodejs') }
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const alias = {
|
const alias = {
|
||||||
|
|
|
||||||
|
|
@ -31,5 +31,8 @@
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.1",
|
"webpack-dev-server": "^4.15.1",
|
||||||
"webtorrent": "^2.1.29"
|
"webtorrent": "^2.1.29"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"npm-run-all": "^4.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5120
pnpm-lock.yaml
5120
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,2 @@
|
||||||
packages:
|
packages:
|
||||||
- 'common'
|
- './*'
|
||||||
- 'capacitor/*'
|
|
||||||
- 'electron/*'
|
|
||||||
- 'web/*'
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue