Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve license information/header in minified file #65

Closed
matronator opened this issue May 19, 2021 · 6 comments · Fixed by #68
Closed

Preserve license information/header in minified file #65

matronator opened this issue May 19, 2021 · 6 comments · Fixed by #68
Assignees
Labels
Status: WIP Currently being worked on. Type: Feature Suggest a new feature.

Comments

@matronator
Copy link

🚀 Feature Request

Is your feature request related to a problem? Please describe.

  • The extension removes all comments including all license information (like the header at the top of the file).

Describe the solution you'd like

  • Add some option to keep the license information intact. Either in the extension settings in VSCode, or via some annotation like Google Closure Compiler uses.
/* 
 * @preserve
 * TERMS OF USE - EASING EQUATIONS
 * Open source under the BSD License.
 * Copyright 2001 Robert Penner All rights reserved.
 */

becomes:

/* 
  TERMS OF USE - EASING EQUATIONS
  Open source under the BSD License.
  Copyright 2001 Robert Penner All rights reserved.
 */

Source: https://softwareengineering.stackexchange.com/questions/45033/can-i-minify-javascript-that-requires-copyright-notice


Describe alternatives you've considered

  • Copy the header from the original file and insert manually...

Additional context

@welcome
Copy link

welcome bot commented May 19, 2021

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

@Josee9988
Copy link
Owner

I have this in mind, I'll try to fix it as soon as I end my classes.

@Josee9988 Josee9988 transferred this issue from Josee9988/MinifyAll May 19, 2021
@settings settings bot removed the enhancement label May 31, 2021
@Josee9988 Josee9988 added the Type: Feature Suggest a new feature. label May 31, 2021
@Josee9988 Josee9988 added the Status: WIP Currently being worked on. label Jun 29, 2021
@Josee9988
Copy link
Owner

The release will become publicly available tomorrow.

@matronator
Copy link
Author

Awesome! Thank you, great work! :)

@Josee9988
Copy link
Owner

The minifyall vscode extension will be up in some minutes.
I've decided to use the tags 'preserve' and 'endpreserve'.

The preserve tag will have to be placed at the beginning of the comments. And the @endpreserve will have to be one line before the closure of the comment.

https://gifs.com/gif/r2R4mB

@aldrians
Copy link

Hi... can we have option to keep console (log, etc..). Btw, thanks for the extension..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: WIP Currently being worked on. Type: Feature Suggest a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants