Skip to content

Commit

Permalink
Merge pull request #1473 from SuperITMan/feature/add-sync-scripts
Browse files Browse the repository at this point in the history
Add sync scripts + fixed small issues
  • Loading branch information
nicanac authored Jan 6, 2020
2 parents e0a08f6 + 941ea99 commit 0d6e28f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@
"preupdate:starter": "npm run clean:starter",
"release": "release-it",
"release:publish": "bash ./release-publish.sh --trace",
"sync:stark-build:showcase": "npm run build:stark-build && cp -Rf ./dist/packages/stark-build ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-build:starter": "npm run build:stark-build && cp -Rf ./dist/packages/stark-build ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-core:showcase": "npm run build:stark-core && cp -Rf ./dist/packages/stark-core ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-core:starter": "npm run build:stark-core && cp -Rf ./dist/packages/stark-core ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-rbac:showcase": "npm run build:stark-rbac && cp -Rf ./dist/packages/stark-rbac ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-rbac:starter": "npm run build:stark-rbac && cp -Rf ./dist/packages/stark-rbac ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-testing:showcase": "npm run build:stark-testing && cp -Rf ./dist/packages/stark-testing ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-testing:starter": "npm run build:stark-testing && cp -Rf ./dist/packages/stark-testing ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-ui:showcase": "npm run build:stark-ui && cp -Rf ./dist/packages/stark-ui ./showcase/node_modules/@nationalbankbelgium/",
"sync:stark-ui:starter": "npm run build:stark-ui && cp -Rf ./dist/packages/stark-ui ./showcase/node_modules/@nationalbankbelgium/",
"showcase": "cd showcase && npm start && cd ..",
"starter": "cd starter && npm start && cd ..",
"stylelint-check": "stylelint-config-prettier-check",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ export class StarkAppDataComponent extends AbstractStarkUiComponent implements O
};

window.addEventListener("click", this.windowClickHandler);
this.logger.debug("clickHandler added");
this.logger.debug(componentName + ": clickHandler added");
}

/**
* Method to remove a click handler from the windows
*/
public removeWindowClickHandler(): void {
if (this.windowClickHandler) {
this.logger.debug("clickHandler removed");
this.logger.debug(componentName + ": clickHandler removed");
window.removeEventListener("click", this.windowClickHandler);
this.windowClickHandler = undefined;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class StarkAppSidebarComponent extends AbstractStarkUiComponent implement
* @param result: MatDrawerToggleResult
*/
private displaySuccessCallback: (value: MatDrawerToggleResult) => void = (result: MatDrawerToggleResult) => {
this.logger.debug(componentName + result);
this.logger.debug(componentName + ": " + result);
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,16 @@ describe("createTimestampPipe", () => {
assertTimestampsValidity(invalidDateTimeStrings, false, fullDateTimeShortYearFormat);
});

it("should return FALSE if 29 February is given and the format given has no year", () => {
// it is invalid because when there is no year specified, it is assumed to be something recurrent
// and you shouldn't put something recurrent on a Feb 29!
it("should return FALSE if 29 February is given and the format given has no year and current year is NOT leap", () => {
const isALeapYear = new Date().getFullYear() % 4 === 0;

let invalidDateTimeStrings = ["29-02"];

assertTimestampsValidity(invalidDateTimeStrings, false, "DD-MM");
assertTimestampsValidity(invalidDateTimeStrings, isALeapYear, "DD-MM");

invalidDateTimeStrings = ["02-29"];

assertTimestampsValidity(invalidDateTimeStrings, false, "MM-DD");
assertTimestampsValidity(invalidDateTimeStrings, isALeapYear, "MM-DD");
});

it("should return FALSE if the date time string doesn't match the format", () => {
Expand Down

0 comments on commit 0d6e28f

Please sign in to comment.