chore: setup all packages

This commit is contained in:
Evan You 2018-09-19 12:26:50 -04:00
parent 898b1106c9
commit d1bc6ee8d6
36 changed files with 152 additions and 17 deletions

View File

@ -0,0 +1,3 @@
__tests__/
__mocks__/
dist/packages

View File

@ -0,0 +1 @@
# @vue/compiler-core

View File

@ -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')
}

View File

@ -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"
}

View File

View File

@ -0,0 +1,3 @@
__tests__/
__mocks__/
dist/packages

View File

@ -0,0 +1 @@
# @vue/compiler-dom

View File

@ -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')
}

View File

@ -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"
}

View File

View File

@ -0,0 +1,3 @@
__tests__/
__mocks__/
dist/packages

View File

@ -0,0 +1 @@
# @vue/compiler-server

View File

@ -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')
}

View File

@ -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"
}

View File

View File

@ -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.

View File

@ -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 () {

View File

@ -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')
}

View File

@ -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"

View File

@ -22,7 +22,14 @@ const { render } = createRenderer({
// important: inline the definition for nextTick
const publicNextTick = nextTick as (fn: Function) => Promise<void>
export { h, cloneVNode, createPortal, Component, render, publicNextTick as nextTick }
export {
h,
cloneVNode,
createPortal,
Component,
render,
publicNextTick as nextTick
}
// also expose observer API
export {

View File

@ -0,0 +1,3 @@
__tests__/
__mocks__/
dist/packages

View File

@ -0,0 +1 @@
# @vue/renderer-server

View File

@ -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')
}

View File

@ -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"
}

View File

View File

@ -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')
}

View File

@ -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(