Remove modules from source

This commit is contained in:
Federico Grandi
2019-12-14 21:58:11 +01:00
parent f118062594
commit e5272e4c09
4269 changed files with 0 additions and 1074858 deletions

View File

@@ -1,22 +0,0 @@
Copyright (c) 2015-2016 Amjad Masad <amjad.masad@gmail.com>
MIT License
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.

View File

@@ -1,7 +0,0 @@
# babel-helper-to-multiple-sequence-expressions
## Installation
```sh
npm install babel-helper-to-multiple-sequence-expressions --save-dev
```

View File

@@ -1,138 +0,0 @@
"use strict";
module.exports = function (t) {
return function toMultipleSequenceExpressions(statements) {
const retStatements = [];
let bailed;
do {
const res = convert(statements);
bailed = res.bailed;
const seq = res.seq,
bailedAtIndex = res.bailedAtIndex;
if (seq) {
retStatements.push(t.expressionStatement(seq));
}
if (bailed && statements[bailedAtIndex]) {
retStatements.push(statements[bailedAtIndex]);
}
if (bailed) {
statements = statements.slice(bailedAtIndex + 1);
if (!statements.length) {
bailed = false;
}
}
} while (bailed);
return retStatements;
function convert(nodes) {
const exprs = [];
const comments = [];
for (let i = 0; i < nodes.length; i++) {
const bail = () => {
let seq;
if (exprs.length === 1) {
seq = exprs[0];
} else if (exprs.length) {
seq = t.sequenceExpression(exprs);
}
return {
seq,
bailed: true,
bailedAtIndex: i
};
};
const node = nodes[i];
if (t.isExpression(node)) {
exprs.push(node);
} else if (t.isExpressionStatement(node)) {
if (node.leadingComments) {
comments.push(...node.leadingComments);
}
if (node.expression) exprs.push(node.expression);
} else if (t.isIfStatement(node)) {
let consequent;
if (node.consequent) {
const res = convert([node.consequent]);
if (res.bailed) {
return bail();
}
consequent = res.seq;
}
let alternate;
if (node.alternate) {
const res = convert([node.alternate]);
if (res.bailed) {
return bail();
}
alternate = res.seq;
}
if (!alternate && !consequent) {
exprs.push(node.test);
} else if (!alternate) {
exprs.push(t.logicalExpression("&&", node.test, consequent));
} else if (!consequent) {
exprs.push(t.logicalExpression("||", node.test, alternate));
} else {
exprs.push(t.conditionalExpression(node.test, consequent, alternate));
}
} else if (t.isBlockStatement(node)) {
const res = convert(node.body);
if (res.bailed) {
return bail();
}
if (res.seq) {
exprs.push(res.seq);
}
} else {
return bail();
}
}
let seq;
if (exprs.length === 1) {
seq = exprs[0];
} else if (exprs.length) {
seq = t.sequenceExpression(exprs);
}
/**
* collect all the comment ast nodes that are before expression
* statments and add it to the new generated node
*/
if (seq) {
seq.leadingComments = comments;
}
/* eslint-disable no-self-assign */
seq = seq;
return {
seq
};
}
};
};

View File

@@ -1,51 +0,0 @@
{
"_args": [
[
"babel-helper-to-multiple-sequence-expressions@0.5.0",
"/home/runner/work/add-and-commit/add-and-commit"
]
],
"_development": true,
"_from": "babel-helper-to-multiple-sequence-expressions@0.5.0",
"_id": "babel-helper-to-multiple-sequence-expressions@0.5.0",
"_inBundle": false,
"_integrity": "sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA==",
"_location": "/babel-helper-to-multiple-sequence-expressions",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "babel-helper-to-multiple-sequence-expressions@0.5.0",
"name": "babel-helper-to-multiple-sequence-expressions",
"escapedName": "babel-helper-to-multiple-sequence-expressions",
"rawSpec": "0.5.0",
"saveSpec": null,
"fetchSpec": "0.5.0"
},
"_requiredBy": [
"/babel-plugin-minify-simplify"
],
"_resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz",
"_spec": "0.5.0",
"_where": "/home/runner/work/add-and-commit/add-and-commit",
"author": {
"name": "amasad"
},
"bugs": {
"url": "https://github.com/babel/minify/issues"
},
"description": "## Installation",
"gitHead": "4de390008da4a486b37819109d2021a0957ad405",
"homepage": "https://github.com/babel/minify#readme",
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"name": "babel-helper-to-multiple-sequence-expressions",
"repository": {
"type": "git",
"url": "https://github.com/babel/minify/tree/master/packages/babel-helper-to-multiple-sequence-expressions"
},
"version": "0.5.0"
}