Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

build (travis): add prod build #254

Merged
merged 8 commits into from May 28, 2018
8 changes: 6 additions & 2 deletions .travis.yml
Expand Up @@ -14,9 +14,13 @@ addons:
chrome: stable

before_script:
- yarn global add @angular/cli
- yarn global add @angular/cli

script: ng test --reporters=spec --browser=ChromeHeadless --single-run=true
script:
- ng test --reporters=spec --browser=ChromeHeadless --single-run=true
# this should really be fixed in the package itself
- cp fix/jdnconvertiblecalendardateadapter/index.d.ts node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once we use the angular compiler to build jdnconvertiblecalendardateadapter, this should not be necessary any more. See dhlab-basel/JDNConvertibleCalendarDateAdapter#5

- ng build --prod --build-optimizer

notifications:
slack:
Expand Down
36 changes: 36 additions & 0 deletions fixes/jdnconvertiblecalendardateadapter/index.d.ts
@@ -0,0 +1,36 @@
/*
* Copyright © 2016 Lukas Rosenthaler, André Kilchenmann, Andreas Aeschlimann,
* Sofia Georgakopoulou, Ivan Subotic, Benjamin Geer, Tobias Schweizer.
* This file is part of SALSAH.
* SALSAH is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* SALSAH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* You should have received a copy of the GNU Affero General Public
* License along with SALSAH. If not, see <http://www.gnu.org/licenses/>.
*/

import {NgModule} from '@angular/core';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_PROVIDER} from '@angular/material';
import {MAT_JDN_DATE_FORMATS} from 'jdnconvertiblecalendardateadapter/dist/JDNConvertibleCalendar-date-formats';
import {JDNConvertibleCalendarDateAdapter} from 'jdnconvertiblecalendardateadapter';

@NgModule({
providers: [
MAT_DATE_LOCALE_PROVIDER,
{provide: DateAdapter, useClass: JDNConvertibleCalendarDateAdapter, deps: [MAT_DATE_LOCALE]}
]
})
export declare class JDNConvertibleCalendarDateAdapterModule {
}

@NgModule({
imports: [JDNConvertibleCalendarDateAdapterModule],
providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_JDN_DATE_FORMATS}],
})
export declare class MatJDNConvertibleCalendarDateAdapterModule {
}
export { JDNConvertibleCalendarDateAdapter } from './JDNConvertibleCalendarDateAdapter';