mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
build: liteloader
Co-Authored-By: Wesley F. Young <25684570+Wesley-Young@users.noreply.github.com>
This commit is contained in:
parent
b39cbffe14
commit
3c4cd3743f
@ -1 +1,2 @@
|
|||||||
VITE_BUILD_TYPE = Development
|
VITE_BUILD_TYPE = Production
|
||||||
|
VITE_BUILD_PLATFORM = LiteLoader
|
@ -1 +1,2 @@
|
|||||||
VITE_BUILD_TYPE = Production
|
VITE_BUILD_TYPE = Production
|
||||||
|
VITE_BUILD_PLATFORM = Shell
|
33
manifest.json
Normal file
33
manifest.json
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 4,
|
||||||
|
"type": "extension",
|
||||||
|
"name": "NapCat",
|
||||||
|
"slug": "NapCat",
|
||||||
|
"description": "OneBot v11 protocol implementation with NapCat logic",
|
||||||
|
"version": "1.8.4",
|
||||||
|
"icon": "./logo.png",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "MliKiowa",
|
||||||
|
"link": "https://github.com/MliKiowa"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Young",
|
||||||
|
"link": "https://github.com/Wesley-Young"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repository": {
|
||||||
|
"repo": "NapNeko/NapCatQQ",
|
||||||
|
"branch": "main"
|
||||||
|
},
|
||||||
|
"platform": [
|
||||||
|
"win32",
|
||||||
|
"linux",
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"injects": {
|
||||||
|
"renderer": "./renderer.cjs",
|
||||||
|
"main": "./napcat.cjs",
|
||||||
|
"preload": "./preload.cjs"
|
||||||
|
}
|
||||||
|
}
|
@ -28,8 +28,33 @@ if (process.env.NAPCAT_BUILDSYS == 'linux') {
|
|||||||
} else {
|
} else {
|
||||||
startScripts = ['./script/BootWay05.bat', './script/BootWay05.utf8.bat', './script/dbghelp.dll', './script/BootWay05.ps1', './script/napcat.sh', './script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1', './script/napcat-9912.ps1', './script/napcat-9912-utf8.ps1', './script/napcat-9912.bat', './script/napcat-9912-utf8.bat'];
|
startScripts = ['./script/BootWay05.bat', './script/BootWay05.utf8.bat', './script/dbghelp.dll', './script/BootWay05.ps1', './script/napcat.sh', './script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1', './script/napcat-9912.ps1', './script/napcat-9912-utf8.ps1', './script/napcat-9912.bat', './script/napcat-9912-utf8.bat'];
|
||||||
}
|
}
|
||||||
|
const LLBaseConfigPlugin: PluginOption[] = [
|
||||||
const baseConfigPlugin: PluginOption[] = [
|
// PreprocessorDirectives(),
|
||||||
|
babel({
|
||||||
|
filter: /.*\.(ts|js)$/,
|
||||||
|
babelConfig: {
|
||||||
|
babelrc: false,
|
||||||
|
configFile: false,
|
||||||
|
presets: ["@babel/preset-typescript"],
|
||||||
|
plugins: [
|
||||||
|
//'2018-09', decoratorsBeforeExport: true
|
||||||
|
['@babel/plugin-proposal-decorators', { legacy: true }],
|
||||||
|
'@babel/plugin-proposal-class-properties',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
cp({
|
||||||
|
targets: [
|
||||||
|
{ src: './manifest.json', dest: 'dist' },
|
||||||
|
{ src: './src/liteloader/napcat.cjs', dest: 'dist' },
|
||||||
|
{ src: './src/liteloader/preload.cjs', dest: 'dist' },
|
||||||
|
{ src: './src/liteloader/renderer.cjs', dest: 'dist' },
|
||||||
|
{ src: './logo.png', dest: 'dist' },
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
];
|
||||||
|
const ShellBaseConfigPlugin: PluginOption[] = [
|
||||||
// PreprocessorDirectives(),
|
// PreprocessorDirectives(),
|
||||||
babel({
|
babel({
|
||||||
filter: /.*\.(ts|js)$/,
|
filter: /.*\.(ts|js)$/,
|
||||||
@ -113,14 +138,12 @@ export default defineConfig(({ mode }): UserConfig => {
|
|||||||
if (mode === 'shell') {
|
if (mode === 'shell') {
|
||||||
return {
|
return {
|
||||||
...ShellBaseConfig(),
|
...ShellBaseConfig(),
|
||||||
plugins: [
|
plugins: [...ShellBaseConfigPlugin]
|
||||||
...baseConfigPlugin
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
...LLBaseConfig(),
|
...LLBaseConfig(),
|
||||||
plugins: baseConfigPlugin,
|
plugins: [...LLBaseConfigPlugin],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user