Skip to content

Commit 5b038ca

Browse files
committed
feature: add gulp to keep CT licenses
1 parent da275a2 commit 5b038ca

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

gulpfile.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
* BLK Design System React - v1.1.0
13+
=========================================================
14+
15+
* Product Page: https://www.creative-tim.com/product/blk-design-system-react
16+
* Copyright 2020 Creative Tim (https://www.creative-tim.com)
17+
* Licensed under MIT (https://github.com/creativetimofficial/blk-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+
gulp
31+
.src("build/index.html", { base: "./" })
32+
.pipe(
33+
gap.prependText(`<!--
34+
35+
=========================================================
36+
* BLK Design System React - v1.1.0
37+
=========================================================
38+
39+
* Product Page: https://www.creative-tim.com/product/blk-design-system-react
40+
* Copyright 2020 Creative Tim (https://www.creative-tim.com)
41+
* Licensed under MIT (https://github.com/creativetimofficial/blk-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+
gulp
55+
.src("build/static/css/*chunk.css", { base: "./" })
56+
.pipe(
57+
gap.prependText(`/*!
58+
59+
=========================================================
60+
* BLK Design System React - v1.1.0
61+
=========================================================
62+
63+
* Product Page: https://www.creative-tim.com/product/blk-design-system-react
64+
* Copyright 2020 Creative Tim (https://www.creative-tim.com)
65+
* Licensed under MIT (https://github.com/creativetimofficial/blk-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

Comments
 (0)