diff --git a/index.js b/index.js deleted file mode 100644 index acae0e6..0000000 --- a/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import Main from "./src/components-v2/Main"; -// 这一步判断window.Vue是否存在,因为直接引用vue.min.js, 它会把Vue绑到Window上,我们直接引用打包好的js才能正常跑起来。 -if (typeof window !== "undefined" && window.Vue) { - window.Vue.component(Main.name, Main); -} -//这样就可以使用Vue.use进行全局安装了。 -Main.install = function(Vue) { - Vue.component(Main.name, Main); -}; -export default Main; diff --git a/src/assets/Montserrat-Bold.woff2 b/src/assets/Montserrat-Bold.woff2 deleted file mode 100644 index 726f973..0000000 Binary files a/src/assets/Montserrat-Bold.woff2 and /dev/null differ diff --git a/src/assets/Montserrat-Medium.woff2 b/src/assets/Montserrat-Medium.woff2 deleted file mode 100644 index 6e66264..0000000 Binary files a/src/assets/Montserrat-Medium.woff2 and /dev/null differ diff --git a/main.js b/src/main.js similarity index 89% rename from main.js rename to src/main.js index 0d093b9..fd9d02e 100644 --- a/main.js +++ b/src/main.js @@ -4,7 +4,7 @@ import "element-ui/lib/theme-chalk/index.css"; import AntdUI from "ant-design-vue"; import "ant-design-vue/dist/antd.css"; -import APP from "./src/App.vue"; +import APP from "./App.vue"; Vue.use(ElementUI); Vue.use(AntdUI); diff --git a/src/utils/store.js b/src/utils/store.js deleted file mode 100644 index 7c96f60..0000000 --- a/src/utils/store.js +++ /dev/null @@ -1,35 +0,0 @@ -import Vue from 'vue'; -import { stringify } from 'query-string'; - -const API = 'https://text.cinwell.xyz'; - -export async function upload(text) { - Vue.toasted.show('Saving...'); - - try { - const result = await fetch(API, { - method: 'post', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - }, - body: stringify({ - text, - hash: 1 - }) - }); - - Vue.toasted.clear(); - - return await result.text(); - } catch (e) { - Vue.toasted.clear(); - Vue.toasted.show('Failed: ' + e.message, { - type: 'error', - duration: 2000 - }); - } -} - -export function downloadURL(hash) { - return `${API}/${hash}`; -} diff --git a/vue.config.js b/vue.config.js index 7053a64..bf832e1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -2,23 +2,6 @@ const path = require("path"); module.exports = { css: { extract: false }, - configureWebpack: - process.env.NODE_ENV === "production" - ? { - entry: "./index.js", - output: { - filename: "build.js", - library: "vcc", - libraryTarget: "umd", - umdNamedDefine: true, - }, - } - : { - entry: "./main.js" - }, - - lintOnSave: true, - chainWebpack: (config) => { const vueRule = config.module.rule("vue");