diff --git a/source/src/assets/logo.png b/source/src/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/source/src/assets/logo.png differ diff --git a/CocosCreatorInspector/src/background/index.js b/source/src/background.ts similarity index 100% rename from CocosCreatorInspector/src/background/index.js rename to source/src/background.ts diff --git a/source/src/content.ts b/source/src/content.ts new file mode 100644 index 0000000..eb280e5 --- /dev/null +++ b/source/src/content.ts @@ -0,0 +1 @@ +console.log('11') diff --git a/CocosCreatorInspector/src/content/index.js b/source/src/core/content.js similarity index 100% rename from CocosCreatorInspector/src/content/index.js rename to source/src/core/content.js diff --git a/CocosCreatorInspector/src/core/event-mgr.js b/source/src/core/event-mgr.js similarity index 100% rename from CocosCreatorInspector/src/core/event-mgr.js rename to source/src/core/event-mgr.js diff --git a/CocosCreatorInspector/src/core/event.js b/source/src/core/event.js similarity index 100% rename from CocosCreatorInspector/src/core/event.js rename to source/src/core/event.js diff --git a/CocosCreatorInspector/src/core/page.ejs b/source/src/core/page.ejs similarity index 100% rename from CocosCreatorInspector/src/core/page.ejs rename to source/src/core/page.ejs diff --git a/CocosCreatorInspector/src/core/plugin-msg.js b/source/src/core/plugin-msg.js similarity index 100% rename from CocosCreatorInspector/src/core/plugin-msg.js rename to source/src/core/plugin-msg.js diff --git a/CocosCreatorInspector/src/core/tools.js b/source/src/core/tools.js similarity index 100% rename from CocosCreatorInspector/src/core/tools.js rename to source/src/core/tools.js diff --git a/CocosCreatorInspector/src/devtools/index.js b/source/src/devtools/index.js similarity index 100% rename from CocosCreatorInspector/src/devtools/index.js rename to source/src/devtools/index.js diff --git a/CocosCreatorInspector/src/devtools/panel/ccType/ComponentsProperty.vue b/source/src/devtools/panel/ccType/ComponentsProperty.vue similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/ccType/ComponentsProperty.vue rename to source/src/devtools/panel/ccType/ComponentsProperty.vue diff --git a/CocosCreatorInspector/src/devtools/panel/ccType/NodeBaseProperty.vue b/source/src/devtools/panel/ccType/NodeBaseProperty.vue similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/ccType/NodeBaseProperty.vue rename to source/src/devtools/panel/ccType/NodeBaseProperty.vue diff --git a/CocosCreatorInspector/src/devtools/panel/ccType/SceneProperty.vue b/source/src/devtools/panel/ccType/SceneProperty.vue similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/ccType/SceneProperty.vue rename to source/src/devtools/panel/ccType/SceneProperty.vue diff --git a/CocosCreatorInspector/src/devtools/panel/evalCodeString.js b/source/src/devtools/panel/evalCodeString.js similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/evalCodeString.js rename to source/src/devtools/panel/evalCodeString.js diff --git a/CocosCreatorInspector/src/devtools/panel/index.js b/source/src/devtools/panel/index.ts similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/index.js rename to source/src/devtools/panel/index.ts diff --git a/CocosCreatorInspector/src/devtools/panel/index.vue b/source/src/devtools/panel/index.vue similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/index.vue rename to source/src/devtools/panel/index.vue diff --git a/CocosCreatorInspector/src/devtools/panel/ui/ui-prop.vue b/source/src/devtools/panel/ui/ui-prop.vue similarity index 100% rename from CocosCreatorInspector/src/devtools/panel/ui/ui-prop.vue rename to source/src/devtools/panel/ui/ui-prop.vue diff --git a/CocosCreatorInspector/src/devtools/util.js b/source/src/devtools/util.js similarity index 100% rename from CocosCreatorInspector/src/devtools/util.js rename to source/src/devtools/util.js diff --git a/CocosCreatorInspector/src/index.less b/source/src/index.less similarity index 100% rename from CocosCreatorInspector/src/index.less rename to source/src/index.less diff --git a/CocosCreatorInspector/src/content/inject.js b/source/src/inject.ts similarity index 100% rename from CocosCreatorInspector/src/content/inject.js rename to source/src/inject.ts diff --git a/CocosCreatorInspector/src/icon/icon48.png b/source/src/manifest/icon/icon48.png similarity index 100% rename from CocosCreatorInspector/src/icon/icon48.png rename to source/src/manifest/icon/icon48.png diff --git a/CocosCreatorInspector/src/manifest.js b/source/src/manifest/index.js similarity index 86% rename from CocosCreatorInspector/src/manifest.js rename to source/src/manifest/index.js index 0919c33..582b520 100644 --- a/CocosCreatorInspector/src/manifest.js +++ b/source/src/manifest/index.js @@ -5,7 +5,7 @@ module.exports = { browser_action: { default_title: "CC-Inspector", default_icon: "icon/icon48.png", - default_popup: "pages/popup.html" + default_popup: "popup.html" }, icons: { 48: "icon/icon48.png" @@ -14,20 +14,20 @@ module.exports = { content_scripts: [ { matches: [""], - js: ["js/content.js"], + js: ["content.common.js"], run_at: "document_end", all_frames: true } ], background: { - scripts: ["js/background.js"], + scripts: ["background.js"], persistent: false,// 需要时开启 }, // optionsV1的写法 - options_page: "pages/options.html", + options_page: "options.html", // optionsV2的写法 options_ui: { - page: "pages/options.html", + page: "options.html", // 添加一些默认的样式,推荐使用 chrome_style: true, }, diff --git a/source/src/options/index.ts b/source/src/options/index.ts new file mode 100644 index 0000000..43b3b22 --- /dev/null +++ b/source/src/options/index.ts @@ -0,0 +1,10 @@ +import Vue from "vue"; +import App from "./index.vue"; +import "element-ui/lib/theme-chalk/index.css" +import ElementUI from "element-ui"; + +Vue.config.productionTip = false; +Vue.use(ElementUI, {size: "mini"}); +new Vue({ + render: (h) => h(App), +}).$mount("#app"); diff --git a/source/src/options/index.vue b/source/src/options/index.vue new file mode 100644 index 0000000..4aded77 --- /dev/null +++ b/source/src/options/index.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/source/src/popup/HelloWorld.vue b/source/src/popup/HelloWorld.vue new file mode 100644 index 0000000..8fc297a --- /dev/null +++ b/source/src/popup/HelloWorld.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/source/src/popup/index.ts b/source/src/popup/index.ts new file mode 100644 index 0000000..df41973 --- /dev/null +++ b/source/src/popup/index.ts @@ -0,0 +1,9 @@ +import Vue from "vue"; +import App from "./index.vue"; +import ElementUI from "element-ui"; + +Vue.config.productionTip = false; +Vue.use(ElementUI, {size: "mini"}); +new Vue({ + render: (h) => h(App), +}).$mount("#app"); diff --git a/CocosCreatorInspector/src/popup/app.vue b/source/src/popup/index.vue similarity index 62% rename from CocosCreatorInspector/src/popup/app.vue rename to source/src/popup/index.vue index 79e5df8..644af4b 100644 --- a/CocosCreatorInspector/src/popup/app.vue +++ b/source/src/popup/index.vue @@ -1,11 +1,11 @@ - diff --git a/CocosCreatorInspector/src/popup/res/github.png b/source/src/popup/res/github.png similarity index 100% rename from CocosCreatorInspector/src/popup/res/github.png rename to source/src/popup/res/github.png diff --git a/CocosCreatorInspector/src/popup/res/money.jpg b/source/src/popup/res/money.jpg similarity index 100% rename from CocosCreatorInspector/src/popup/res/money.jpg rename to source/src/popup/res/money.jpg diff --git a/CocosCreatorInspector/src/popup/res/qq.png b/source/src/popup/res/qq.png similarity index 100% rename from CocosCreatorInspector/src/popup/res/qq.png rename to source/src/popup/res/qq.png diff --git a/CocosCreatorInspector/src/popup/res/tiezi.png b/source/src/popup/res/tiezi.png similarity index 100% rename from CocosCreatorInspector/src/popup/res/tiezi.png rename to source/src/popup/res/tiezi.png diff --git a/source/src/shims-chrome.d.ts b/source/src/shims-chrome.d.ts new file mode 100644 index 0000000..2c03267 --- /dev/null +++ b/source/src/shims-chrome.d.ts @@ -0,0 +1,4 @@ +declare module "*.chrome" { + import chrome from "chrome"; + export default chrome; +} diff --git a/CocosCreatorInspector/src/shims-tsx.d.ts b/source/src/shims-tsx.d.ts similarity index 88% rename from CocosCreatorInspector/src/shims-tsx.d.ts rename to source/src/shims-tsx.d.ts index 3b88b58..2bcdf9f 100644 --- a/CocosCreatorInspector/src/shims-tsx.d.ts +++ b/source/src/shims-tsx.d.ts @@ -1,4 +1,4 @@ -import Vue, { VNode } from 'vue'; +import Vue, { VNode } from "vue"; declare global { namespace JSX { diff --git a/source/src/shims-vue.d.ts b/source/src/shims-vue.d.ts new file mode 100644 index 0000000..0660bd6 --- /dev/null +++ b/source/src/shims-vue.d.ts @@ -0,0 +1,4 @@ +declare module "*.vue" { + import Vue from "vue"; + export default Vue; +} diff --git a/source/src/test/index.ts b/source/src/test/index.ts new file mode 100644 index 0000000..9849e13 --- /dev/null +++ b/source/src/test/index.ts @@ -0,0 +1,8 @@ +import Vue from "vue"; +import App from "./index.vue"; + +Vue.config.productionTip = false; + +new Vue({ + render: (h) => h(App), +}).$mount("#app"); diff --git a/source/src/test/index.vue b/source/src/test/index.vue new file mode 100644 index 0000000..f43c067 --- /dev/null +++ b/source/src/test/index.vue @@ -0,0 +1,19 @@ + + + + +