liferay / liferay-theme-tasks

A set of tasks for building and deploying Liferay Portal themes.
18 stars 24 forks source link

Remove redundant license comments in built files. #47

Closed blzaugg closed 6 years ago

blzaugg commented 7 years ago

Expected output:

@charset "UTF-8";
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
@import url(font_lato.css);
.loading-animation, .loadingmask-message .loadingmask-message-content {
  animation: loading-animation 1.7s infinite ease;
  border-radius: 50%;
  clear: both;
  font-size: 64px;
  height: 1em;
  margin: 1em auto;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  width: 1em; }

Actual output:

@charset "UTF-8";
/*
  Note: this file was generated by the `gulp upgrade` task and provides compass
  mixins that may have been used in your 6.2 theme. It is both safe and
  recommended to remove this file if you are not using these mixins.

  This file will be included anywhere `@import "bourbon";` is imported.
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
/**
* Lexicon 1.0.19
*
* Copyright 2017, Liferay, Inc.
* All rights reserved.
* MIT license
*/
@import url(font_lato.css);
.loading-animation, .loadingmask-message .loadingmask-message-content {
  animation: loading-animation 1.7s infinite ease;
  border-radius: 50%;
  clear: both;
  font-size: 64px;
  height: 1em;
  margin: 1em auto;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  width: 1em; }
pat270 commented 7 years ago

We can't use Sass comments for the copyright. It won't be output in the compiled files.

blzaugg commented 7 years ago

Production output shouldn't need copyright comments, just source code.

natecavanaugh commented 7 years ago

@blzaugg I believe production code should contain some sort of copyright info. I think theoretically, it doesn't need it, but depending on what you're bundling, it may very well require it legally.

I think the big issue here is that the copyright is added for every file and not stripped down to only a single one. I believe it's because we stamp each (s)css file in src before compiling it into css. I'm not 100% sure what the best approach for this one would be, since we'd need to handle it both this repo but also in the theme tasks repo as well.

Maybe one option would be to only stamp the top level scss files, and ignore all partials, that way, only the top level generated files that contain everything will have the license, and we wouldn't have to worry about it appearing multiple times.

Just one thought...

blzaugg commented 7 years ago

Okay, so I guess it's common to have copyright/licence in production code.

blzaugg commented 7 years ago

I've updated the title/description to focus on the redundancy of the licence comments.

jbalsas commented 6 years ago

Re-filed together with the rest of licensing issues in the new repo location: https://github.com/liferay/liferay-themes-sdk/issues/48