Comments (5)
@aMarCruz Thank you :). Gave it a shot, only problem is I'm using IIFE and the end result is the license is added within the file (instead of at the top):
var fetchInject = (function () {
'use strict';
/*!
* Copyright (c) 2017 Josh Habdas
* @license MIT
*/
var fetchInject = function (urls) {
Given I'm trying to use uglify with this package, and it provides support, I'll see if I can get that working instead. Thanks again!
EDIT: Just stuck with rollup-plugin-license
. Seems to fit my needs and doesn't add more than I really need.
from rollup-plugin-cleanup.
Also, thanks for the plug-in. It's lovely 😄
from rollup-plugin-cleanup.
@jhabdas thanks to you! ...I'll take a look at your recommendation, I think there will be no problem adding a predefined filter for it in the next version.
In the mean time, you can use the regex /\*!/
, like in this example:
...
plugins {
cleanup({
comments: [ 'some', /\*!/ ]
})
Please note: comments[] will overwrite de default filters (it is not additive).
I hope this help and will close this issue.
from rollup-plugin-cleanup.
Excellent. I didn't know there was a workaround. I'd like to use this plug-in in combination with the minify plugin but my comments were getting clobbered for some reason so I've switched for now. Here's my current implementation: https://github.com/jhabdas/fetch-inject/blob/master/rollup.config.js
I would prefer to keep an abbreviated license field in the dist but have not yet found a way to do so using either plugin. Cheers and thanks again for considering my proposal.
from rollup-plugin-cleanup.
@jhabdas , try this:
...
plugins {
cleanup({
comments: [ 'some', /^\*!/, /MIT License/ ]
})
from rollup-plugin-cleanup.
Related Issues (20)
- Errors out on spread operator HOT 5
- Pass more options to acorn parser HOT 6
- Not cleaning up properly /**/ comments HOT 3
- Using Acorn plugins doesn't work as specified by README HOT 5
- comments: 'none' not removing all comments HOT 3
- Version 3.1.0 fails for certain template literals HOT 2
- rollup hang up when running with this plugin in node.js HOT 10
- Is this plugin still maintained? HOT 2
- when i use comments: 'none', but comments still removed HOT 2
- Does not remove comments generated by Babel
- Oddly formatted Turf.js jsDoc comments not removed HOT 2
- Using hooks as filters
- 'lineEndings: "mac"' disrupts generated sourcemap
- Doesn't work for d.ts files
- Options typing
- Rollup.js: cleanup didn't generate a sourcemap for the transformation HOT 2
- Empty line after deleting comment HOT 5
- blank lines within template literals are erroneously removed HOT 2
- feature request: removing arbitrary chunks of code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollup-plugin-cleanup.