From d1bc6ee8d61ad859c1907f1d40ee4f559cb627b9 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 19 Sep 2018 12:26:50 -0400 Subject: [PATCH] chore: setup all packages --- packages/compiler-core/.npmignore | 3 +++ packages/compiler-core/README.md | 1 + packages/compiler-core/index.js | 7 +++++++ packages/compiler-core/package.json | 21 +++++++++++++++++++ packages/compiler-core/src/index.ts | 0 packages/compiler-dom/.npmignore | 3 +++ packages/compiler-dom/README.md | 1 + packages/compiler-dom/index.js | 7 +++++++ packages/compiler-dom/package.json | 21 +++++++++++++++++++ packages/compiler-dom/src/index.ts | 0 packages/compiler-server/.npmignore | 3 +++ packages/compiler-server/README.md | 1 + packages/compiler-server/index.js | 7 +++++++ packages/compiler-server/package.json | 21 +++++++++++++++++++ packages/compiler-server/src/index.ts | 0 packages/observer/README.md | 2 +- .../{runtime-dom => renderer-dom}/.npmignore | 0 .../{runtime-dom => renderer-dom}/README.md | 4 ++-- packages/renderer-dom/index.js | 7 +++++++ .../package.json | 10 ++++----- .../src/index.ts | 9 +++++++- .../src/modules/attrs.ts | 0 .../src/modules/class.ts | 0 .../src/modules/events.ts | 0 .../src/modules/props.ts | 0 .../src/modules/style.ts | 0 .../src/nodeOps.ts | 0 .../src/patchData.ts | 0 .../src/teardownVNode.ts | 0 packages/renderer-server/.npmignore | 3 +++ packages/renderer-server/README.md | 1 + packages/renderer-server/index.js | 7 +++++++ packages/renderer-server/package.json | 21 +++++++++++++++++++ packages/renderer-server/src/index.ts | 0 packages/runtime-dom/index.js | 7 ------- scripts/dev.js | 2 +- 36 files changed, 152 insertions(+), 17 deletions(-) create mode 100644 packages/compiler-core/.npmignore create mode 100644 packages/compiler-core/README.md create mode 100644 packages/compiler-core/index.js create mode 100644 packages/compiler-core/package.json create mode 100644 packages/compiler-core/src/index.ts create mode 100644 packages/compiler-dom/.npmignore create mode 100644 packages/compiler-dom/README.md create mode 100644 packages/compiler-dom/index.js create mode 100644 packages/compiler-dom/package.json create mode 100644 packages/compiler-dom/src/index.ts create mode 100644 packages/compiler-server/.npmignore create mode 100644 packages/compiler-server/README.md create mode 100644 packages/compiler-server/index.js create mode 100644 packages/compiler-server/package.json create mode 100644 packages/compiler-server/src/index.ts rename packages/{runtime-dom => renderer-dom}/.npmignore (100%) rename packages/{runtime-dom => renderer-dom}/README.md (72%) create mode 100644 packages/renderer-dom/index.js rename packages/{runtime-dom => renderer-dom}/package.json (68%) rename packages/{runtime-dom => renderer-dom}/src/index.ts (87%) rename packages/{runtime-dom => renderer-dom}/src/modules/attrs.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/modules/class.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/modules/events.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/modules/props.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/modules/style.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/nodeOps.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/patchData.ts (100%) rename packages/{runtime-dom => renderer-dom}/src/teardownVNode.ts (100%) create mode 100644 packages/renderer-server/.npmignore create mode 100644 packages/renderer-server/README.md create mode 100644 packages/renderer-server/index.js create mode 100644 packages/renderer-server/package.json create mode 100644 packages/renderer-server/src/index.ts delete mode 100644 packages/runtime-dom/index.js diff --git a/packages/compiler-core/.npmignore b/packages/compiler-core/.npmignore new file mode 100644 index 00000000..bb5c8a54 --- /dev/null +++ b/packages/compiler-core/.npmignore @@ -0,0 +1,3 @@ +__tests__/ +__mocks__/ +dist/packages \ No newline at end of file diff --git a/packages/compiler-core/README.md b/packages/compiler-core/README.md new file mode 100644 index 00000000..33a82ccf --- /dev/null +++ b/packages/compiler-core/README.md @@ -0,0 +1 @@ +# @vue/compiler-core \ No newline at end of file diff --git a/packages/compiler-core/index.js b/packages/compiler-core/index.js new file mode 100644 index 00000000..d3fc54f4 --- /dev/null +++ b/packages/compiler-core/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-core.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-core.cjs.js') +} diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json new file mode 100644 index 00000000..9b84d9f4 --- /dev/null +++ b/packages/compiler-core/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vue/compiler-core", + "version": "3.0.0-alpha.1", + "description": "@vue/compiler-core", + "main": "index.js", + "module": "dist/compiler-core.esm.js", + "typings": "dist/index.d.ts", + "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/compiler-core#readme" +} \ No newline at end of file diff --git a/packages/compiler-core/src/index.ts b/packages/compiler-core/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/.npmignore b/packages/compiler-dom/.npmignore new file mode 100644 index 00000000..bb5c8a54 --- /dev/null +++ b/packages/compiler-dom/.npmignore @@ -0,0 +1,3 @@ +__tests__/ +__mocks__/ +dist/packages \ No newline at end of file diff --git a/packages/compiler-dom/README.md b/packages/compiler-dom/README.md new file mode 100644 index 00000000..0027f542 --- /dev/null +++ b/packages/compiler-dom/README.md @@ -0,0 +1 @@ +# @vue/compiler-dom \ No newline at end of file diff --git a/packages/compiler-dom/index.js b/packages/compiler-dom/index.js new file mode 100644 index 00000000..b5f7a05e --- /dev/null +++ b/packages/compiler-dom/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-dom.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-dom.cjs.js') +} diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json new file mode 100644 index 00000000..b2bb68af --- /dev/null +++ b/packages/compiler-dom/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vue/compiler-dom", + "version": "3.0.0-alpha.1", + "description": "@vue/compiler-dom", + "main": "index.js", + "module": "dist/compiler-dom.esm.js", + "typings": "dist/index.d.ts", + "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/compiler-dom#readme" +} \ No newline at end of file diff --git a/packages/compiler-dom/src/index.ts b/packages/compiler-dom/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-server/.npmignore b/packages/compiler-server/.npmignore new file mode 100644 index 00000000..bb5c8a54 --- /dev/null +++ b/packages/compiler-server/.npmignore @@ -0,0 +1,3 @@ +__tests__/ +__mocks__/ +dist/packages \ No newline at end of file diff --git a/packages/compiler-server/README.md b/packages/compiler-server/README.md new file mode 100644 index 00000000..24d04239 --- /dev/null +++ b/packages/compiler-server/README.md @@ -0,0 +1 @@ +# @vue/compiler-server \ No newline at end of file diff --git a/packages/compiler-server/index.js b/packages/compiler-server/index.js new file mode 100644 index 00000000..31c34293 --- /dev/null +++ b/packages/compiler-server/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/compiler-server.cjs.prod.js') +} else { + module.exports = require('./dist/compiler-server.cjs.js') +} diff --git a/packages/compiler-server/package.json b/packages/compiler-server/package.json new file mode 100644 index 00000000..b8c1e017 --- /dev/null +++ b/packages/compiler-server/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vue/compiler-server", + "version": "3.0.0-alpha.1", + "description": "@vue/compiler-server", + "main": "index.js", + "module": "dist/compiler-server.esm.js", + "typings": "dist/index.d.ts", + "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/compiler-server#readme" +} \ No newline at end of file diff --git a/packages/compiler-server/src/index.ts b/packages/compiler-server/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/observer/README.md b/packages/observer/README.md index a6c7f100..4e429944 100644 --- a/packages/observer/README.md +++ b/packages/observer/README.md @@ -1,3 +1,3 @@ # @vue/observer -> This package is inlined into UMD & Browser ESM builds of user-facing renderers (e.g. `@vue/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. +> This package is inlined into UMD & Browser ESM builds of user-facing renderers (e.g. `@vue/renderer-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. diff --git a/packages/runtime-dom/.npmignore b/packages/renderer-dom/.npmignore similarity index 100% rename from packages/runtime-dom/.npmignore rename to packages/renderer-dom/.npmignore diff --git a/packages/runtime-dom/README.md b/packages/renderer-dom/README.md similarity index 72% rename from packages/runtime-dom/README.md rename to packages/renderer-dom/README.md index e351b743..9e2c326b 100644 --- a/packages/runtime-dom/README.md +++ b/packages/renderer-dom/README.md @@ -1,7 +1,7 @@ -# @vue/runtime-dom +# @vue/renderer-dom ``` js -import { h, render, Component } from '@vue/runtime-dom' +import { h, render, Component } from '@vue/renderer-dom' class App extends Component { data () { diff --git a/packages/renderer-dom/index.js b/packages/renderer-dom/index.js new file mode 100644 index 00000000..b722383c --- /dev/null +++ b/packages/renderer-dom/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/renderer-dom.cjs.prod.js') +} else { + module.exports = require('./dist/renderer-dom.cjs.js') +} diff --git a/packages/runtime-dom/package.json b/packages/renderer-dom/package.json similarity index 68% rename from packages/runtime-dom/package.json rename to packages/renderer-dom/package.json index 4277265e..17b55aaf 100644 --- a/packages/runtime-dom/package.json +++ b/packages/renderer-dom/package.json @@ -1,11 +1,11 @@ { - "name": "@vue/runtime-dom", + "name": "@vue/renderer-dom", "version": "3.0.0-alpha.1", - "description": "@vue/runtime-dom", + "description": "@vue/renderer-dom", "main": "index.js", - "module": "dist/runtime-dom.esm.js", + "module": "dist/renderer-dom.esm.js", "typings": "dist/index.d.ts", - "unpkg": "dist/runtime-dom.umd.js", + "unpkg": "dist/renderer-dom.umd.js", "buildOptions": { "name": "Vue", "formats": ["esm", "cjs", "umd", "esm-browser"] @@ -22,7 +22,7 @@ "bugs": { "url": "https://github.com/vuejs/vue/issues" }, - "homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-dom#readme", + "homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-dom#readme", "dependencies": { "@vue/core": "3.0.0-alpha.1", "@vue/scheduler": "3.0.0-alpha.1" diff --git a/packages/runtime-dom/src/index.ts b/packages/renderer-dom/src/index.ts similarity index 87% rename from packages/runtime-dom/src/index.ts rename to packages/renderer-dom/src/index.ts index cef0a3e0..bb9e3ad6 100644 --- a/packages/runtime-dom/src/index.ts +++ b/packages/renderer-dom/src/index.ts @@ -22,7 +22,14 @@ const { render } = createRenderer({ // important: inline the definition for nextTick const publicNextTick = nextTick as (fn: Function) => Promise -export { h, cloneVNode, createPortal, Component, render, publicNextTick as nextTick } +export { + h, + cloneVNode, + createPortal, + Component, + render, + publicNextTick as nextTick +} // also expose observer API export { diff --git a/packages/runtime-dom/src/modules/attrs.ts b/packages/renderer-dom/src/modules/attrs.ts similarity index 100% rename from packages/runtime-dom/src/modules/attrs.ts rename to packages/renderer-dom/src/modules/attrs.ts diff --git a/packages/runtime-dom/src/modules/class.ts b/packages/renderer-dom/src/modules/class.ts similarity index 100% rename from packages/runtime-dom/src/modules/class.ts rename to packages/renderer-dom/src/modules/class.ts diff --git a/packages/runtime-dom/src/modules/events.ts b/packages/renderer-dom/src/modules/events.ts similarity index 100% rename from packages/runtime-dom/src/modules/events.ts rename to packages/renderer-dom/src/modules/events.ts diff --git a/packages/runtime-dom/src/modules/props.ts b/packages/renderer-dom/src/modules/props.ts similarity index 100% rename from packages/runtime-dom/src/modules/props.ts rename to packages/renderer-dom/src/modules/props.ts diff --git a/packages/runtime-dom/src/modules/style.ts b/packages/renderer-dom/src/modules/style.ts similarity index 100% rename from packages/runtime-dom/src/modules/style.ts rename to packages/renderer-dom/src/modules/style.ts diff --git a/packages/runtime-dom/src/nodeOps.ts b/packages/renderer-dom/src/nodeOps.ts similarity index 100% rename from packages/runtime-dom/src/nodeOps.ts rename to packages/renderer-dom/src/nodeOps.ts diff --git a/packages/runtime-dom/src/patchData.ts b/packages/renderer-dom/src/patchData.ts similarity index 100% rename from packages/runtime-dom/src/patchData.ts rename to packages/renderer-dom/src/patchData.ts diff --git a/packages/runtime-dom/src/teardownVNode.ts b/packages/renderer-dom/src/teardownVNode.ts similarity index 100% rename from packages/runtime-dom/src/teardownVNode.ts rename to packages/renderer-dom/src/teardownVNode.ts diff --git a/packages/renderer-server/.npmignore b/packages/renderer-server/.npmignore new file mode 100644 index 00000000..bb5c8a54 --- /dev/null +++ b/packages/renderer-server/.npmignore @@ -0,0 +1,3 @@ +__tests__/ +__mocks__/ +dist/packages \ No newline at end of file diff --git a/packages/renderer-server/README.md b/packages/renderer-server/README.md new file mode 100644 index 00000000..55ff667b --- /dev/null +++ b/packages/renderer-server/README.md @@ -0,0 +1 @@ +# @vue/renderer-server \ No newline at end of file diff --git a/packages/renderer-server/index.js b/packages/renderer-server/index.js new file mode 100644 index 00000000..cbf46fe7 --- /dev/null +++ b/packages/renderer-server/index.js @@ -0,0 +1,7 @@ +'use strict' + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./dist/renderer-server.cjs.prod.js') +} else { + module.exports = require('./dist/renderer-server.cjs.js') +} diff --git a/packages/renderer-server/package.json b/packages/renderer-server/package.json new file mode 100644 index 00000000..9c776548 --- /dev/null +++ b/packages/renderer-server/package.json @@ -0,0 +1,21 @@ +{ + "name": "@vue/renderer-server", + "version": "3.0.0-alpha.1", + "description": "@vue/renderer-server", + "main": "index.js", + "module": "dist/renderer-server.esm.js", + "typings": "dist/index.d.ts", + "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/renderer-server#readme" +} \ No newline at end of file diff --git a/packages/renderer-server/src/index.ts b/packages/renderer-server/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/runtime-dom/index.js b/packages/runtime-dom/index.js deleted file mode 100644 index cdc29b2a..00000000 --- a/packages/runtime-dom/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./dist/runtime-dom.cjs.prod.js') -} else { - module.exports = require('./dist/runtime-dom.cjs.js') -} diff --git a/scripts/dev.js b/scripts/dev.js index 6a4fa307..c0879361 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -17,7 +17,7 @@ const execa = require('execa') const { targets, fuzzyMatchTarget } = require('./utils') const args = require('minimist')(process.argv.slice(2)) -const target = fuzzyMatchTarget(args._[0] || 'runtime-dom') +const target = fuzzyMatchTarget(args._[0] || 'renderer-dom') const formats = args.formats || args.f execa(