From cfb1d56a5938113d6bfa9a89a1bb2f645a50a057 Mon Sep 17 00:00:00 2001 From: harunurhan Date: Tue, 24 Oct 2017 17:05:03 +0200 Subject: [PATCH] change build command and refactor scripts * Refactors npm scripts. * Changes build command to prods * Fixes production build * Upgrades angular-cli due to: https://github.com/angular/angular-cli/issues/7113 * Adds bugs and repo to package.json --- .travis.yml | 6 ++++++ package.json | 16 +++++++++++----- src/app/conditions/conditions.component.html | 4 ++-- src/app/conditions/conditions.component.ts | 1 + src/app/multi-editor/multi-editor.component.html | 4 ++-- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3172e7f..b2c0b9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,17 @@ addons: - google-chrome packages: - google-chrome-stable + +before_script: +- npm run lint +- npm run build + before_install: - npm install buffer-shims - export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start + before_deploy: npm run build deploy: provider: npm diff --git a/package.json b/package.json index 189304b..c3919d4 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,9 @@ "license": "MIT", "scripts": { "ng": "ng", - "start": "npm run build && npm run serve", - "serve": "ng serve", - "build": "npm run lint && ng build", - "test": "npm run build && ng test --watch=false", + "start": "ng serve", + "build": "ng build --prod --output-hashing none", + "test": "ng test --watch=false", "test-dev": "ng test", "lint": "tslint \"src/**/*.ts\"", "e2e": "ng e2e", @@ -38,7 +37,7 @@ "zone.js": "^0.8.4" }, "devDependencies": { - "@angular/cli": "1.0.0", + "@angular/cli": "1.2.6", "@angular/compiler-cli": "^4.0.0", "@types/diff": "^3.2.0", "@types/jasmine": "2.5.38", @@ -57,5 +56,12 @@ "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/inspirehep/ng2-multi-record-editor.git" + }, + "bugs": { + "url": "https://github.com/inspirehep/ng2-multi-record-editor/issues" } } diff --git a/src/app/conditions/conditions.component.html b/src/app/conditions/conditions.component.html index 8ef84ca..b072aa9 100644 --- a/src/app/conditions/conditions.component.html +++ b/src/app/conditions/conditions.component.html @@ -15,7 +15,7 @@
-
- +
+
diff --git a/src/app/conditions/conditions.component.ts b/src/app/conditions/conditions.component.ts index fa1b7f2..50b9451 100644 --- a/src/app/conditions/conditions.component.ts +++ b/src/app/conditions/conditions.component.ts @@ -9,6 +9,7 @@ import { AppGlobalsService } from '../shared/services'; }) export class ConditionsComponent { @Input() condition: Condition; + constructor(private appGlobalsService: AppGlobalsService) { } get matchTypes(): string[] { diff --git a/src/app/multi-editor/multi-editor.component.html b/src/app/multi-editor/multi-editor.component.html index f34ab24..f6de86b 100644 --- a/src/app/multi-editor/multi-editor.component.html +++ b/src/app/multi-editor/multi-editor.component.html @@ -1,4 +1,4 @@ - +
@@ -20,7 +20,7 @@

Sorry no results found

-
+
Select all results