Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: babel/minify
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: babili@0.1.1
Choose a base ref
...
head repository: babel/minify
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 1,006 changed files with 19,915 additions and 15,182 deletions.
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
lib/
scripts/benchmark_cache
smoke/assets
coverage
fixtures
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
const OFF = "off";

module.exports = {
root: true,
extends: "eslint:recommended",
parserOptions: {
ecmaVersion: 7,
ecmaVersion: 2017,
sourceType: "module"
},
env: {
jest: true,
es6: true,
node: true
},
plugins: ["prettier"],
rules: {
"linebreak-style": ["error", "unix"],
"no-cond-assign": OFF,
"no-case-declarations": OFF
"no-case-declarations": OFF,
"prettier/prettier": ["error", { printWidth: 80 }]
}
};
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
* text eol=lf
*.jar binary
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @boopathi @vshanmugam
packages/babel-plugin-minify-builtins/* @vshanmugam
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!---
Thanks for filing an issue 😄! Before you submit, please read the following:
Search open/closed issues before submitting since someone might have asked the same thing before!
If you have a support request or question please submit them to the #minify channel on babeljs slack: https://babeljs.slack.com/messages/minify
Also have a look at the Debugging guidelines: https://github.com/babel/minify/blob/master/docs/debugging.md
Things required:
For a bug:
1. Minimal code to reproduce the bug
2. Stack Trace if there is an Error thrown during minification
3. Configuration - babel-minify configuration or babelrc
4. Whether you used it with other presets/plugins - like es2015 or env
5. Environment: gulp, rollup, webpack, babel-cli, etc...?
For an enhancement:
1. Description
2. Code Examples with transformations
-->

#### Input Code

```js

```

#### Actual Output
<!-- If an error is thrown, please provide the stack trace here -->

```js

```

#### Expected Output

```js

```

#### Details
<!---
Anything else at all
-->
107 changes: 107 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: "\U0001F41B Bug Report"
about: Incorrect Output or something is not working as expected

---

<!---
Thanks for filing an issue 😄! Before you submit, please read the following:
Search open/closed issues before submitting since someone might have asked the same thing before!
If you have a support request or question please submit them to the #minify channel on babeljs slack: https://babeljs.slack.com/messages/minify
Also have a look at the Debugging guidelines: https://github.com/babel/minify/blob/master/docs/debugging.md
-->

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

Minimal code to reproduce the bug

```js
```

**Actual Output**

If there is no Error thrown,

<!-- Provide the pretty Printed output of the minified code. -->

```js
```

**Expected Output**

<!-- What should have been the expected output? Provide a pretty printed version of the expected output -->

```js
```

**Stack Trace**

If applicable,

<!--
Please provide the full stack trace of the error thrown
-->

```
```

**Configuration**

How are you using babel-minify?

<!--
babel-minify can be used in different ways with different tools. The following are some of the options
* babel-preset-minify in babelrc
* babel-minify Node API (or) CLI
* gulp-babel-minify
* rollup-plugin-babel-minify
* babel-minify-webpack-plugin
* etc...
State how you're using babel-minify.
-->

`babel-minify CLI`

babel-minify version: `0.4.3`

babel version : `7.0.0-beta.49`

babel-minify-config:

```json5
{
removeConsole: true,
keepFnNames: true
}
```

babelrc:

<!--
If you're using babel-preset-minify directly with other plugins or presets - all running through a single babel transformation pipeline, provide the babel configuration
-->

```json5
{
plugins: [],
presets: []
}
```

**Possible solution**

<!-- If you have suggestions on a fix/reason for the bug, add them here -->

**Additional context**

<!-- Add any other context about the problem here. -->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "\U0001F680 Feature Request"
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
cache: "yarn"
- name: Bootstrap
run: yarn && yarn bootstrap
- name: Build
run: yarn build
- uses: actions/upload-artifact@v3
with:
name: lib
path: |
packages/*/lib/**/*
utils/*/lib/**
lint:
name: Lint
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: "*"
cache: "yarn"
- name: Install
run: yarn
- name: Lint
run: yarn lint

test:
name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16, 14, 12, 10, 8, 6]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install
run: yarn && yarn bootstrap
- uses: actions/download-artifact@v3
with:
name: lib
- name: Test
run: yarn test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ coverage
.test_gen_*
lib/
*.log
*~
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -2,10 +2,6 @@
path = smoke/assets/jquery
url = https://github.com/jquery/jquery
ignore = dirty
[submodule "smoke/assets/draft-js"]
path = smoke/assets/draft-js
url = https://github.com/facebook/draft-js
ignore = dirty
[submodule "smoke/assets/html-minifier"]
path = smoke/assets/html-minifier
url = https://github.com/kangax/html-minifier
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
49 changes: 35 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
---
git:
depth: 10
depth: false
submodules: false
sudo: false
language: node_js
cache: yarn

node_js:
- '7'
- '6'
- '4'
- "10"
- "8"
- "6"

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4
- export PATH=$HOME/.yarn/bin:$PATH

before_script:
- yarn run bootstrap && yarn run build
- yarn build

script:
- if [ -n "${LINT-}" ]; then yarn run lint ; fi
- if [ -z "${SKIPTESTS-}" ]; then yarn run coverage; fi
- yarn coverage --ci --maxWorkers=4 --no-cache

matrix:
include:
- node_js: "node"
env: LINT=true SKIPTESTS=true
after_success:
- yarn coverage-ci

after_success: yarn run coverage-ci
stages:
- lint
- test
- name: publish
if: repo = babel/minify
AND branch = master
AND type = push

jobs:
include:
- stage: lint
node_js: "10"
script: yarn lint
- stage: publish
node_js: "10"
script: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
deploy:
provider: script
script: npm run publish-master
skip_cleanup: true
on:
condition: '! $TRAVIS_COMMIT_MESSAGE =~ \[skip\ publish\]'
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# required for yarn < 1.0.0
workspaces-experimental true
Loading