added dedent to fix js banner formatting
This commit is contained in:
parent
795ca1b682
commit
ecfcecb53c
@ -1,4 +1,5 @@
|
|||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
const dedent = require("dedent-js");
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON("package.json"),
|
pkg: grunt.file.readJSON("package.json"),
|
||||||
@ -20,19 +21,19 @@ module.exports = function (grunt) {
|
|||||||
dest: "src/main/resources/static/js/adminBundle.min.js",
|
dest: "src/main/resources/static/js/adminBundle.min.js",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
banner: `
|
banner: dedent(`
|
||||||
* -----------------------------------------
|
* -----------------------------------------
|
||||||
* @date <%= grunt.template.today("yyyy-mm-dd") %>
|
* @date <%= grunt.template.today("yyyy-mm-dd") %>
|
||||||
* @project Chatto
|
* @project Chatto
|
||||||
* @author nova
|
* @author nova
|
||||||
* @license GPL
|
* @license GPL
|
||||||
* -----------------------------------------
|
* -----------------------------------------
|
||||||
`,
|
`),
|
||||||
usebanner: {
|
usebanner: {
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
options: {
|
||||||
position: "top",
|
position: "top",
|
||||||
banner: "/*! <%= banner %> */ ",
|
banner: "/*! \n<%= banner %> */ ",
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
src: [
|
src: [
|
||||||
@ -74,7 +75,7 @@ module.exports = function (grunt) {
|
|||||||
},
|
},
|
||||||
chat_worker_prod: {
|
chat_worker_prod: {
|
||||||
src: "src/main/frontend/workers/encryption-worker/main.ts",
|
src: "src/main/frontend/workers/encryption-worker/main.ts",
|
||||||
dest: "src/main/resources/static/js/worker.min.js",
|
dest: "src/main/resources/static/js/worker.js",
|
||||||
},
|
},
|
||||||
admin_bundle_dev: {
|
admin_bundle_dev: {
|
||||||
src: "src/main/frontend/admin/main.ts",
|
src: "src/main/frontend/admin/main.ts",
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"bootbox": "^5.4.0",
|
"bootbox": "^5.4.0",
|
||||||
"builder-pattern": "^1.2.3",
|
"builder-pattern": "^1.2.3",
|
||||||
"chart.js": "^2.9.3",
|
"chart.js": "^2.9.3",
|
||||||
|
"dedent-js": "^1.0.1",
|
||||||
"dompurify": "^2.0.7",
|
"dompurify": "^2.0.7",
|
||||||
"fuse.js": "^3.4.6",
|
"fuse.js": "^3.4.6",
|
||||||
"global": "^4.4.0",
|
"global": "^4.4.0",
|
||||||
|
@ -853,6 +853,11 @@ decode-uri-component@^0.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||||
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
|
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
|
||||||
|
|
||||||
|
dedent-js@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/dedent-js/-/dedent-js-1.0.1.tgz#bee5fb7c9e727d85dffa24590d10ec1ab1255305"
|
||||||
|
integrity sha1-vuX7fJ5yfYXf+iRZDRDsGrElUwU=
|
||||||
|
|
||||||
define-property@^0.2.5:
|
define-property@^0.2.5:
|
||||||
version "0.2.5"
|
version "0.2.5"
|
||||||
resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
|
resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
|
||||||
|
Loading…
Reference in New Issue
Block a user