Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ module.exports = function (grunt) {

grunt.initConfig({
pkg,
//Executing this task will populate grunt.config.gitinfo with repository data below
gitinfo: {
local: { branch: { current: { SHA: "", name: "", currentUser: "", } } },
remote: { origin: { url: "" } }
githash: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this task do anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

githash/gitinfo used to retrieve information about the current git status such as branch, hash, etc. it is used when we deploy to our local branch. this task used in grunt deploy-branch

to use the task we have to configure in the initConfig and register the task in the grunt.registerTask

main: {
options: {},
},
},
jshint: {
options: {
Expand All @@ -28,7 +28,7 @@ module.exports = function (grunt) {
compressed: ["dist/compressed"],
uncompressed: ["dist/uncompressed"],
branches:[ "dist/branches"],
current_branch: [ "dist/branches/compressed/<%= gitinfo.local.branch.current.name %>"],
current_branch: [ "dist/branches/compressed/<%= githash.main.branch %>"],
dist: ["dist"],
},
copy: {
Expand Down Expand Up @@ -107,7 +107,7 @@ module.exports = function (grunt) {
expand: true,
cwd: "dist/compressed",
src: [ "**"],
dest: "dist/branches/compressed/<%= gitinfo.local.branch.current.name %>"
dest: "dist/branches/compressed/<%= githash.main.branch %>"
}
]
},
Expand Down Expand Up @@ -211,7 +211,7 @@ module.exports = function (grunt) {
options: {
base: "dist/branches/compressed",
add: true,
message: "Grunt deploy-branch v<%=pkg.version%> to $username.github.io/webtrader/<%= gitinfo.local.branch.current.name %>"
message: "Grunt deploy-branch v<%=pkg.version%> to $username.github.io/webtrader/<%= githash.main.branch %>"
},
src: ["**/*"]
},
Expand Down Expand Up @@ -376,7 +376,7 @@ module.exports = function (grunt) {
//Meant for local development use ONLY - for pushing to individual forks
/* Deploy to a sub-folder of gh-pages with the name of current branch,
This is only for developers working on different branches in their forks. */
grunt.registerTask("deploy-branch", ["default","gitinfo", "clean:current_branch", "copy:copy_current_branch", "gh-pages:deploy-branch"]);
grunt.registerTask("deploy-branch", ["default","githash", "clean:current_branch", "copy:copy_current_branch", "gh-pages:deploy-branch"]);
/* clean all the files in gh-pages branch */
grunt.registerTask("gh-pages-clean", ["gh-pages:clean"]);

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-cssmin": "^0.12.2",
"grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-htmlmin": "^3.0.0",
"grunt-contrib-imagemin": "^3.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-uglify": "^4.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-gh-pages": "^3.1.0",
"grunt-gitinfo": "^0.1.7",
"grunt-githash": "^0.1.3",
"grunt-newer": "^1.2.0",
"grunt-po2json": "^0.3.0",
"grunt-remove-logging": "ehynds/grunt-remove-logging",
Expand Down
115 changes: 34 additions & 81 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@ async@^2.0.0, async@^2.6.0:
dependencies:
lodash "^4.17.10"

async@~0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=

async@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
Expand Down Expand Up @@ -1128,6 +1123,11 @@ block-stream@*:
dependencies:
inherits "~2.0.0"

bluebird@^3.0.5:
version "3.5.3"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7"
integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==

body@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069"
Expand Down Expand Up @@ -1167,13 +1167,6 @@ braces@^2.3.1:
split-string "^3.0.2"
to-regex "^3.0.1"

browserify-zlib@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d"
integrity sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=
dependencies:
pako "~0.2.0"

browserslist@^3.2.6:
version "3.2.8"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
Expand Down Expand Up @@ -1376,21 +1369,13 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

clean-css@4.2.x:
clean-css@4.2.x, clean-css@~4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==
dependencies:
source-map "~0.6.0"

clean-css@^3.1.0:
version "3.4.28"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.28.tgz#bf1945e82fc808f55695e6ddeaec01400efd03ff"
integrity sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=
dependencies:
commander "2.8.x"
source-map "0.4.x"

cli@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14"
Expand Down Expand Up @@ -1495,7 +1480,7 @@ commander@2.6.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d"
integrity sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=

commander@2.8.x, commander@~2.8.1:
commander@~2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=
Expand All @@ -1522,7 +1507,7 @@ concat-map@0.0.1:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=

concat-stream@1.6.2, concat-stream@^1.4.1:
concat-stream@1.6.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
Expand Down Expand Up @@ -2722,6 +2707,11 @@ gifsicle@^4.0.0:
execa "^1.0.0"
logalot "^2.0.0"

git-rev-2@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/git-rev-2/-/git-rev-2-0.1.0.tgz#748165a8c84fb01ea67467ff15ab3e37ace4064c"
integrity sha1-dIFlqMhPsB6mdGf/Fas+N6zkBkw=

github-from-package@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
Expand Down Expand Up @@ -2979,14 +2969,14 @@ grunt-contrib-copy@^0.8.0:
chalk "^1.1.1"
file-sync-cmp "^0.1.0"

grunt-contrib-cssmin@^0.12.2:
version "0.12.3"
resolved "https://registry.yarnpkg.com/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.12.3.tgz#4157596096fb7656fc464b4cc7b0746de1f39014"
integrity sha1-QVdZYJb7dlb8RktMx7B0beHzkBQ=
grunt-contrib-cssmin@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/grunt-contrib-cssmin/-/grunt-contrib-cssmin-3.0.0.tgz#1767c0a062f4b7353c5adcadc52dcff7197d4d89"
integrity sha512-eXpooYmVGKMs/xV7DzTLgJFPVOfMuawPD3x0JwhlH0mumq2NtH3xsxaHxp1Y3NKxp0j0tRhFS6kSBRsz6TuTGg==
dependencies:
chalk "^1.0.0"
clean-css "^3.1.0"
maxmin "^1.1.0"
chalk "^2.4.1"
clean-css "~4.2.1"
maxmin "^2.1.0"

grunt-contrib-htmlmin@^3.0.0:
version "3.0.0"
Expand Down Expand Up @@ -3054,14 +3044,13 @@ grunt-gh-pages@^3.1.0:
q-io "^1.13.6"
url-safe "^2.0.0"

grunt-gitinfo@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/grunt-gitinfo/-/grunt-gitinfo-0.1.8.tgz#3071215f578a488151c0dfd8d96bf2abce7b50d2"
integrity sha1-MHEhX1eKSIFRwN/Y2Wvyq857UNI=
grunt-githash@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/grunt-githash/-/grunt-githash-0.1.3.tgz#17c7bc75129b678fb187a4fcff83552e40489b56"
integrity sha1-F8e8dRKbZ4+xh6T8/4NVLkBIm1Y=
dependencies:
async "~0.9.0"
getobject "~0.1.0"
lodash "~2.4.1"
bluebird "^3.0.5"
git-rev-2 "^0.1.0"

grunt-known-options@~1.1.0:
version "1.1.1"
Expand Down Expand Up @@ -3169,14 +3158,6 @@ grunt@^1.0.1:
path-is-absolute "~1.0.0"
rimraf "~2.6.2"

gzip-size@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-1.0.0.tgz#66cf8b101047227b95bace6ea1da0c177ed5c22f"
integrity sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=
dependencies:
browserify-zlib "^0.1.4"
concat-stream "^1.4.1"

gzip-size@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520"
Expand Down Expand Up @@ -4097,11 +4078,6 @@ lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.5.1, l
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==

lodash@~2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e"
integrity sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=

logalot@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552"
Expand Down Expand Up @@ -4194,16 +4170,6 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"

maxmin@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-1.1.0.tgz#71365e84a99dd8f8b3f7d5fde2f00d1e7f73be61"
integrity sha1-cTZehKmd2Piz99X94vANHn9zvmE=
dependencies:
chalk "^1.0.0"
figures "^1.0.1"
gzip-size "^1.0.0"
pretty-bytes "^1.0.0"

maxmin@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-2.1.0.tgz#4d3b220903d95eee7eb7ac7fa864e72dc09a3166"
Expand All @@ -4219,7 +4185,7 @@ mdn-data@~1.1.0:
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01"
integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==

meow@^3.1.0, meow@^3.3.0, meow@^3.7.0:
meow@^3.3.0, meow@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=
Expand Down Expand Up @@ -4760,11 +4726,6 @@ p-timeout@^2.0.1:
dependencies:
p-finally "^1.0.0"

pako@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=

paralleljs@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/paralleljs/-/paralleljs-0.2.1.tgz#ebca745d3e09c01e2bebcc14858891ff4510e926"
Expand Down Expand Up @@ -4995,14 +4956,6 @@ prepend-http@^2.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=

pretty-bytes@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
integrity sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=
dependencies:
get-stdin "^4.0.1"
meow "^3.1.0"

pretty-bytes@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-3.0.1.tgz#27d0008d778063a0b4811bb35c79f1bd5d5fbccf"
Expand Down Expand Up @@ -5692,20 +5645,20 @@ source-map-url@^0.4.0:
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=

source-map@0.4.x, source-map@^0.4.2:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
integrity sha1-66T12pwNyZneaAMti092FzZSA2s=
dependencies:
amdefine ">=0.0.4"

source-map@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.3.0.tgz#8586fb9a5a005e5b501e21cd18b6f21b457ad1f9"
integrity sha1-hYb7mloAXltQHiHNGLbyG0V60fk=
dependencies:
amdefine ">=0.0.4"

source-map@^0.4.2:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
integrity sha1-66T12pwNyZneaAMti092FzZSA2s=
dependencies:
amdefine ">=0.0.4"

source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
Expand Down