Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
22
node_modules/@babel/plugin-transform-template-literals/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/plugin-transform-template-literals/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
19
node_modules/@babel/plugin-transform-template-literals/README.md
generated
vendored
Normal file
19
node_modules/@babel/plugin-transform-template-literals/README.md
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/plugin-transform-template-literals
|
||||
|
||||
> Compile ES2015 template literals to ES5
|
||||
|
||||
See our website [@babel/plugin-transform-template-literals](https://babeljs.io/docs/babel-plugin-transform-template-literals) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-transform-template-literals
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-transform-template-literals --dev
|
||||
```
|
108
node_modules/@babel/plugin-transform-template-literals/lib/index.js
generated
vendored
Normal file
108
node_modules/@babel/plugin-transform-template-literals/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
||||
var _core = require("@babel/core");
|
||||
var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) => {
|
||||
var _api$assumption, _api$assumption2;
|
||||
api.assertVersion(7);
|
||||
const ignoreToPrimitiveHint = (_api$assumption = api.assumption("ignoreToPrimitiveHint")) != null ? _api$assumption : options.loose;
|
||||
const mutableTemplateObject = (_api$assumption2 = api.assumption("mutableTemplateObject")) != null ? _api$assumption2 : options.loose;
|
||||
let helperName = "taggedTemplateLiteral";
|
||||
if (mutableTemplateObject) helperName += "Loose";
|
||||
function buildConcatCallExpressions(items) {
|
||||
let avail = true;
|
||||
return items.reduce(function (left, right) {
|
||||
let canBeInserted = _core.types.isLiteral(right);
|
||||
if (!canBeInserted && avail) {
|
||||
canBeInserted = true;
|
||||
avail = false;
|
||||
}
|
||||
if (canBeInserted && _core.types.isCallExpression(left)) {
|
||||
left.arguments.push(right);
|
||||
return left;
|
||||
}
|
||||
return _core.types.callExpression(_core.types.memberExpression(left, _core.types.identifier("concat")), [right]);
|
||||
});
|
||||
}
|
||||
return {
|
||||
name: "transform-template-literals",
|
||||
visitor: {
|
||||
TaggedTemplateExpression(path) {
|
||||
const {
|
||||
node
|
||||
} = path;
|
||||
const {
|
||||
quasi
|
||||
} = node;
|
||||
const strings = [];
|
||||
const raws = [];
|
||||
let isStringsRawEqual = true;
|
||||
for (const elem of quasi.quasis) {
|
||||
const {
|
||||
raw,
|
||||
cooked
|
||||
} = elem.value;
|
||||
const value = cooked == null ? path.scope.buildUndefinedNode() : _core.types.stringLiteral(cooked);
|
||||
strings.push(value);
|
||||
raws.push(_core.types.stringLiteral(raw));
|
||||
if (raw !== cooked) {
|
||||
isStringsRawEqual = false;
|
||||
}
|
||||
}
|
||||
const helperArgs = [_core.types.arrayExpression(strings)];
|
||||
if (!isStringsRawEqual) {
|
||||
helperArgs.push(_core.types.arrayExpression(raws));
|
||||
}
|
||||
const tmp = path.scope.generateUidIdentifier("templateObject");
|
||||
path.scope.getProgramParent().push({
|
||||
id: _core.types.cloneNode(tmp)
|
||||
});
|
||||
path.replaceWith(_core.types.callExpression(node.tag, [_core.template.expression.ast`
|
||||
${_core.types.cloneNode(tmp)} || (
|
||||
${tmp} = ${this.addHelper(helperName)}(${helperArgs})
|
||||
)
|
||||
`, ...quasi.expressions]));
|
||||
},
|
||||
TemplateLiteral(path) {
|
||||
if (path.parent.type === "TSLiteralType") {
|
||||
return;
|
||||
}
|
||||
const nodes = [];
|
||||
const expressions = path.get("expressions");
|
||||
let index = 0;
|
||||
for (const elem of path.node.quasis) {
|
||||
if (elem.value.cooked) {
|
||||
nodes.push(_core.types.stringLiteral(elem.value.cooked));
|
||||
}
|
||||
if (index < expressions.length) {
|
||||
const expr = expressions[index++];
|
||||
const node = expr.node;
|
||||
if (!_core.types.isStringLiteral(node, {
|
||||
value: ""
|
||||
})) {
|
||||
nodes.push(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!_core.types.isStringLiteral(nodes[0]) && !(ignoreToPrimitiveHint && _core.types.isStringLiteral(nodes[1]))) {
|
||||
nodes.unshift(_core.types.stringLiteral(""));
|
||||
}
|
||||
let root = nodes[0];
|
||||
if (ignoreToPrimitiveHint) {
|
||||
for (let i = 1; i < nodes.length; i++) {
|
||||
root = _core.types.binaryExpression("+", root, nodes[i]);
|
||||
}
|
||||
} else if (nodes.length > 1) {
|
||||
root = buildConcatCallExpressions(nodes);
|
||||
}
|
||||
path.replaceWith(root);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@babel/plugin-transform-template-literals/lib/index.js.map
generated
vendored
Normal file
1
node_modules/@babel/plugin-transform-template-literals/lib/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
node_modules/@babel/plugin-transform-template-literals/package.json
generated
vendored
Normal file
34
node_modules/@babel/plugin-transform-template-literals/package.json
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "@babel/plugin-transform-template-literals",
|
||||
"version": "7.25.9",
|
||||
"description": "Compile ES2015 template literals to ES5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-transform-template-literals"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.25.9"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.9",
|
||||
"@babel/helper-plugin-test-runner": "^7.25.9"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-template-literals",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue