mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Tidied up build directory
This commit is contained in:
parent
8d0fcf37c5
commit
7163a0802d
2 changed files with 24 additions and 7 deletions
|
@ -167,6 +167,9 @@ module.exports = function (grunt) {
|
||||||
}, moduleEntryPoints),
|
}, moduleEntryPoints),
|
||||||
output: {
|
output: {
|
||||||
path: __dirname + "/build/prod",
|
path: __dirname + "/build/prod",
|
||||||
|
filename: chunkData => {
|
||||||
|
return chunkData.chunk.name === "main" ? "assets/[name].js": "[name].js";
|
||||||
|
},
|
||||||
globalObject: "this"
|
globalObject: "this"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
@ -294,8 +297,8 @@ module.exports = function (grunt) {
|
||||||
// Add Structured Data for SEO
|
// Add Structured Data for SEO
|
||||||
content = content.replace("</head>",
|
content = content.replace("</head>",
|
||||||
"<script type='application/ld+json'>" +
|
"<script type='application/ld+json'>" +
|
||||||
JSON.stringify(grunt.file.read("src/web/static/structuredData.json")) +
|
JSON.stringify(JSON.parse(grunt.file.read("src/web/static/structuredData.json"))) +
|
||||||
"</script>");
|
"</script></head>");
|
||||||
return grunt.template.process(content, srcpath);
|
return grunt.template.process(content, srcpath);
|
||||||
} else {
|
} else {
|
||||||
return content;
|
return content;
|
||||||
|
|
|
@ -48,7 +48,7 @@ module.exports = {
|
||||||
"process.browser": "true"
|
"process.browser": "true"
|
||||||
}),
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "[name].css"
|
filename: "assets/[name].css"
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
|
@ -80,7 +80,12 @@ module.exports = {
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [
|
use: [
|
||||||
MiniCssExtractPlugin.loader,
|
{
|
||||||
|
loader: MiniCssExtractPlugin.loader,
|
||||||
|
options: {
|
||||||
|
publicPath: "../"
|
||||||
|
}
|
||||||
|
},
|
||||||
"css-loader",
|
"css-loader",
|
||||||
"postcss-loader",
|
"postcss-loader",
|
||||||
]
|
]
|
||||||
|
@ -88,7 +93,12 @@ module.exports = {
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
use: [
|
use: [
|
||||||
MiniCssExtractPlugin.loader,
|
{
|
||||||
|
loader: MiniCssExtractPlugin.loader,
|
||||||
|
options: {
|
||||||
|
publicPath: "../"
|
||||||
|
}
|
||||||
|
},
|
||||||
"css-loader",
|
"css-loader",
|
||||||
"sass-loader",
|
"sass-loader",
|
||||||
]
|
]
|
||||||
|
@ -97,7 +107,9 @@ module.exports = {
|
||||||
test: /\.(ico|eot|ttf|woff|woff2)$/,
|
test: /\.(ico|eot|ttf|woff|woff2)$/,
|
||||||
loader: "url-loader",
|
loader: "url-loader",
|
||||||
options: {
|
options: {
|
||||||
limit: 10000
|
limit: 10000,
|
||||||
|
name: "[hash].[ext]",
|
||||||
|
outputPath: "assets"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -120,7 +132,9 @@ module.exports = {
|
||||||
exclude: /web\/static/,
|
exclude: /web\/static/,
|
||||||
loader: "url-loader",
|
loader: "url-loader",
|
||||||
options: {
|
options: {
|
||||||
limit: 10000
|
limit: 10000,
|
||||||
|
name: "[hash].[ext]",
|
||||||
|
outputPath: "assets"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue