Improve 'search' package config

This commit is contained in:
Denys Vuika 2016-07-15 11:50:53 +01:00
parent d64c2755eb
commit e76b9bcc76
7 changed files with 13 additions and 26 deletions

View File

@ -7,8 +7,8 @@
"postinstall": "typings install", "postinstall": "typings install",
"clean": "rimraf dist node_modules typings", "clean": "rimraf dist node_modules typings",
"typings": "typings install", "typings": "typings install",
"build": "npm run tslint && typings install && rimraf dist && tsc && npm run copy-dist && license-check", "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check",
"build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "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\"", "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", "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": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src",

View File

@ -4,22 +4,15 @@
"version": "0.2.0", "version": "0.2.0",
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"postinstall": "typings install",
"clean": "rimraf dist node_modules typings", "clean": "rimraf dist node_modules typings",
"typings": "typings install", "typings": "typings install",
"build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check",
"build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "build:w": "npm run tslint && rimraf dist && npm run watch-task",
"watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copy-dist:w\" \"license-check\"",
"tslint": "npm run tslint-src && npm run tslint-root", "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts",
"tslint-src": "tslint -c tslint.json src/{,**/}**.ts", "copy-dist": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src",
"tslint-root": "tslint -c tslint.json *.ts", "copy-dist:w": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src -w",
"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",
"tsc": "tsc", "tsc": "tsc",
"tsc:w": "tsc -w", "tsc:w": "tsc -w",
"pretest": "npm run build", "pretest": "npm run build",
@ -108,13 +101,7 @@
}, },
"license-check-config": { "license-check-config": {
"src": [ "src": [
"**/*.js", "./dist/**/*.js"
"**/*.ts",
"!/**/coverage/**/*",
"!/**/demo/**/*",
"!/**/node_modules/**/*",
"!/**/typings/**/*",
"!*.js"
], ],
"path": "assets/license_header.txt", "path": "assets/license_header.txt",
"blocking": true, "blocking": true,

View File

@ -57,7 +57,7 @@ export class AlfrescoSearchAutocompleteComponent implements OnChanges {
private translate: AlfrescoTranslationService, private translate: AlfrescoTranslationService,
private alfrescoThumbnailService: AlfrescoThumbnailService) { private alfrescoThumbnailService: AlfrescoThumbnailService) {
if (translate) { if (translate) {
translate.addTranslationFolder('node_modules/ng2-alfresco-search'); translate.addTranslationFolder('node_modules/ng2-alfresco-search/dist/src');
} }
this.results = null; this.results = null;
} }

View File

@ -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 { ngAfterViewInit(): void {

View File

@ -70,7 +70,7 @@ export class AlfrescoSearchComponent implements OnChanges, OnInit {
@Optional() params: RouteParams) { @Optional() params: RouteParams) {
if (translate !== null) { if (translate !== null) {
translate.addTranslationFolder('node_modules/ng2-alfresco-search'); translate.addTranslationFolder('node_modules/ng2-alfresco-search/dist/src');
} }
this.results = null; this.results = null;