From a39aa842f34ccfd90bdc8d83f5f26d91524300fb Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 23 Aug 2019 17:22:13 -0400 Subject: [PATCH] chore: remove no longer needed package --- packages/vue-compat/.npmignore | 3 -- packages/vue-compat/README.md | 3 -- packages/vue-compat/__tests__/compat.spec.ts | 7 ---- packages/vue-compat/index.js | 7 ---- packages/vue-compat/package.json | 30 -------------- packages/vue-compat/src/index.ts | 41 -------------------- 6 files changed, 91 deletions(-) delete mode 100644 packages/vue-compat/.npmignore delete mode 100644 packages/vue-compat/README.md delete mode 100644 packages/vue-compat/__tests__/compat.spec.ts delete mode 100644 packages/vue-compat/index.js delete mode 100644 packages/vue-compat/package.json delete mode 100644 packages/vue-compat/src/index.ts diff --git a/packages/vue-compat/.npmignore b/packages/vue-compat/.npmignore deleted file mode 100644 index bb5c8a54..00000000 --- a/packages/vue-compat/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -__tests__/ -__mocks__/ -dist/packages \ No newline at end of file diff --git a/packages/vue-compat/README.md b/packages/vue-compat/README.md deleted file mode 100644 index 2a511303..00000000 --- a/packages/vue-compat/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# vue-compat - -The 2.x compatibility build. diff --git a/packages/vue-compat/__tests__/compat.spec.ts b/packages/vue-compat/__tests__/compat.spec.ts deleted file mode 100644 index f07870ac..00000000 --- a/packages/vue-compat/__tests__/compat.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -;(global as any).__COMPAT__ = true - -// import Vue from '../src/index' - -describe('2.x compat build', () => { - test.todo('should work') -}) diff --git a/packages/vue-compat/index.js b/packages/vue-compat/index.js deleted file mode 100644 index 7a3dc2d8..00000000 --- a/packages/vue-compat/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/vue.cjs.prod.js') -} else { - module.exports = require('./dist/vue.cjs.js') -} diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json deleted file mode 100644 index f441ad68..00000000 --- a/packages/vue-compat/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "vue-compat", - "version": "3.0.0-alpha.1", - "description": "Vue 2.x compat build", - "main": "index.js", - "module": "dist/vue.esm-bundler.js", - "unpkg": "dist/vue.global.js", - "sideEffects": false, - "buildOptions": { - "name": "Vue", - "compat": true, - "formats": ["esm", "cjs", "global", "esm-browser"] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/vue.git" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/vue/issues" - }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue#readme", - "dependencies": { - "@vue/runtime-dom": "3.0.0-alpha.1" - } -} diff --git a/packages/vue-compat/src/index.ts b/packages/vue-compat/src/index.ts deleted file mode 100644 index d9cefee5..00000000 --- a/packages/vue-compat/src/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { - h, - render, - nextTick, - createComponentInstance, - createComponentClassFromOptions -} from '@vue/runtime-dom' - -// Note: typing for this is intentionally loose, as it will be using 2.x types. - -class Vue { - static h: any = h - static render: any = render - static nextTick: any = nextTick - - constructor(options: any) { - // convert it to a class - const Component = createComponentClassFromOptions(options || {}) - const vnode = h(Component) - const instance = (vnode.children = createComponentInstance(vnode)) - - function mount(el: any) { - const dom = typeof el === 'string' ? document.querySelector(el) : el - render(vnode, dom) - return instance.$proxy - } - - if (options.el) { - return mount(options.el) as any - } else { - ;(instance as any).$mount = mount - return instance.$proxy as any - } - } -} - -interface Vue { - $mount(el: any): any -} - -export default Vue