Skip to content

Commit 3a72b8c

Browse files
committed
feat(editor): begin "add unit mod editor"
add first test action;
1 parent f276d6b commit 3a72b8c

20 files changed

Lines changed: 1697 additions & 6 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.DS_Store
2+
.merlin
3+
.log
4+
.ninja_log
5+
.cmi
6+
.ast
7+
.cmt
8+
.bsdeps
9+
.compiler.log
10+
11+
.idea/
12+
.vscode/
13+
jest_0/
14+
reference/
15+
node_modules/
16+
mine/
17+
dist/
18+
lib/bs/
19+
.bs.js
20+
.gen.tsx
21+
lib/js/
22+
lib/es6_global/
23+
24+
coverage
25+
26+
dist/
27+
28+
npm-debug
29+
30+
.bsb.lock
31+
32+
yarn.lock
33+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
var gulp = require("gulp");
2+
var path = require("path");
3+
var fs = require("fs");
4+
var publish = require("meta3d-tool-publish")
5+
var bundle = require("meta3d-tool-bundle-to-custom")
6+
var clipboard = require('clipboardy')
7+
8+
gulp.task("publish_local_env_bundle", function (done) {
9+
let filePath = "./src/Main.ts"
10+
11+
let bundleContent = bundle.bundle(
12+
bundle.getLocalModulePath(
13+
filePath
14+
),
15+
fs.readFileSync(filePath, "utf-8")
16+
)
17+
18+
let clipedBundleContent = `import { api } from "meta3d-type"
19+
import { service as editorWholeService } from "meta3d-editor-whole-protocol/src/service/ServiceType"
20+
` + bundleContent
21+
clipedBundleContent = clipedBundleContent.replace(/getContribute\s\=\s\(api\)/g, "getContribute = (api:api)")
22+
23+
clipboard.default.writeSync(
24+
clipedBundleContent
25+
)
26+
27+
28+
29+
publish.publishBundledContribute(
30+
"local",
31+
path.join(__dirname, "package.json"),
32+
bundleContent
33+
).then(() => {
34+
done()
35+
})
36+
});
37+
38+
39+
40+
// gulp.task("publish_local_env", function (done) {
41+
// publish.publishContribute(
42+
// "local",
43+
// path.join(__dirname, "package.json"),
44+
// path.join(__dirname, "dist/static/js", "main.js")
45+
// ).then(() => {
46+
// done()
47+
// })
48+
// });
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// declare module 'asset-loader!*' {
2+
// // const contents: { default: string }
3+
// const contents: string
4+
// // const contents: ArrayBuffer
5+
// export = contents
6+
// }
7+
8+
declare module '*' {
9+
// const contents: { default: string }
10+
const contents: string
11+
// const contents: ArrayBuffer
12+
export = contents
13+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "meta3d-action-mod-unit-publish-to-game",
3+
"version": "1.3.2",
4+
"publisher": "meta3d",
5+
"protocol": {
6+
"name": "meta3d-action-mod-unit-publish-to-game-protocol"
7+
},
8+
"license": "MIT",
9+
"scripts": {
10+
"watch": "tsc -w -noEmit",
11+
"webpack": "webpack --config webpack.config.js",
12+
"meta3d:publish_dev_auto": "yarn version --patch --no-git-tag-version && yarn meta3d:publish_dev",
13+
"meta3d:publish_dev": "cross-env NODE_ENV=development npm run webpack && gulp publish_local_env_bundle"
14+
},
15+
"keywords": [],
16+
"dependencies": {
17+
"meta3d-action-mod-unit-publish-to-game-protocol": "^1.3.0",
18+
"meta3d-editor-whole-protocol": "^1.3.0",
19+
"meta3d-type": "^1.3.0"
20+
},
21+
"devDependencies": {
22+
"clean-webpack-plugin": "^4.0.0",
23+
"clipboardy": "^5.0.2",
24+
"cross-env": "^7.0.3",
25+
"cz-customizable": "^6.3.0",
26+
"gulp": "^4.0.2",
27+
"meta3d-tool-publish": "^1.3.0",
28+
"source-map-loader": "^3.0.0",
29+
"ts-loader": "^9.2.6",
30+
"typescript": "^5.1.0",
31+
"webpack": "^5.62.1",
32+
"webpack-cli": "^4.9.1"
33+
}
34+
}

0 commit comments

Comments
 (0)