From e76b9bcc760aeb9ebc49c7200e3d348158f7aa0b Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:50:53 +0100 Subject: [PATCH] Improve 'search' package config --- .../ng2-alfresco-login/package.json | 4 +-- .../ng2-alfresco-search/package.json | 29 +++++-------------- .../alfresco-search-autocomplete.component.ts | 2 +- .../alfresco-search-control.component.ts | 2 +- .../components/alfresco-search.component.ts | 2 +- .../{ => src}/i18n/en.json | 0 .../{ => src}/i18n/it.json | 0 7 files changed, 13 insertions(+), 26 deletions(-) rename ng2-components/ng2-alfresco-search/{ => src}/i18n/en.json (100%) rename ng2-components/ng2-alfresco-search/{ => src}/i18n/it.json (100%) diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 2bacb381ce..f78c15c3f6 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -7,8 +7,8 @@ "postinstall": "typings install", "clean": "rimraf dist node_modules typings", "typings": "typings install", - "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copy-dist && license-check", - "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", + "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check", + "build:w": "npm run tslint && rimraf dist && npm run watch-task", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copy-dist:w\" \"license-check\"", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts", "copy-dist": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src", diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index 9ba8ac48b6..98c23331fc 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -4,22 +4,15 @@ "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { + "postinstall": "typings install", "clean": "rimraf dist node_modules typings", "typings": "typings install", - "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", - "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", - "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", - "tslint": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json src/{,**/}**.ts", - "tslint-root": "tslint -c tslint.json *.ts", - "copytemplates": "npm run copy-html-css && npm run copy-i18n && npm run copy-images", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n:w\" \"npm run copy-images:w\"", - "copy-html-css": "cpx \"./src/**/*.{html,css}\" ./dist/src", - "copy-html-css:w": "cpx \"./src/**/*.{html,css}\" ./dist/src -w", - "copy-i18n": "cpx \"./i18n/**/*.json\" ./dist/i18n", - "copy-i18n:w": "cpx \"./i18n/**/*.json\" ./dist/i18n -w", - "copy-images": "cpx \"./src/**/*.{png,jpg,gif,svg}\" ./dist/src", - "copy-images:w": "cpx \"./src/**/*.{png,jpg,gif,svg}\" ./dist/src -w", + "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check", + "build:w": "npm run tslint && rimraf dist && npm run watch-task", + "watch-task": "concurrently \"npm run tsc:w\" \"npm run copy-dist:w\" \"license-check\"", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts", + "copy-dist": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src", + "copy-dist:w": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src -w", "tsc": "tsc", "tsc:w": "tsc -w", "pretest": "npm run build", @@ -108,13 +101,7 @@ }, "license-check-config": { "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" + "./dist/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search-autocomplete.component.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search-autocomplete.component.ts index 789982b14c..cd6b6cca04 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search-autocomplete.component.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search-autocomplete.component.ts @@ -57,7 +57,7 @@ export class AlfrescoSearchAutocompleteComponent implements OnChanges { private translate: AlfrescoTranslationService, private alfrescoThumbnailService: AlfrescoThumbnailService) { if (translate) { - translate.addTranslationFolder('node_modules/ng2-alfresco-search'); + translate.addTranslationFolder('node_modules/ng2-alfresco-search/dist/src'); } this.results = null; } diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search-control.component.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search-control.component.ts index 9cc93ad75b..81bd5ca99d 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search-control.component.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search-control.component.ts @@ -83,7 +83,7 @@ export class AlfrescoSearchControlComponent implements AfterViewInit { } ); - translate.addTranslationFolder('node_modules/ng2-alfresco-search'); + translate.addTranslationFolder('node_modules/ng2-alfresco-search/dist/src'); } ngAfterViewInit(): void { diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts index 60199bce9e..0b9112cf39 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.ts @@ -70,7 +70,7 @@ export class AlfrescoSearchComponent implements OnChanges, OnInit { @Optional() params: RouteParams) { if (translate !== null) { - translate.addTranslationFolder('node_modules/ng2-alfresco-search'); + translate.addTranslationFolder('node_modules/ng2-alfresco-search/dist/src'); } this.results = null; diff --git a/ng2-components/ng2-alfresco-search/i18n/en.json b/ng2-components/ng2-alfresco-search/src/i18n/en.json similarity index 100% rename from ng2-components/ng2-alfresco-search/i18n/en.json rename to ng2-components/ng2-alfresco-search/src/i18n/en.json diff --git a/ng2-components/ng2-alfresco-search/i18n/it.json b/ng2-components/ng2-alfresco-search/src/i18n/it.json similarity index 100% rename from ng2-components/ng2-alfresco-search/i18n/it.json rename to ng2-components/ng2-alfresco-search/src/i18n/it.json