Merge branch 'task/minified-ng-output' of hardi/opt-cc into master
commit
2f932a70a7
|
@ -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
|
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue