Skip to content

Commit

Permalink
fix($compile): Fix for error: unexpected Token: /*
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Akopkokhyants authored and Sergey Akopkokhyants committed Jun 13, 2017
1 parent 2cf562a commit 631ac12
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2016 Sergey Akopkokhyants
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"test": "karma start",
"test-watch": "tsc && karma start --no-single-run --auto-watch",
"commit": "npm run prepublish && npm test && git-cz",
"prepublish": "ngc && npm run build",
"build": "webpack && cp *.css bundles && cp -rf img bundles/img",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"prepublish": "npm run build",
"build": "ngc --noUnusedParameters --noUnusedLocals && webpack && npm run minify && cp *.css bundles && rm -rf bundles/img && mkdir bundles/img && cp -rf img/*.* bundles/img",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"minify": "./node_modules/uglify-js/bin/uglifyjs bundles/index.umd.js --screw-ie8 --compress --mangle --comments --output bundles/index.umd.min.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -68,6 +69,7 @@
"tslint": "^5.4.3",
"tslint-loader": "^3.5.3",
"typescript": "^2.3.4",
"uglify-js": "^3.0.15",
"webpack": "^2.6.1",
"zone.js": "^0.8.12"
},
Expand Down
4 changes: 4 additions & 0 deletions src/shared.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

import { DomSanitizer } from '@angular/platform-browser';
import { PipeTransform, Pipe } from '@angular/core';

Expand Down
2 changes: 1 addition & 1 deletion src/toast.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2016 Sergey Akopkokhyants
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

Expand Down
2 changes: 1 addition & 1 deletion src/toasty.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2016 Sergey Akopkokhyants
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

Expand Down
2 changes: 1 addition & 1 deletion src/toasty.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2016 Sergey Akopkokhyants
// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

Expand Down
17 changes: 14 additions & 3 deletions src/toasty.utils.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@

// Copyright (C) 2016-2017 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-toasty

/**
* Check and return true if an object is type of string
* @param obj Analyse has to object the string type
* @return result of analysis
*/
export function isString(obj:any) {
export function isString(obj: any): boolean {
return typeof obj === "string";
}

/**
* Check and return true if an object is type of number
* @param obj Analyse has to object the boolean type
* @return result of analysis
*/
export function isNumber(obj: any) {
export function isNumber(obj: any): boolean {
return typeof obj === "number";
}

/**
* Check and return true if an object is type of Function
* @param obj Analyse has to object the function type
* @return result of analysis
*/
export function isFunction(obj: any) {
export function isFunction(obj: any): boolean {
return typeof obj === "function";
}
10 changes: 1 addition & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
"lib": ["es2015", "dom"]
},
"files": [
"index.ts",
"./src/shared.ts",
"./src/toast.component.ts",
"./src/toasty.component.ts",
"./src/toasty.service.ts",
"./src/toasty.utils.ts",
"tests/toast.component.spec.ts",
"tests/toasty.component.spec.ts",
"tests/toasty.service.spec.ts"
"index.ts"
],
"exclude": [
"node_modules",
Expand Down
2 changes: 0 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
"no-shadowed-variable": true,
"no-string-literal": false,
"no-unused-expression": true,
"no-unused-variable": true,
"no-use-before-declare": true,
"object-literal-sort-keys": false,
"one-line": [
true,
Expand Down

0 comments on commit 631ac12

Please sign in to comment.