tobii icon indicating copy to clipboard operation
tobii copied to clipboard

Add license and link to library for easier license compliance

Open Calinou opened this issue 5 years ago • 8 comments

Currently, the files in dist/js only state the following:

/**
 * tobii 2.0.0-beta 
 *
 */

I suggest changing it to something like this:

/**
 * tobii 2.0.0-beta 
 * Licensed under the MIT license.
 * https://github.com/midzer/tobii
 */

The header should also be added to the CSS. This way, people using the library can comply with the license more easily. Thanks in advance :slightly_smiling_face:

Calinou avatar Jan 05 '21 21:01 Calinou

Hey @Calinou Yup, good point. This should be done before v2 release

midzer avatar Jan 06 '21 18:01 midzer

Current dist files contain no comments at all. Is this possible with microbundle, @ocean90 ?

midzer avatar Jul 02 '21 21:07 midzer

No, but you can probably add a postbuild script running something like this.

ocean90 avatar Jul 05 '21 14:07 ocean90

Good advice, awesome :) We'll do this in the upcoming version.

midzer avatar Jul 05 '21 15:07 midzer

@ocean90 I've spent some time trying to get this to work according to your example.

Too bad, with postbuild you can't pipe the banner properly in the file: js content is replaced and processing does not continue for other files.

There is a way to do it in BASH https://www.cyberciti.biz/faq/bash-prepend-text-lines-to-file/ but it is kinda ugly to put the whole banner in package.json several times.

Do you wanna try it? Otherwise I would leave this one as "wontfix".

midzer avatar Jul 30 '21 01:07 midzer

It is not only for license compliance, minified resource should include name, version and URL. Problem, that we have 5 js files in dist folder, do we really need all of them?

viliusle avatar Jul 30 '21 19:07 viliusle

Related question, why we have both dist/tobii.js and dist/tobii.min.js, if both are minified?

p.s. first file is smaller.

viliusle avatar Aug 05 '21 06:08 viliusle

Maybe @ocean90 has more info about those microbundle dist files

midzer avatar Aug 05 '21 10:08 midzer