From b198a665cf5ae76ea1a4349c133e33e31fed3348 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 10 Dec 2019 11:31:57 -0500 Subject: [PATCH] workflow: add size-check package --- package.json | 2 +- packages/size-check/README.md | 3 +++ packages/size-check/package.json | 9 +++++++++ packages/size-check/src/index.ts | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 packages/size-check/README.md create mode 100644 packages/size-check/package.json create mode 100644 packages/size-check/src/index.ts diff --git a/package.json b/package.json index a36d82e2..0e276fa5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "node scripts/dev.js", "build": "node scripts/build.js", - "size-runtime": "node scripts/build.js runtime-dom -p -f global", + "size-runtime": "node scripts/build.js runtime-dom size-check -p -f global", "size-compiler": "node scripts/build.js compiler-dom -p -f global", "size": "yarn size-runtime && yarn size-compiler", "lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"", diff --git a/packages/size-check/README.md b/packages/size-check/README.md new file mode 100644 index 00000000..23cf1899 --- /dev/null +++ b/packages/size-check/README.md @@ -0,0 +1,3 @@ +# Size Check + +This package is private and is used for checking the baseline runtime size after tree-shaking (with only the bare minimal code required to render something to the screen). diff --git a/packages/size-check/package.json b/packages/size-check/package.json new file mode 100644 index 00000000..8fa5f6f6 --- /dev/null +++ b/packages/size-check/package.json @@ -0,0 +1,9 @@ +{ + "name": "@vue/size-check", + "version": "3.0.0-alpha.1", + "private": true, + "buildOptions": { + "name": "Vue", + "formats": ["global"] + } +} diff --git a/packages/size-check/src/index.ts b/packages/size-check/src/index.ts new file mode 100644 index 00000000..dfda0bdb --- /dev/null +++ b/packages/size-check/src/index.ts @@ -0,0 +1,4 @@ +import { render, createVNode } from '@vue/runtime-dom' + +// The bare minimum code required for rendering something to the screen +render(createVNode('div'), document.getElementById('app')!)