refactor: rename packages
This commit is contained in:
parent
f142c322e0
commit
e05673f4d3
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "node scripts/dev.js",
|
||||
"build": "node scripts/build.js",
|
||||
"size": "node scripts/build.js renderer-dom -f esm-browser",
|
||||
"size": "node scripts/build.js runtime-dom -f esm-browser",
|
||||
"lint": "prettier --write --parser typescript 'packages/**/*.ts'",
|
||||
"test": "jest"
|
||||
},
|
||||
|
1
packages/compiler-core/README.md
Normal file
1
packages/compiler-core/README.md
Normal file
@ -0,0 +1 @@
|
||||
# @vue/compiler-core
|
7
packages/compiler-core/index.js
Normal file
7
packages/compiler-core/index.js
Normal 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')
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vue/compiler",
|
||||
"name": "@vue/compiler-core",
|
||||
"version": "3.0.0-alpha.1",
|
||||
"description": "@vue/compiler",
|
||||
"description": "@vue/compiler-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/compiler.esm-bundler.js",
|
||||
"module": "dist/compiler-core.esm-bundler.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"repository": {
|
||||
@ -18,5 +18,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/compiler#readme"
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/compiler-core#readme"
|
||||
}
|
@ -1 +0,0 @@
|
||||
# @vue/compiler
|
@ -1,7 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/compiler.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/compiler.cjs.js')
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/core.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/core.cjs.js')
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
## Usage Note
|
||||
|
||||
This package is inlined into Global & 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.
|
||||
This package is inlined into Global & 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.
|
||||
|
||||
## Credits
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
'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')
|
||||
}
|
@ -1 +0,0 @@
|
||||
# @vue/renderer-server
|
@ -1,7 +0,0 @@
|
||||
'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')
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/renderer-test.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/renderer-test.cjs.js')
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
# @vue/core
|
||||
# @vue/runtime-core
|
||||
|
||||
> This package is published only for typing and building custom renderers. It is NOT meant to be used in applications.
|
||||
|
||||
``` ts
|
||||
import { createRenderer, h } from '@vue/core'
|
||||
import { createRenderer, h } from '@vue/runtime-core'
|
||||
|
||||
const { render } = createRenderer({
|
||||
nodeOps,
|
@ -1,5 +1,5 @@
|
||||
// using DOM renderer because this case is mostly DOM-specific
|
||||
import { h, render, Component, nextTick, cloneVNode } from '@vue/renderer-dom'
|
||||
import { h, render, Component, nextTick, cloneVNode } from '@vue/runtime-dom'
|
||||
|
||||
describe('attribute fallthrough', () => {
|
||||
it('everything should be in props when component has no declared props', async () => {
|
@ -13,7 +13,7 @@ import {
|
||||
resetOps,
|
||||
dumpOps,
|
||||
NodeOpTypes
|
||||
} from '@vue/renderer-test'
|
||||
} from '@vue/runtime-test'
|
||||
|
||||
describe('Fragments', () => {
|
||||
it('should allow returning multiple component root nodes', () => {
|
@ -6,8 +6,8 @@ import {
|
||||
KeepAlive,
|
||||
ComponentPropsOptions,
|
||||
ComponentWatchOptions
|
||||
} from '@vue/core'
|
||||
import { createInstance, renderIntsance } from '@vue/renderer-test'
|
||||
} from '@vue/runtime-core'
|
||||
import { createInstance, renderIntsance } from '@vue/runtime-test'
|
||||
|
||||
describe('class inheritance', () => {
|
||||
it('should merge data', () => {
|
@ -1,5 +1,5 @@
|
||||
import { Component, ComponentClass, mixins } from '@vue/core'
|
||||
import { createInstance } from '@vue/renderer-test'
|
||||
import { Component, ComponentClass, mixins } from '@vue/runtime-core'
|
||||
import { createInstance } from '@vue/runtime-test'
|
||||
|
||||
const calls: string[] = []
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
nodeOps,
|
||||
observable,
|
||||
nextTick
|
||||
} from '@vue/renderer-test'
|
||||
} from '@vue/runtime-test'
|
||||
|
||||
describe('Parent chain management', () => {
|
||||
it('should have correct $parent / $root / $children', async () => {
|
7
packages/runtime-core/index.js
Normal file
7
packages/runtime-core/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/runtime-core.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/runtime-core.cjs.js')
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vue/core",
|
||||
"name": "@vue/runtime-core",
|
||||
"version": "3.0.0-alpha.1",
|
||||
"description": "@vue/core",
|
||||
"description": "@vue/runtime-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/core.esm-bundler.js",
|
||||
"module": "dist/runtime-core.esm-bundler.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"repository": {
|
||||
@ -18,7 +18,7 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/core#readme",
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-core#readme",
|
||||
"dependencies": {
|
||||
"@vue/observer": "3.0.0-alpha.1",
|
||||
"@vue/scheduler": "3.0.0-alpha.1"
|
@ -1,7 +1,7 @@
|
||||
# @vue/renderer-dom
|
||||
# @vue/runtime-dom
|
||||
|
||||
``` js
|
||||
import { h, render, Component } from '@vue/renderer-dom'
|
||||
import { h, render, Component } from '@vue/runtime-dom'
|
||||
|
||||
class App extends Component {
|
||||
data () {
|
7
packages/runtime-dom/index.js
Normal file
7
packages/runtime-dom/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
'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')
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@vue/renderer-dom",
|
||||
"name": "@vue/runtime-dom",
|
||||
"version": "3.0.0-alpha.1",
|
||||
"description": "@vue/renderer-dom",
|
||||
"description": "@vue/runtime-dom",
|
||||
"main": "index.js",
|
||||
"module": "dist/renderer-dom.esm-bundler.js",
|
||||
"module": "dist/runtime-dom.esm-bundler.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"unpkg": "dist/renderer-dom.global.js",
|
||||
"unpkg": "dist/runtime-dom.global.js",
|
||||
"sideEffects": false,
|
||||
"buildOptions": {
|
||||
"name": "VueDOMRenderer",
|
||||
@ -23,8 +23,8 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-dom#readme",
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-dom#readme",
|
||||
"dependencies": {
|
||||
"@vue/core": "3.0.0-alpha.1"
|
||||
"@vue/runtime-core": "3.0.0-alpha.1"
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { createRenderer, VNode, Component } from '@vue/core'
|
||||
import { createRenderer, VNode, Component } from '@vue/runtime-core'
|
||||
import { nodeOps } from './nodeOps'
|
||||
import { patchData } from './patchData'
|
||||
import { teardownVNode } from './teardownVNode'
|
||||
@ -17,4 +17,4 @@ export const render = _render as publicRender
|
||||
|
||||
// re-export everything from core
|
||||
// h, Component, observer API, nextTick, flags & types
|
||||
export * from '@vue/core'
|
||||
export * from '@vue/runtime-core'
|
@ -1,4 +1,4 @@
|
||||
import { VNode, ChildrenFlags } from '@vue/core'
|
||||
import { VNode, ChildrenFlags } from '@vue/runtime-core'
|
||||
|
||||
export function patchDOMProp(
|
||||
el: any,
|
@ -1,4 +1,4 @@
|
||||
import { VNode } from '@vue/core'
|
||||
import { VNode } from '@vue/runtime-core'
|
||||
import { patchClass } from './modules/class'
|
||||
import { patchStyle } from './modules/style'
|
||||
import { patchAttr } from './modules/attrs'
|
@ -1,4 +1,4 @@
|
||||
import { VNode } from '@vue/core'
|
||||
import { VNode } from '@vue/runtime-core'
|
||||
import { handleDelegatedEvent } from './modules/events'
|
||||
import { isOn } from '@vue/shared'
|
||||
|
@ -1,4 +1,4 @@
|
||||
# @vue/renderer-test
|
||||
# @vue/runtime-test
|
||||
|
||||
``` js
|
||||
import {
|
||||
@ -8,7 +8,7 @@ import {
|
||||
nodeOps,
|
||||
startRecordingOps,
|
||||
dumpOps
|
||||
} from '@vue/renderer-test'
|
||||
} from '@vue/runtime-test'
|
||||
|
||||
class App extends Component {
|
||||
data () {
|
7
packages/runtime-test/index.js
Normal file
7
packages/runtime-test/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/runtime-test.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/runtime-test.cjs.js')
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@vue/renderer-test",
|
||||
"name": "@vue/runtime-test",
|
||||
"version": "3.0.0-alpha.1",
|
||||
"description": "@vue/renderer-test",
|
||||
"description": "@vue/runtime-test",
|
||||
"main": "index.js",
|
||||
"module": "dist/renderer-test.esm-bundler.js",
|
||||
"module": "dist/runtime-test.esm-bundler.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -17,8 +17,8 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-test#readme",
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-test#readme",
|
||||
"dependencies": {
|
||||
"@vue/core": "3.0.0-alpha.1"
|
||||
"@vue/runtime-core": "3.0.0-alpha.1"
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ import {
|
||||
VNode,
|
||||
Component,
|
||||
createComponentInstance
|
||||
} from '@vue/core'
|
||||
} from '@vue/runtime-core'
|
||||
import { nodeOps, TestElement } from './nodeOps'
|
||||
import { patchData } from './patchData'
|
||||
|
||||
@ -35,4 +35,4 @@ export function renderIntsance<T extends Component>(
|
||||
|
||||
export { serialize } from './serialize'
|
||||
export * from './nodeOps'
|
||||
export * from '@vue/core'
|
||||
export * from '@vue/runtime-core'
|
1
packages/server-renderer/README.md
Normal file
1
packages/server-renderer/README.md
Normal file
@ -0,0 +1 @@
|
||||
# @vue/server-renderer
|
7
packages/server-renderer/index.js
Normal file
7
packages/server-renderer/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/server-renderer.cjs.prod.js')
|
||||
} else {
|
||||
module.exports = require('./dist/server-renderer.cjs.js')
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@vue/renderer-server",
|
||||
"name": "@vue/server-renderer",
|
||||
"version": "3.0.0-alpha.1",
|
||||
"description": "@vue/renderer-server",
|
||||
"description": "@vue/server-renderer",
|
||||
"main": "index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"buildOptions": {
|
||||
@ -19,5 +19,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/vuejs/vue/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/renderer-server#readme"
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/server-renderer#readme"
|
||||
}
|
@ -25,6 +25,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue#readme",
|
||||
"dependencies": {
|
||||
"@vue/renderer-dom": "3.0.0-alpha.1"
|
||||
"@vue/runtime-dom": "3.0.0-alpha.1"
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
nextTick,
|
||||
createComponentInstance,
|
||||
createComponentClassFromOptions
|
||||
} from '@vue/renderer-dom'
|
||||
} from '@vue/runtime-dom'
|
||||
|
||||
// Note: typing for this is intentionally loose, as it will be using 2.x types.
|
||||
|
||||
|
@ -24,6 +24,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue#readme",
|
||||
"dependencies": {
|
||||
"@vue/renderer-dom": "3.0.0-alpha.1"
|
||||
"@vue/runtime-dom": "3.0.0-alpha.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
// TODO this package will be the "full-build" that includes both the runtime
|
||||
// and the compiler
|
||||
export * from '@vue/renderer-dom'
|
||||
export * from '@vue/runtime-dom'
|
||||
|
@ -20,18 +20,18 @@
|
||||
"rootDir": ".",
|
||||
"paths": {
|
||||
"@vue/shared": ["packages/shared/src"],
|
||||
"@vue/core": ["packages/core/src"],
|
||||
"@vue/runtime-core": ["packages/runtime-core/src"],
|
||||
"@vue/runtime-dom": ["packages/runtime-dom/src"],
|
||||
"@vue/runtime-test": ["packages/runtime-test/src"],
|
||||
"@vue/observer": ["packages/observer/src"],
|
||||
"@vue/scheduler": ["packages/scheduler/src"],
|
||||
"@vue/renderer-dom": ["packages/renderer-dom/src"],
|
||||
"@vue/renderer-server": ["packages/renderer-server/src"],
|
||||
"@vue/renderer-test": ["packages/renderer-test/src"],
|
||||
"@vue/compiler": ["packages/compiler-core/src"]
|
||||
"@vue/compiler-core": ["packages/compiler-core/src"],
|
||||
"@vue/server-renderer": ["packages/server-renderer/src"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"packages/global.d.ts",
|
||||
"packages/renderer-dom/jsx.d.ts",
|
||||
"packages/runtime-dom/jsx.d.ts",
|
||||
"packages/*/src",
|
||||
"packages/*/__tests__"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user