|
| 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 | + gulp |
| 7 | + .src("build/static/js/*chunk.js", { base: "./" }) |
| 8 | + .pipe( |
| 9 | + gap.prependText(`/*! |
| 10 | +
|
| 11 | +========================================================= |
| 12 | +* Now UI Kit React - v1.4.0 |
| 13 | +========================================================= |
| 14 | +
|
| 15 | +* Product Page: https://www.creative-tim.com/product/now-ui-kit-react |
| 16 | +* Copyright 2020 Creative Tim (http://www.creative-tim.com) |
| 17 | +
|
| 18 | +* Coded by Creative Tim |
| 19 | +
|
| 20 | +========================================================= |
| 21 | +
|
| 22 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 23 | +
|
| 24 | +*/`) |
| 25 | + ) |
| 26 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 27 | + |
| 28 | + // this is to add Creative Tim licenses in the production mode for the minified js |
| 29 | + gulp |
| 30 | + .src("build/static/js/runtime*.js", { base: "./" }) |
| 31 | + .pipe( |
| 32 | + gap.prependText(`/*! |
| 33 | +
|
| 34 | + ========================================================= |
| 35 | + * Now UI Kit React - v1.4.0 |
| 36 | + ========================================================= |
| 37 | +
|
| 38 | + * Product Page: https://www.creative-tim.com/product/now-ui-kit-react |
| 39 | + * Copyright 2020 Creative Tim (http://www.creative-tim.com) |
| 40 | +
|
| 41 | + * Coded by Creative Tim |
| 42 | +
|
| 43 | + ========================================================= |
| 44 | +
|
| 45 | + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 46 | +
|
| 47 | + */`) |
| 48 | + ) |
| 49 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 50 | + |
| 51 | + // this is to add Creative Tim licenses in the production mode for the minified html |
| 52 | + gulp |
| 53 | + .src("build/index.html", { base: "./" }) |
| 54 | + .pipe( |
| 55 | + gap.prependText(`<!-- |
| 56 | +
|
| 57 | +========================================================= |
| 58 | +* Now UI Kit React - v1.4.0 |
| 59 | +========================================================= |
| 60 | +
|
| 61 | +* Product Page: https://www.creative-tim.com/product/now-ui-kit-react |
| 62 | +* Copyright 2020 Creative Tim (http://www.creative-tim.com) |
| 63 | +
|
| 64 | +* Coded by Creative Tim |
| 65 | +
|
| 66 | +========================================================= |
| 67 | +
|
| 68 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 69 | +
|
| 70 | +-->`) |
| 71 | + ) |
| 72 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 73 | + |
| 74 | + // this is to add Creative Tim licenses in the production mode for the minified css |
| 75 | + gulp |
| 76 | + .src("build/static/css/*chunk.css", { base: "./" }) |
| 77 | + .pipe( |
| 78 | + gap.prependText(`/*! |
| 79 | +
|
| 80 | +========================================================= |
| 81 | +* Now UI Kit React - v1.4.0 |
| 82 | +========================================================= |
| 83 | +
|
| 84 | +* Product Page: https://www.creative-tim.com/product/now-ui-kit-react |
| 85 | +* Copyright 2020 Creative Tim (http://www.creative-tim.com) |
| 86 | +
|
| 87 | +* Coded by Creative Tim |
| 88 | +
|
| 89 | +========================================================= |
| 90 | +
|
| 91 | +* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
| 92 | +
|
| 93 | +*/`) |
| 94 | + ) |
| 95 | + .pipe(gulp.dest("./", { overwrite: true })); |
| 96 | + return; |
| 97 | +}); |
0 commit comments