diff --git a/.gitignore b/.gitignore index ac65e8e..26ec086 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules -test/**/*.json +test/**/*-output.json test/**/*-output.js nwjs \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4db7dfe..e028ef3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,12 @@ { - "name": "compiler", + "name": "wx_compiler", + "version": "1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { + "name": "wx_compiler", + "version": "1.0", "dependencies": { "miniprogram-compiler": "^0.2.1" }, diff --git a/package.json b/package.json index 1a73453..129521c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,18 @@ { + "forceVendor": true, + "name": "wx_compiler", + "main": "test/node-modules/index.html", + "productName": "wx_compiler", + "appname": "wx_compiler", + "version": "1.0", + "chromium-args": "--mixed-context", + "window": { + "frame": true + }, + "scripts": { - "test": "mocha --reporter-option maxDiffSize=1e9" + "test": "mocha --reporter-option maxDiffSize=1e9", + "start": "nw ./test/node-modules" }, "dependencies": { "miniprogram-compiler": "^0.2.1" diff --git a/test/node-modules/.gitignore b/test/node-modules/.gitignore deleted file mode 100644 index 3ab4cd1..0000000 --- a/test/node-modules/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -data -*.txt \ No newline at end of file diff --git a/test/node-modules/cases/wcc/case1/config.json b/test/node-modules/cases/wcc/case1/config.json new file mode 100644 index 0000000..4ac153d --- /dev/null +++ b/test/node-modules/cases/wcc/case1/config.json @@ -0,0 +1,14 @@ +{ + "files": ["./miniprogram_npm/miniprogram-barrage/index.wxml", "./miniprogram_npm/miniprogram-recycle-view/recycle-item.wxml", "./miniprogram_npm/miniprogram-recycle-view/recycle-view.wxml", "./miniprogram_npm/wxml-to-canvas/index.wxml", "./page/API/index.wxml", "./page/API/components/set-tab-bar/set-tab-bar.wxml", "./page/cloud/index.wxml", "./page/common/foot.wxml", "./page/common/head.wxml", "./page/component/index.wxml", "./page/extend/index.wxml"], + "debugWXS": false, + "debug": true, + "genfuncname": "$gwx", + "isCut": true, + "wxmlCompileConfig": "9>_<1027./miniprogram_npm/miniprogram-barrage/index.wxml>_<10270>_<1027./miniprogram_npm/miniprogram-recycle-view/recycle-item.wxml>_<10270>_<1027./miniprogram_npm/miniprogram-recycle-view/recycle-view.wxml>_<10270>_<1027./miniprogram_npm/wxml-to-canvas/index.wxml>_<10270>_<1027./page/API/index.wxml>_<10271>_<1027set-tab-bar>_<1027./page/API/components/set-tab-bar/set-tab-bar.wxml>_<10270>_<1027./page/cloud/index.wxml>_<10270>_<1027./page/component/index.wxml>_<10270>_<1027./page/extend/index.wxml>_<10270", + "wxmlCompileConfigSplit": ">_<1027", + "replaceContent": { + "./packageComponent/pages/camera-scan-code/camera-scan-code.wxml": "\n\n\n\n