Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
This is an internal package used by `vue-loader` and `vueify`. It processes the raw render functions generated by `vue-template-compiler` to:
1. add support to ES2015 features in template expressions via Buble. (see [supported features here](https://buble.surge.sh/guide/#supported-features)).
**Note:** since version 1.8.0, object rest spread usage inside templates are transpiled to `Object.assign` calls by default. This means if you need to support IE, you will need to polyfill `Object.assign`. (Latest version of Vue CLI will do this for you).
2. remove the `with` block inside render functions to make it strict-mode compliant. This is performed only at build time so that the base template compiler can be extremely small and lightweight.
The buble implementation is built from a fork at https://github.com/yyx990803/buble

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,26 @@
var buble = require('./buble.js')
// selectively support some handy ES2015 features in templates.
var defaultOptions = {
transforms: {
modules: false,
// this is a custom feature for stripping with from Vue render functions.
stripWith: true,
// custom feature ensures with context targets functional render
stripWithFunctional: false
},
// allow spread...
objectAssign: 'Object.assign'
}
module.exports = function transpile (code, opts) {
if (opts) {
opts = Object.assign({}, defaultOptions, opts)
opts.transforms = Object.assign({}, defaultOptions.transforms, opts.transforms)
} else {
opts = defaultOptions
}
var code = buble.transform(code, opts).code
// console.log(code)
return code
}

View File

@@ -0,0 +1,63 @@
{
"_from": "vue-template-es2015-compiler@^1.6.0",
"_id": "vue-template-es2015-compiler@1.9.1",
"_inBundle": false,
"_integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"_location": "/vue-template-es2015-compiler",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "vue-template-es2015-compiler@^1.6.0",
"name": "vue-template-es2015-compiler",
"escapedName": "vue-template-es2015-compiler",
"rawSpec": "^1.6.0",
"saveSpec": null,
"fetchSpec": "^1.6.0"
},
"_requiredBy": [
"/vue-loader"
],
"_resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz",
"_shasum": "1ee3bc9a16ecbf5118be334bb15f9c46f82f5825",
"_spec": "vue-template-es2015-compiler@^1.6.0",
"_where": "D:\\developments\\teaser-inertia\\nova-components\\NovaLeader\\node_modules\\vue-loader",
"author": {
"name": "Evan You"
},
"bugs": {
"url": "https://github.com/vuejs/vue-template-es2015-compiler/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Post compiler for Vue template render functions to support ES2015+ features",
"devDependencies": {
"jest": "^24.1.0",
"vue": "^2.6.0",
"vue-template-compiler": "^2.6.0"
},
"files": [
"index.js",
"buble.js"
],
"homepage": "https://github.com/vuejs/vue-template-es2015-compiler#readme",
"jest": {
"testPathIgnorePatterns": [
"/node_modules/",
"/buble/"
]
},
"license": "MIT",
"main": "index.js",
"name": "vue-template-es2015-compiler",
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue-template-es2015-compiler.git"
},
"scripts": {
"build": "cd buble && npm run build && cp dist/buble-browser-deps.umd.js ../buble.js",
"prepublishOnly": "jest && npm run build",
"test": "jest"
},
"version": "1.9.1"
}