From 89e95b3f143682ed9a006991bacf45c9dcba4818 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:43:05 +0800 Subject: remove node_modules --- .../README.md | 60 ---------------- .../lib/index.js | 81 ---------------------- .../package.json | 21 ------ 3 files changed, 162 deletions(-) delete mode 100644 node_modules/@babel/plugin-transform-block-scoped-functions/README.md delete mode 100644 node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js delete mode 100644 node_modules/@babel/plugin-transform-block-scoped-functions/package.json (limited to 'node_modules/@babel/plugin-transform-block-scoped-functions') diff --git a/node_modules/@babel/plugin-transform-block-scoped-functions/README.md b/node_modules/@babel/plugin-transform-block-scoped-functions/README.md deleted file mode 100644 index 95985cf6..00000000 --- a/node_modules/@babel/plugin-transform-block-scoped-functions/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# @babel/plugin-transform-block-scoped-functions - -> Babel plugin to ensure function declarations at the block level are block scoped. - -## Examples - -**In** - -```javascript -{ - function name (n) { - return n; - } -} - -name("Steve"); -``` - -**Out** - -```javascript -{ - let name = function (n) { - return n; - }; -} -name("Steve"); -``` - -## Installation - -```sh -npm install --save-dev @babel/plugin-transform-block-scoped-functions -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["@babel/plugin-transform-block-scoped-functions"] -} -``` - -### Via CLI - -```sh -babel --plugins @babel/plugin-transform-block-scoped-functions script.js -``` - -### Via Node API - -```javascript -require("@babel/core").transform("code", { - plugins: ["@babel/plugin-transform-block-scoped-functions"] -}); -``` diff --git a/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js b/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js deleted file mode 100644 index 970590bb..00000000 --- a/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _helperPluginUtils() { - const data = require("@babel/helper-plugin-utils"); - - _helperPluginUtils = function _helperPluginUtils() { - return data; - }; - - return data; -} - -function _core() { - const data = require("@babel/core"); - - _core = function _core() { - return data; - }; - - return data; -} - -var _default = (0, _helperPluginUtils().declare)(api => { - api.assertVersion(7); - - function statementList(key, path) { - const paths = path.get(key); - - for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - const path = _ref; - const func = path.node; - if (!path.isFunctionDeclaration()) continue; - - const declar = _core().types.variableDeclaration("let", [_core().types.variableDeclarator(func.id, _core().types.toExpression(func))]); - - declar._blockHoist = 2; - func.id = null; - path.replaceWith(declar); - } - } - - return { - visitor: { - BlockStatement(path) { - const node = path.node, - parent = path.parent; - - if (_core().types.isFunction(parent, { - body: node - }) || _core().types.isExportDeclaration(parent)) { - return; - } - - statementList("body", path); - }, - - SwitchCase(path) { - statementList("consequent", path); - } - - } - }; -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/plugin-transform-block-scoped-functions/package.json b/node_modules/@babel/plugin-transform-block-scoped-functions/package.json deleted file mode 100644 index 6e310e79..00000000 --- a/node_modules/@babel/plugin-transform-block-scoped-functions/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@babel/plugin-transform-block-scoped-functions", - "version": "7.0.0-beta.47", - "description": "Babel plugin to ensure function declarations at the block level are block scoped", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoped-functions", - "license": "MIT", - "main": "lib/index.js", - "keywords": [ - "babel-plugin" - ], - "dependencies": { - "@babel/helper-plugin-utils": "7.0.0-beta.47" - }, - "peerDependencies": { - "@babel/core": "7.0.0-beta.47" - }, - "devDependencies": { - "@babel/core": "7.0.0-beta.47", - "@babel/helper-plugin-test-runner": "7.0.0-beta.47" - } -} -- cgit v1.2.3