From f7bd0fbdfa88d472a415e6b5a376252e7c21263c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:23:45 +0100 Subject: [PATCH 01/11] Simplify 'documentlist' package scripts --- .../ng2-alfresco-documentlist/package.json | 17 ++++++----------- .../src/components/document-list.ts | 2 +- .../{ => src}/i18n/en.json | 0 3 files changed, 7 insertions(+), 12 deletions(-) rename ng2-components/ng2-alfresco-documentlist/{ => src}/i18n/en.json (100%) diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index e02ea7c33f..b43b666e42 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -4,22 +4,17 @@ "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\"", + "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": "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", + "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", diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts index 9bfd884fae..93e5cb8591 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -136,7 +136,7 @@ export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, Af this.data = new ShareDataTableAdapter(this.documentListService, this.baseComponentPath, []); if (translate) { - translate.addTranslationFolder('node_modules/ng2-alfresco-documentlist'); + translate.addTranslationFolder('node_modules/ng2-alfresco-documentlist/dist/src'); } } diff --git a/ng2-components/ng2-alfresco-documentlist/i18n/en.json b/ng2-components/ng2-alfresco-documentlist/src/i18n/en.json similarity index 100% rename from ng2-components/ng2-alfresco-documentlist/i18n/en.json rename to ng2-components/ng2-alfresco-documentlist/src/i18n/en.json From 2a2830a237152b60b2121e3596cc7b30b0f3c117 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:36:23 +0100 Subject: [PATCH 02/11] Simplify 'tslint' task --- ng2-components/ng2-alfresco-documentlist/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index b43b666e42..cfdbd6ecf8 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -10,9 +10,7 @@ "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": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json src/{,**/}**.ts", - "tslint-root": "tslint -c tslint.json *.ts", + "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", From d64c2755eb12432fa3df7cd80949ffb7fa612173 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:42:41 +0100 Subject: [PATCH 03/11] Improve 'login' package config --- .../ng2-alfresco-login/package.json | 28 +++++-------------- .../components/alfresco-login.component.ts | 2 +- .../ng2-alfresco-login/{ => src}/i18n/en.json | 0 .../ng2-alfresco-login/{ => src}/i18n/it.json | 0 4 files changed, 8 insertions(+), 22 deletions(-) rename ng2-components/ng2-alfresco-login/{ => src}/i18n/en.json (100%) rename ng2-components/ng2-alfresco-login/{ => src}/i18n/it.json (100%) diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 98d95e3051..2bacb381ce 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/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": "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", - "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-images:w\" \"npm run copy-i18n: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", + "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", @@ -88,7 +81,6 @@ "devDependencies": { "concurrently": "2.1.0", "cpx": "1.3.1", - "http-server": "0.8.5", "jasmine-core": "2.4.1", "karma": "0.13.22", "karma-chrome-launcher": "1.0.1", @@ -110,13 +102,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-login/src/components/alfresco-login.component.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts index d578292197..c5fa4405bc 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts @@ -88,7 +88,7 @@ export class AlfrescoLoginComponent { } }; - translate.addTranslationFolder('node_modules/ng2-alfresco-login'); + translate.addTranslationFolder('node_modules/ng2-alfresco-login/dist/src'); this.form.valueChanges.subscribe(data => this.onValueChanged(data)); diff --git a/ng2-components/ng2-alfresco-login/i18n/en.json b/ng2-components/ng2-alfresco-login/src/i18n/en.json similarity index 100% rename from ng2-components/ng2-alfresco-login/i18n/en.json rename to ng2-components/ng2-alfresco-login/src/i18n/en.json diff --git a/ng2-components/ng2-alfresco-login/i18n/it.json b/ng2-components/ng2-alfresco-login/src/i18n/it.json similarity index 100% rename from ng2-components/ng2-alfresco-login/i18n/it.json rename to ng2-components/ng2-alfresco-login/src/i18n/it.json From e76b9bcc760aeb9ebc49c7200e3d348158f7aa0b Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:50:53 +0100 Subject: [PATCH 04/11] 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 From aaed924b6fc0f792f68c9f7fa3f4e08ba51c1e69 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 11:55:50 +0100 Subject: [PATCH 05/11] Improve 'upload' package config --- .../ng2-alfresco-upload/package.json | 27 ++++++------------- .../file-uploading-dialog.component.ts | 2 +- .../src/components/upload-button.component.ts | 2 +- .../components/upload-drag-area.component.ts | 2 +- .../{ => src}/i18n/en.json | 0 .../{ => src}/i18n/it.json | 0 .../src/services/upload.service.ts | 1 + 7 files changed, 12 insertions(+), 22 deletions(-) rename ng2-components/ng2-alfresco-upload/{ => src}/i18n/en.json (100%) rename ng2-components/ng2-alfresco-upload/{ => src}/i18n/it.json (100%) diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index fdc802f06d..d05fdb5692 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -4,20 +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", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n: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", + "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 +103,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-upload/src/components/file-uploading-dialog.component.ts b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts index b79b6f8958..5ee809f61b 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts @@ -56,7 +56,7 @@ export class FileUploadingDialogComponent implements OnInit { constructor(private cd: ChangeDetectorRef, translate: AlfrescoTranslationService, private _uploaderService: UploadService) { - translate.addTranslationFolder('node_modules/ng2-alfresco-upload'); + translate.addTranslationFolder('node_modules/ng2-alfresco-upload/dist/src'); } ngOnInit() { diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts index 67dea42301..4938e4c8b3 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts @@ -92,7 +92,7 @@ export class UploadButtonComponent { let formFields = this.createFormFields(); this._uploaderService.setOptions(formFields); this.translate = translate; - this.translate.addTranslationFolder('node_modules/ng2-alfresco-upload'); + this.translate.addTranslationFolder('node_modules/ng2-alfresco-upload/dist/src'); } /** diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-drag-area.component.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-drag-area.component.ts index c6994d8acb..8b92fec338 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-drag-area.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-drag-area.component.ts @@ -66,7 +66,7 @@ export class UploadDragAreaComponent { this._uploaderService.setOptions(formFields); this.translate = translate; - this.translate.addTranslationFolder('node_modules/ng2-alfresco-upload'); + this.translate.addTranslationFolder('node_modules/ng2-alfresco-upload/dist/src'); } /** diff --git a/ng2-components/ng2-alfresco-upload/i18n/en.json b/ng2-components/ng2-alfresco-upload/src/i18n/en.json similarity index 100% rename from ng2-components/ng2-alfresco-upload/i18n/en.json rename to ng2-components/ng2-alfresco-upload/src/i18n/en.json diff --git a/ng2-components/ng2-alfresco-upload/i18n/it.json b/ng2-components/ng2-alfresco-upload/src/i18n/it.json similarity index 100% rename from ng2-components/ng2-alfresco-upload/i18n/it.json rename to ng2-components/ng2-alfresco-upload/src/i18n/it.json diff --git a/ng2-components/ng2-alfresco-upload/src/services/upload.service.ts b/ng2-components/ng2-alfresco-upload/src/services/upload.service.ts index 84865481dc..1c66757ee1 100644 --- a/ng2-components/ng2-alfresco-upload/src/services/upload.service.ts +++ b/ng2-components/ng2-alfresco-upload/src/services/upload.service.ts @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { EventEmitter, Injectable } from '@angular/core'; import { Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; From 85cfe3bc7903c5d6be13713341c579c8e79a8005 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:00:06 +0100 Subject: [PATCH 06/11] Improve 'Viewer' package config --- .../ng2-alfresco-viewer/package.json | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index 716745232b..cecc281b1e 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -4,20 +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", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n: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", + "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", @@ -78,7 +73,6 @@ "concurrently": "2.1.0", "coveralls": "2.11.9", "cpx": "1.3.1", - "http-server": "0.8.5", "jasmine-ajax": "3.2.0", "jasmine-core": "2.4.1", "karma": "0.13.22", @@ -100,13 +94,7 @@ }, "license-check-config": { "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" + "./dist/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, From a09051e24bd3b12901558659b52516d8a1a7eec3 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:03:35 +0100 Subject: [PATCH 07/11] Improve 'Core' package config --- ng2-components/ng2-alfresco-core/package.json | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 349d0ee108..4f8af8938e 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -4,17 +4,16 @@ "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 copy-static && license-check", - "build:w": "npm run tslint && typings install && rimraf dist && tsc && npm run copy-static:w && npm run watch-task", + "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check", + "build:w": "npm run tslint && rimraf dist && tsc && npm run copy-dist:w && npm run watch-task", "watch-task": "concurrently \"npm run tsc: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", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts", "licensecheck": "license-check", - "copy-static": "cpx \"./src/**/*.{html,css}\" ./dist/src", - "copy-static:w": "cpx \"./src/**/*.{html,css}\" ./dist/src -w", + "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", @@ -101,13 +100,7 @@ }, "license-check-config": { "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" + "./dist/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, From 696f381cc5adfd539540bb686bb24c09858a4f24 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:05:33 +0100 Subject: [PATCH 08/11] Improve 'datatable' package config --- .../ng2-alfresco-datatable/package.json | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index efdbb26b6c..42631c6e4d 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -4,21 +4,16 @@ "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { + "postinstall": "typings install", "clean": "rimraf dist node_modules typings", "typings": "typings install", "server": "wsrv -o -p 9875", - "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", - "copytemplates:w": "concurrently \"npm run copy-html-css:w\" \"npm run copy-i18n: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", + "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", @@ -97,13 +92,7 @@ }, "license-check-config": { "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" + "./dist/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, From 94b0bfa1b168c98c68d5a8a299bbaddb8cfb5b0f Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:08:07 +0100 Subject: [PATCH 09/11] Improve 'demo app' package config --- demo-shell-ng2/package.json | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index a3919e06bd..77d1f5ff80 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -4,15 +4,14 @@ "version": "0.2.0", "author": "Alfresco Software, Ltd.", "scripts": { + "postinstall": "typings install", "clean": "rimraf node_modules typings", - "start": "npm run tslint && typings install && concurrently \"npm run tsc:w\" \"license-check\" \"npm run serve\" ", + "start": "npm run tslint && concurrently \"npm run tsc:w\" \"license-check\" \"npm run serve\" ", "tsc": "tsc", "tsc:w": "tsc -w", "serve": "node browser-sync-config.js", "typings": "typings install", - "tslint": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json app/{,**/}**.ts", - "tslint-root": "tslint -c tslint.json *.ts", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json app/{,**/}**.ts", "licensecheck": "license-check" }, "repository": { @@ -95,14 +94,7 @@ }, "license-check-config": { "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js", - "!app/js/xml2json.js" + "./dist/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, From 10be16cb7f4c29c6ac8dd2634947ce7b11336e19 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:09:28 +0100 Subject: [PATCH 10/11] Fix demo app license check rules --- demo-shell-ng2/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 77d1f5ff80..c73bab0da2 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -94,7 +94,7 @@ }, "license-check-config": { "src": [ - "./dist/**/*.js" + "./app/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, From ce3017538699c9b99cccace393c50d05d92c6180 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 15 Jul 2016 12:39:46 +0100 Subject: [PATCH 11/11] Fix 'search' tests --- .../src/components/alfresco-search.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts index 7699fab4cf..1ec34f048e 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts @@ -67,7 +67,7 @@ describe('AlfrescoSearchComponent', () => { let search = new AlfrescoSearchComponent(null, translation, null, null); expect(search).toBeDefined(); - expect(translation.addTranslationFolder).toHaveBeenCalledWith('node_modules/ng2-alfresco-search'); + expect(translation.addTranslationFolder).toHaveBeenCalledWith('node_modules/ng2-alfresco-search/dist/src'); }); describe('Rendering search results', () => {