|
| 1 | +const gulp = require("gulp"); |
| 2 | +const gap = require("gulp-append-prepend"); |
| 3 | + |
| 4 | +gulp.task("licenses", async function() { |
| 5 | + // this is to add Creative Tim licenses in the production mode for the minified js |
| 6 | + await gulp |
| 7 | + .src("build/static/js/*chunk.js", { base: "./" }) |
| 8 | + .pipe( |
| 9 | + gap.prependText(`/*! |
| 10 | +
|
| 11 | +========================================================= |
| 12 | +* Argon Design System React - v1.1.0 |
| 13 | +========================================================= |
| 14 | +
|
| 15 | +* Product Page: https://www.creative-tim.com/product/argon-design-system-react |
| 16 | +* Copyright 2020 Creative Tim (https://www.creative-tim.com) |
| 17 | +* Licensed under MIT (https://github.com/creativetimofficial/argon-design-system-react/blob/master/LICENSE.md) |
| 18 | +
|
| 19 | +* Coded by Creative Tim |
| 20 | +
|
| 21 | +========================================================= |
| 22 | +
|
| 23 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 24 | +
|
| 25 | +*/`) |
| 26 | + ) |
| 27 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 28 | + |
| 29 | + // this is to add Creative Tim licenses in the production mode for the minified html |
| 30 | + await gulp |
| 31 | + .src("build/index.html", { base: "./" }) |
| 32 | + .pipe( |
| 33 | + gap.prependText(`<!-- |
| 34 | +
|
| 35 | +========================================================= |
| 36 | +* Argon Design System React - v1.1.0 |
| 37 | +========================================================= |
| 38 | +
|
| 39 | +* Product Page: https://www.creative-tim.com/product/argon-design-system-react |
| 40 | +* Copyright 2020 Creative Tim (https://www.creative-tim.com) |
| 41 | +* Licensed under MIT (https://github.com/creativetimofficial/argon-design-system-react/blob/master/LICENSE.md) |
| 42 | +
|
| 43 | +* Coded by Creative Tim |
| 44 | +
|
| 45 | +========================================================= |
| 46 | +
|
| 47 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 48 | +
|
| 49 | +-->`) |
| 50 | + ) |
| 51 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 52 | + |
| 53 | + // this is to add Creative Tim licenses in the production mode for the minified css |
| 54 | + await gulp |
| 55 | + .src("build/static/css/*chunk.css", { base: "./" }) |
| 56 | + .pipe( |
| 57 | + gap.prependText(`/*! |
| 58 | +
|
| 59 | +========================================================= |
| 60 | +* Argon Design System React - v1.1.0 |
| 61 | +========================================================= |
| 62 | +
|
| 63 | +* Product Page: https://www.creative-tim.com/product/argon-design-system-react |
| 64 | +* Copyright 2020 Creative Tim (https://www.creative-tim.com) |
| 65 | +* Licensed under MIT (https://github.com/creativetimofficial/argon-design-system-react/blob/master/LICENSE.md) |
| 66 | +
|
| 67 | +* Coded by Creative Tim |
| 68 | +
|
| 69 | +========================================================= |
| 70 | +
|
| 71 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 72 | +
|
| 73 | +*/`) |
| 74 | + ) |
| 75 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 76 | + return; |
| 77 | +}); |
0 commit comments