Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NgModule annotations in build files #5

Closed
tobiasschweizer opened this issue Mar 14, 2018 · 3 comments · Fixed by #7
Closed

NgModule annotations in build files #5

tobiasschweizer opened this issue Mar 14, 2018 · 3 comments · Fixed by #7
Assignees
Labels

Comments

@tobiasschweizer
Copy link
Contributor

tobiasschweizer commented Mar 14, 2018

/Users/tobi/gitreps/salsah_github/node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts

NgModules decorators are removed in build:

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';
@tobiasschweizer
Copy link
Contributor Author

@tobiasschweizer
Copy link
Contributor Author

compilation should happen via the Angular compiler (ngc) (https://medium.com/@cyrilletuzi/how-to-build-and-publish-an-angular-module-7ad19c0b4464#96da):

npm install @angular/compiler @angular/compiler-cli typescript rollup uglify-js --save-dev

@tobiasschweizer
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant