Fix ionic build prod

This commit is contained in:
Gustavo Maximiliano Cortez 2018-02-02 11:09:04 -03:00
parent 87aaf5e0c4
commit f11e761301
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
1 changed files with 252 additions and 186 deletions

View File

@ -201,13 +201,130 @@ export function createTranslateLoader(http: HttpClient) {
return new TranslatePoHttpLoader(http, 'assets/i18n', '.po'); return new TranslatePoHttpLoader(http, 'assets/i18n', '.po');
} }
let directives: any = [ @NgModule({
declarations: [
/* Pages */
ActivityPage,
AddPage,
AmazonCardDetailsPage,
AmazonPage,
AmountPage,
AddressbookPage,
AddressbookAddPage,
AddressbookViewPage,
AboutPage,
AdvancedPage,
AllAddressesPage,
AltCurrencyPage,
BackupRequestPage,
BitcoinCashPage,
BuyAmazonPage,
BuyCoinbasePage,
BuyGlideraPage,
BuyMercadoLibrePage,
ChooseFeeLevelPage,
CreateWalletPage,
CoinbasePage,
CoinbaseTxDetailsPage,
CopayersPage,
FeedbackCardPage,
FeedbackPage,
FeedbackCompletePage,
IncomingDataMenuPage,
ImportWalletPage,
JoinWalletPage,
BackupWarningPage,
BackupGamePage,
ConfirmPage,
CustomAmountPage,
CopayApp,
DisclaimerPage,
CollectEmailPage,
FeeWarningPage,
GlideraPage,
GravatarPage,
FingerprintModalPage,
HomePage,
LanguagePage,
LockPage,
MercadoLibrePage,
OnboardingPage,
PaperWalletPage,
PayProPage,
GlideraTxDetailsPage,
PinModalPage,
ProposalsPage,
ReceivePage,
ScanPage,
SendPage,
SettingsPage,
SellCoinbasePage,
SellGlideraPage,
GlideraSettingsPage,
CoinbaseSettingsPage,
ShapeshiftConfirmPage,
ShapeshiftDetailsPage,
ShapeshiftPage,
ShapeshiftShiftPage,
TermsOfUsePage,
MercadoLibreCardDetailsPage,
NotificationsPage,
FeePolicyPage,
SessionLogPage,
SendFeedbackPage,
SuccessModalPage,
TourPage,
TabsPage,
TxpDetailsPage,
TxDetailsPage,
TxpPage,
WalletSettingsPage,
WalletSettingsAdvancedPage,
WalletNamePage,
WalletColorPage,
WalletInformationPage,
WalletAddressesPage,
WalletExportPage,
WalletServiceUrlPage,
WalletTransactionHistoryPage,
WalletDeletePage,
WalletExtendedPrivateKeyPage,
WalletDetailsPage,
WalletItemPage,
WalletActivityPage,
WalletSelectorPage,
/* Directives */
CopyToClipboard, CopyToClipboard,
LongPress, LongPress,
NoLowFee NoLowFee,
]; /* Pipes */
SatToUnitPipe,
let pages: any = [ SatToFiatPipe,
FiatToUnitPipe,
KeysPipe,
OrderByPipe
],
imports: [
IonicModule.forRoot(CopayApp, {
tabsHideOnSubPages: true,
tabsPlacement: 'bottom'
}),
BrowserModule,
HttpClientModule,
NgLoggerModule.forRoot(Level.LOG),
MomentModule,
NgxQRCodeModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient]
}
}),
],
bootstrap: [IonicApp],
entryComponents: [
/* Pages */
ActivityPage, ActivityPage,
AddPage, AddPage,
AmazonCardDetailsPage, AmazonCardDetailsPage,
@ -297,9 +414,8 @@ let pages: any = [
WalletItemPage, WalletItemPage,
WalletActivityPage, WalletActivityPage,
WalletSelectorPage WalletSelectorPage
]; ],
providers: [
let providers: any = [
AddressProvider, AddressProvider,
AddressBookProvider, AddressBookProvider,
AndroidFingerprintAuth, AndroidFingerprintAuth,
@ -356,56 +472,6 @@ let providers: any = [
provide: ErrorHandler, provide: ErrorHandler,
useClass: IonicErrorHandler useClass: IonicErrorHandler
} }
]; ]
let pipes = [
SatToUnitPipe,
SatToFiatPipe,
FiatToUnitPipe,
KeysPipe,
OrderByPipe
];
export function declarationsComponents() {
let declarations = [];
declarations = declarations.concat(pages);
declarations = declarations.concat(directives);
declarations = declarations.concat(pipes);
return declarations;
}
export function entryComponents() {
return pages;
}
export function providersComponents() {
return providers;
}
@NgModule({
declarations: declarationsComponents(),
imports: [
IonicModule.forRoot(CopayApp, {
tabsHideOnSubPages: true,
tabsPlacement: 'bottom'
}),
BrowserModule,
HttpClientModule,
NgLoggerModule.forRoot(Level.LOG),
MomentModule,
NgxQRCodeModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader,
deps: [HttpClient]
}
}),
],
bootstrap: [IonicApp],
entryComponents: entryComponents(),
providers: providersComponents()
}) })
export class AppModule { } export class AppModule { }