mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Added Download pane
This commit is contained in:
parent
7419009745
commit
ea56efae47
3 changed files with 78 additions and 32 deletions
18
Gruntfile.js
18
Gruntfile.js
|
@ -29,7 +29,7 @@ module.exports = function (grunt) {
|
|||
"Creates a production-ready build. Use the --msg flag to add a compile message.",
|
||||
[
|
||||
"eslint", "clean:prod", "clean:config", "exec:generateConfig", "findModules", "webpack:web",
|
||||
"copy:standalone", "zip:standalone", "clean:standalone", "chmod"
|
||||
"copy:standalone", "zip:standalone", "clean:standalone", "exec:calcDownloadHash", "chmod"
|
||||
]);
|
||||
|
||||
grunt.registerTask("node",
|
||||
|
@ -323,6 +323,22 @@ module.exports = function (grunt) {
|
|||
}
|
||||
},
|
||||
exec: {
|
||||
calcDownloadHash: {
|
||||
command: function () {
|
||||
switch (process.platform) {
|
||||
case "darwin":
|
||||
return chainCommands([
|
||||
`shasum -a 256 build/prod/CyberChef_v${pkg.version}.zip | awk '{print $1;}' > build/prod/sha256digest.txt`,
|
||||
`sed -i '' -e "s/DOWNLOAD_HASH_PLACEHOLDER/$(cat build/prod/sha256digest.txt)/" build/prod/index.html`
|
||||
]);
|
||||
default:
|
||||
return chainCommands([
|
||||
`sha256sum build/prod/CyberChef_v${pkg.version}.zip | awk '{print $1;}' > build/prod/sha256digest.txt`,
|
||||
`sed -i -e "s/DOWNLOAD_HASH_PLACEHOLDER/$(cat build/prod/sha256digest.txt)/" build/prod/index.html`
|
||||
]);
|
||||
}
|
||||
},
|
||||
},
|
||||
repoSize: {
|
||||
command: chainCommands([
|
||||
"git ls-files | wc -l | xargs printf '\n%b\ttracked files\n'",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue