Merge branch 'master' of git.noarch.de:hardi/opt-cc into feature/statistic-charts

pull/2/head
Florian Hartwich 2017-07-29 12:24:13 +02:00
commit a7e9c5e865
8 changed files with 209 additions and 34 deletions

11
minify.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# array of files to minify
FILES=(inline main polyfills scripts styles vendor)
OPTIONS="-c toplevel,dead_code=true,unused=true"
for i in "${FILES[@]}"
do
echo "minify ${i} ..."
$(npm bin)/uglifyjs public/${i}.bundle.js ${OPTIONS} -o public/${i}.bundle.js
done

208
package-lock.json generated
View File

@ -2,12 +2,17 @@
"name": "opt-cc", "name": "opt-cc",
"version": "1.1.2", "version": "1.1.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true,
"dependencies": { "dependencies": {
"ajv": { "ajv": {
"version": "4.11.8", "version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"dev": true "dev": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
}
}, },
"ansi-regex": { "ansi-regex": {
"version": "0.2.1", "version": "0.2.1",
@ -56,13 +61,19 @@
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
}, },
"boom": { "boom": {
"version": "2.10.1", "version": "2.10.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"dev": true, "dev": true,
"requires": {
"hoek": "2.16.3"
},
"dependencies": { "dependencies": {
"hoek": { "hoek": {
"version": "2.16.3", "version": "2.16.3",
@ -83,6 +94,13 @@
"resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
"integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
"dev": true, "dev": true,
"requires": {
"ansi-styles": "1.1.0",
"escape-string-regexp": "1.0.5",
"has-ansi": "0.1.0",
"strip-ansi": "0.3.0",
"supports-color": "0.2.0"
},
"dependencies": { "dependencies": {
"supports-color": { "supports-color": {
"version": "0.2.0", "version": "0.2.0",
@ -102,19 +120,31 @@
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
"dev": true "dev": true,
"requires": {
"delayed-stream": "1.0.0"
}
}, },
"commander": { "commander": {
"version": "2.6.0", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
"integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0="
"dev": true
}, },
"concurrently": { "concurrently": {
"version": "3.5.0", "version": "3.5.0",
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz",
"integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=", "integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=",
"dev": true "dev": true,
"requires": {
"chalk": "0.5.1",
"commander": "2.6.0",
"date-fns": "1.28.5",
"lodash": "4.17.4",
"rx": "2.3.24",
"spawn-command": "0.0.2-1",
"supports-color": "3.2.3",
"tree-kill": "1.1.0"
}
}, },
"core-js": { "core-js": {
"version": "2.4.1", "version": "2.4.1",
@ -126,13 +156,19 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"dev": true "dev": true,
"requires": {
"boom": "2.10.1"
}
}, },
"dashdash": { "dashdash": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true, "dev": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": { "dependencies": {
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
@ -159,7 +195,10 @@
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"jsbn": "0.1.1"
}
}, },
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
@ -189,13 +228,21 @@
"version": "2.1.4", "version": "2.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
"dev": true "dev": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.5",
"mime-types": "2.1.15"
}
}, },
"getpass": { "getpass": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true, "dev": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": { "dependencies": {
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
@ -215,13 +262,20 @@
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
"dev": true "dev": true,
"requires": {
"ajv": "4.11.8",
"har-schema": "1.0.5"
}
}, },
"has-ansi": { "has-ansi": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
"integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
"dev": true "dev": true,
"requires": {
"ansi-regex": "0.2.1"
}
}, },
"has-flag": { "has-flag": {
"version": "1.0.0", "version": "1.0.0",
@ -234,6 +288,12 @@
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"dev": true, "dev": true,
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
"hoek": "2.16.3",
"sntp": "1.0.9"
},
"dependencies": { "dependencies": {
"hoek": { "hoek": {
"version": "2.16.3", "version": "2.16.3",
@ -253,7 +313,12 @@
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"dev": true "dev": true,
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.0",
"sshpk": "1.13.1"
}
}, },
"is-typedarray": { "is-typedarray": {
"version": "1.0.0", "version": "1.0.0",
@ -283,7 +348,14 @@
"version": "9.2.0", "version": "9.2.0",
"resolved": "https://registry.npmjs.org/joi/-/joi-9.2.0.tgz", "resolved": "https://registry.npmjs.org/joi/-/joi-9.2.0.tgz",
"integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=", "integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=",
"dev": true "dev": true,
"requires": {
"hoek": "4.1.1",
"isemail": "2.2.1",
"items": "2.1.1",
"moment": "2.18.1",
"topo": "2.0.2"
}
}, },
"jsbn": { "jsbn": {
"version": "0.1.1", "version": "0.1.1",
@ -302,7 +374,10 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
"dev": true "dev": true,
"requires": {
"jsonify": "0.0.0"
}
}, },
"json-stringify-safe": { "json-stringify-safe": {
"version": "5.0.1", "version": "5.0.1",
@ -321,6 +396,12 @@
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
"integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=",
"dev": true, "dev": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.0.2",
"json-schema": "0.2.3",
"verror": "1.3.6"
},
"dependencies": { "dependencies": {
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
@ -346,7 +427,10 @@
"version": "2.1.15", "version": "2.1.15",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz",
"integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=",
"dev": true "dev": true,
"requires": {
"mime-db": "1.27.0"
}
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
@ -388,7 +472,31 @@
"version": "2.81.0", "version": "2.81.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
"dev": true "dev": true,
"requires": {
"aws-sign2": "0.6.0",
"aws4": "1.6.0",
"caseless": "0.12.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.1.4",
"har-validator": "4.2.1",
"hawk": "3.1.3",
"http-signature": "1.1.1",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.15",
"oauth-sign": "0.8.2",
"performance-now": "0.2.0",
"qs": "6.4.0",
"safe-buffer": "5.1.1",
"stringstream": "0.0.5",
"tough-cookie": "2.3.2",
"tunnel-agent": "0.6.0",
"uuid": "3.1.0"
}
}, },
"rx": { "rx": {
"version": "2.3.24", "version": "2.3.24",
@ -399,7 +507,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=",
"dev": true "dev": true
}, },
"sntp": { "sntp": {
@ -407,6 +515,9 @@
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"dev": true, "dev": true,
"requires": {
"hoek": "2.16.3"
},
"dependencies": { "dependencies": {
"hoek": { "hoek": {
"version": "2.16.3", "version": "2.16.3",
@ -416,6 +527,11 @@
} }
} }
}, },
"source-map": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI="
},
"spawn-command": { "spawn-command": {
"version": "0.0.2-1", "version": "0.0.2-1",
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
@ -427,6 +543,16 @@
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
"dev": true, "dev": true,
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
},
"dependencies": { "dependencies": {
"assert-plus": { "assert-plus": {
"version": "1.0.0", "version": "1.0.0",
@ -446,25 +572,37 @@
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
"integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
"dev": true "dev": true,
"requires": {
"ansi-regex": "0.2.1"
}
}, },
"supports-color": { "supports-color": {
"version": "3.2.3", "version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"dev": true "dev": true,
"requires": {
"has-flag": "1.0.0"
}
}, },
"topo": { "topo": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz", "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
"integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=",
"dev": true "dev": true,
"requires": {
"hoek": "4.1.1"
}
}, },
"tough-cookie": { "tough-cookie": {
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
"integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
"dev": true "dev": true,
"requires": {
"punycode": "1.4.1"
}
}, },
"tree-kill": { "tree-kill": {
"version": "1.1.0", "version": "1.1.0",
@ -476,7 +614,10 @@
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true "dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
}, },
"tweetnacl": { "tweetnacl": {
"version": "0.14.5", "version": "0.14.5",
@ -485,23 +626,42 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"uglify-js": {
"version": "3.0.26",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.26.tgz",
"integrity": "sha512-+D/BjzuvT1oRMSkH0fuF3M/BCvDxDywmZasd1UTPPHsdsHZqJEAZSvrojgFlS7lrM3ZZWq5h7Bb5i96X1TbOJw==",
"requires": {
"commander": "2.6.0",
"source-map": "0.5.6"
}
},
"uuid": { "uuid": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=",
"dev": true "dev": true
}, },
"verror": { "verror": {
"version": "1.3.6", "version": "1.3.6",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
"integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=",
"dev": true "dev": true,
"requires": {
"extsprintf": "1.0.2"
}
}, },
"wait-on": { "wait-on": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/wait-on/-/wait-on-2.0.2.tgz", "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-2.0.2.tgz",
"integrity": "sha1-CoT9BwJMb8Joyw6r5YW+IXqvK6o=", "integrity": "sha1-CoT9BwJMb8Joyw6r5YW+IXqvK6o=",
"dev": true, "dev": true,
"requires": {
"core-js": "2.4.1",
"joi": "9.2.0",
"minimist": "1.2.0",
"request": "2.81.0",
"rx": "4.1.0"
},
"dependencies": { "dependencies": {
"rx": { "rx": {
"version": "4.1.0", "version": "4.1.0",

View File

@ -7,7 +7,8 @@
"start": "npm run deploy-static-prod && npm start --prefix ./api", "start": "npm run deploy-static-prod && npm start --prefix ./api",
"dev": "npm run deploy-static && npm run dev --prefix ./api", "dev": "npm run deploy-static && npm run dev --prefix ./api",
"deploy-static": "cd ./static && $(npm bin)/ng build && ln -s ../api/resource/ ../public/resource", "deploy-static": "cd ./static && $(npm bin)/ng build && ln -s ../api/resource/ ../public/resource",
"deploy-static-prod": "cd ./static && $(npm bin)/ng build --env=prod && ln -s ../api/resource/ ../public/resource", "deploy-static-prod": "cd ./static && $(npm bin)/ng build --env=prod && ln -s ../api/resource/ ../public/resource && cd .. && npm run deploy-minify",
"deploy-minify": "./minify.sh",
"postinstall": "npm install --prefix ./static && npm install --prefix ./api", "postinstall": "npm install --prefix ./static && npm install --prefix ./api",
"mongodb": "mkdir -p mongodb-data && mongod --dbpath ./mongodb-data", "mongodb": "mkdir -p mongodb-data && mongod --dbpath ./mongodb-data",
"test": "npm test --prefix ./api", "test": "npm test --prefix ./api",
@ -18,5 +19,8 @@
"devDependencies": { "devDependencies": {
"concurrently": "^3.4.0", "concurrently": "^3.4.0",
"wait-on": "^2.0.2" "wait-on": "^2.0.2"
},
"dependencies": {
"uglify-js": "^3.0.26"
} }
} }

View File

@ -11,7 +11,7 @@ export interface User {
_id?: string; _id?: string;
boardUserId?: number; boardUserId?: number;
username?: string; username?: string;
squad?: Squad; squad?: any; //Squad or string
rank?: Rank; rank?: Rank;
awards?: Award[]; awards?: Award[];
} }
@ -54,7 +54,7 @@ export interface Rank {
export interface Award { export interface Award {
_id?: string, _id?: string,
userId: string, userId: string,
decorationId?: Decoration; decorationId?: any; //Decoration or string
reason?: string; reason?: string;
proposer?: AppUser; proposer?: AppUser;
date?: number; // since Date.now() returns a number date?: number; // since Date.now() returns a number

View File

@ -79,7 +79,7 @@ export class RequestAwardComponent {
addAwarding(previewImage, descriptionField) { addAwarding(previewImage, descriptionField) {
if (this.decoration._id && this.reason.length > 0) { if (this.decoration._id && this.reason.length > 0) {
const award = { const award : Award = {
"userId": this.user._id, "userId": this.user._id,
"decorationId": this.decoration._id, "decorationId": this.decoration._id,
"reason": this.reason, "reason": this.reason,

View File

@ -4,7 +4,7 @@
<div class="form-group"> <div class="form-group">
<label for="title">Name</label> <label for="title">Name</label>
<input type="text" class="form-control" <input class="form-control"
[(ngModel)]="user.username" [(ngModel)]="user.username"
name="title" name="title"
id="title" id="title"

View File

@ -1,10 +1,10 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"lib": [ "lib": [
"es2016", "es2016",
"dom" "dom"
], ],
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"target": "es5", "target": "es5",
"module": "es2015", "module": "es2015",

View File

@ -2,7 +2,7 @@
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": false,
"declaration": false, "declaration": false,
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,