Update with working working version (#12)
* Fix workflow * Trigger * [auto] Update compiled version * [auto] Commit modules * Push Windows changes * Fix * [auto] Update compiled version * Try removing cwd * [auto] Update compiled version * Try with path module * [auto] Update compiled version * Fix path * [auto] Update compiled version * Use raw path * [auto] Update compiled version * Other path * [auto] Update compiled version * Avoid @action/exec * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * Try with shelljs * [auto] Update compiled version * Fix my stupidity * Copy scripts to local dir * [auto] Update compiled version * Still use path * [auto] Update compiled version * Delete entrypoint.sh * [auto] Update compiled version * Make file executable * [auto] Update compiled version * Try using bash * [auto] Update compiled version
This commit is contained in:
22
node_modules/babel-plugin-minify-dead-code-elimination/LICENSE
generated
vendored
Normal file
22
node_modules/babel-plugin-minify-dead-code-elimination/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
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.
|
||||
74
node_modules/babel-plugin-minify-dead-code-elimination/README.md
generated
vendored
Normal file
74
node_modules/babel-plugin-minify-dead-code-elimination/README.md
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# babel-plugin-minify-dead-code-elimination
|
||||
|
||||
Inlines bindings when possible. Tries to evaluate expressions and prunes unreachable as a result.
|
||||
|
||||
## Example
|
||||
|
||||
**In**
|
||||
|
||||
```javascript
|
||||
function foo() {var x = 1;}
|
||||
function bar() { var x = f(); }
|
||||
function baz() {
|
||||
var x = 1;
|
||||
console.log(x);
|
||||
function unused() {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```javascript
|
||||
function foo() {}
|
||||
function bar() { f(); }
|
||||
function baz() {
|
||||
console.log(1);
|
||||
}
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install babel-plugin-minify-dead-code-elimination --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
// without options
|
||||
{
|
||||
"plugins": ["minify-dead-code-elimination"]
|
||||
}
|
||||
|
||||
// with options
|
||||
{
|
||||
"plugins": ["minify-dead-code-elimination", { "optimizeRawSize": true }]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
babel --plugins minify-dead-code-elimination script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("@babel/core").transform("code", {
|
||||
plugins: ["minify-dead-code-elimination"]
|
||||
});
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
+ `keepFnName` - prevent plugin from removing function name. Useful for code depending on `fn.name`
|
||||
+ `keepFnArgs` - prevent plugin from removing function args. Useful for code depending on `fn.length`
|
||||
+ `keepClassName` - prevent plugin from removing class name. Useful for code depending on `cls.name`
|
||||
+ `tdz` - Account for TDZ (Temporal Dead Zone)
|
||||
1438
node_modules/babel-plugin-minify-dead-code-elimination/lib/index.js
generated
vendored
Normal file
1438
node_modules/babel-plugin-minify-dead-code-elimination/lib/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
node_modules/babel-plugin-minify-dead-code-elimination/lib/remove-use-strict.js
generated
vendored
Normal file
48
node_modules/babel-plugin-minify-dead-code-elimination/lib/remove-use-strict.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = removeUseStrict;
|
||||
const newIssueUrl = "https://github.com/babel/minify/issues/new";
|
||||
const useStrict = "use strict";
|
||||
/**
|
||||
* Remove redundant use strict
|
||||
* If the parent has a "use strict" directive, it is not required in
|
||||
* the children
|
||||
*
|
||||
* @param {NodePath} block BlockStatement
|
||||
*/
|
||||
|
||||
function removeUseStrict(block) {
|
||||
if (!block.isBlockStatement()) {
|
||||
throw new Error(`Received ${block.type}. Expected BlockStatement. ` + `Please report at ${newIssueUrl}`);
|
||||
}
|
||||
|
||||
const useStricts = getUseStrictDirectives(block); // early exit
|
||||
|
||||
if (useStricts.length < 1) return; // only keep the first use strict
|
||||
|
||||
if (useStricts.length > 1) {
|
||||
for (let i = 1; i < useStricts.length; i++) {
|
||||
useStricts[i].remove();
|
||||
}
|
||||
} // check if parent has an use strict
|
||||
|
||||
|
||||
if (hasStrictParent(block)) {
|
||||
useStricts[0].remove();
|
||||
}
|
||||
}
|
||||
|
||||
function hasStrictParent(path) {
|
||||
return path.findParent(parent => parent.isBlockStatement() && isStrict(parent));
|
||||
}
|
||||
|
||||
function isStrict(block) {
|
||||
return getUseStrictDirectives(block).length > 0;
|
||||
}
|
||||
|
||||
function getUseStrictDirectives(block) {
|
||||
var dir = block.get("directives");
|
||||
return Array.isArray(dir) ? dir.filter(function (directive) {
|
||||
return directive.node.value.value === useStrict;
|
||||
}) : [];
|
||||
}
|
||||
57
node_modules/babel-plugin-minify-dead-code-elimination/package.json
generated
vendored
Normal file
57
node_modules/babel-plugin-minify-dead-code-elimination/package.json
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"babel-plugin-minify-dead-code-elimination@0.5.1",
|
||||
"/home/runner/work/add-and-commit/add-and-commit"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "babel-plugin-minify-dead-code-elimination@0.5.1",
|
||||
"_id": "babel-plugin-minify-dead-code-elimination@0.5.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-x8OJOZIrRmQBcSqxBcLbMIK8uPmTvNWPXH2bh5MDCW1latEqYiRMuUkPImKcfpo59pTUB2FT7HfcgtG8ZlR5Qg==",
|
||||
"_location": "/babel-plugin-minify-dead-code-elimination",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "babel-plugin-minify-dead-code-elimination@0.5.1",
|
||||
"name": "babel-plugin-minify-dead-code-elimination",
|
||||
"escapedName": "babel-plugin-minify-dead-code-elimination",
|
||||
"rawSpec": "0.5.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.5.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-preset-minify"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.1.tgz",
|
||||
"_spec": "0.5.1",
|
||||
"_where": "/home/runner/work/add-and-commit/add-and-commit",
|
||||
"author": {
|
||||
"name": "amasad"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/minify/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-helper-evaluate-path": "^0.5.0",
|
||||
"babel-helper-mark-eval-scopes": "^0.4.3",
|
||||
"babel-helper-remove-or-void": "^0.4.3",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"description": "Inlines bindings when possible. Tries to evaluate expressions and prunes unreachable as a result.",
|
||||
"gitHead": "e1d0c52f5b501f5849741be6db56f968094854eb",
|
||||
"homepage": "https://github.com/babel/minify#readme",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-plugin-minify-dead-code-elimination",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/minify/tree/master/packages/babel-plugin-minify-dead-code-elimination"
|
||||
},
|
||||
"version": "0.5.1"
|
||||
}
|
||||
Reference in New Issue
Block a user