diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index a3919e06bd..c73bab0da2 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" + "./app/**/*.js" ], "path": "assets/license_header.txt", "blocking": true, 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, 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, diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index e02ea7c33f..cfdbd6ecf8 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/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", 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 diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 98d95e3051..f78c15c3f6 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: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", + "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", @@ -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 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.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', () => { 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 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-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,