vite-plugin-spire.officejs-test 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.mjs +5 -3
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { access, constants } from "node:fs/promises";
|
|
|
6
6
|
import { statSync, createReadStream, existsSync, mkdirSync, chmodSync, readFileSync } from "node:fs";
|
|
7
7
|
import { readdir, mkdir, cp } from "fs/promises";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
|
-
const web = [{ "package": "spire.officejs-web-word-brook", "route": "/service/spireword", "name": "spireword", "build": "/
|
|
9
|
+
const web = [{ "package": "spire.officejs-web-word-brook", "route": "/service/spireword", "name": "spireword", "build": "/web/spireword", "identify": "word" }, { "package": "spire.officejs-web-excel-brook", "route": "/service/spireexcel", "name": "spireexcel", "build": "/service/spireexcel", "identify": "excel" }, { "package": "spire.officejs-web-powerpoint-brook", "route": "/service/spirepowerpoint", "name": "spirepowerpoint", "build": "/service/spirepowerpoint", "identify": "ppt" }, { "package": "spire.officejs-web-pdf-brook", "route": "/service/spireword", "name": "pdf", "build": "/service/spireword", "identify": "pdf" }, { "package": "spire.officejs-web-common-brook", "route": "/service/spirecommon", "name": "spirecommon", "build": "/service/spirecommon", "identify": "spirecommon" }, { "package": "spire.officejs-web-editors-brook", "route": "/editors", "name": "editors", "build": "/editors", "identify": "editors" }, { "package": "spire.officejs-web-externs-brook", "route": "/externs", "name": "externs", "build": "/externs", "identify": "externs" }, { "package": "spire.officejs-web-fontsweb-brook", "route": "/fontsweb", "name": "fontsweb", "build": "/fontsweb", "identify": "fontsweb" }];
|
|
10
10
|
const service = [{ "package": "spire.officejs-service-win-test", "path": "/lib", "name": "service-windows", "platform": "win32", "build": "/", "identify": "windows" }, { "package": "spire.officejs-service-linux-test", "path": "/lib", "name": "service-linux", "platform": "linux", "build": "/", "identify": "linux" }, { "package": "spire.officejs-service-arm-test", "path": "/lib", "name": "service-arm", "platform": "arm", "build": "/", "identify": "arm" }];
|
|
11
11
|
const configJSon = {
|
|
12
12
|
web,
|
|
@@ -174,9 +174,11 @@ const initBundle = async (options, projectRoot) => {
|
|
|
174
174
|
const requireFunc = createRequire(projectRoot + "/node_modules/");
|
|
175
175
|
for (let i = 0; i < mappings$1.length; i++) {
|
|
176
176
|
let packageName = mappings$1[i].package;
|
|
177
|
-
let
|
|
177
|
+
let packagePath2 = "/web";
|
|
178
|
+
let buildDir = targetStaticPrfix2;
|
|
178
179
|
const packageJsonPath = requireFunc.resolve(`${packageName}/package.json`);
|
|
179
|
-
const packageRoot = path.dirname(packageJsonPath);
|
|
180
|
+
const packageRoot = path.dirname(packageJsonPath) + packagePath2;
|
|
181
|
+
console.log("packageRoot", packageRoot);
|
|
180
182
|
const targetStaticDir = path.join(buildOutDir, buildDir);
|
|
181
183
|
console.log(`copying ${packageName} ......`);
|
|
182
184
|
await copyFile(packageRoot, targetStaticDir, excludesFile_copy);
|