Skip to content
This repository was archived by the owner on Apr 26, 2022. It is now read-only.

feat(web): add nebular dep #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions angular-metadata.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Workaround for https://github.com/angular/angular/issues/18810
//
// This file is required to run ngc on 3rd party libraries such as @ngrx,
// to write files like node_modules/@ngrx/store/store.ngsummary.json.
{
"compilerOptions": {
"lib": [
Expand All @@ -17,9 +13,11 @@
"enableSummariesForJit": true
},
"include": [
"node_modules/@angular/**/*"
"node_modules/@angular/**/*",
"node_modules/@nebular/**/*"
],
"exclude": [
"node_modules/@angular/**/schematics/**",
"node_modules/@angular/common/upgrade*",
"node_modules/@angular/router/upgrade*",
"node_modules/@angular/bazel/**",
Expand Down
9 changes: 9 additions & 0 deletions apps/lazy-loading-app/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ filegroup(
# We always strip these paths off the front of any assets we serve
_ROOT_DIRS = [
"npm/node_modules/zone.js/dist",
"npm/node_modules/intersection-observer",
]

# Files that we serve in both development and production
Expand Down Expand Up @@ -85,6 +86,7 @@ ts_devserver(
# loader to load them.
data = [
"favicon.ico",
"@npm//:node_modules/intersection-observer/intersection-observer.js",
],
entry_module = "nx_bazel_example/apps/lazy-loading-app/src/main.dev",
# <script> and <link> tags will be automatically injected into this index file
Expand All @@ -94,6 +96,7 @@ ts_devserver(
# They should have only named UMD modules, or require.js will throw.
scripts = [
"@npm//:node_modules/tslib/tslib.js",
"@npm//:node_modules/eva-icons/eva.min.js",
":rxjs_umd_modules",
],
serving_path = "/bundle.min.js",
Expand All @@ -110,16 +113,22 @@ ts_devserver(
rollup_bundle(
name = "bundle",
entry_point = ":main.prod.ts",
globals = {
"eva-icons": "eva",
},
deps = [
":src",
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@angular/platform-browser",
"@npm//@angular/router",
"@npm//@nebular/theme",
"@npm//rxjs",
],
)

# TODO: need to substitute environment.ts with environment.prod.ts before building prodapp
# TODO: fix eva-icons error
web_package(
name = "prodapp",
additional_root_paths = _ROOT_DIRS + [
Expand Down
2 changes: 2 additions & 0 deletions apps/lazy-loading-app/src/app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ng_module(
"@npm//@angular/forms",
"@npm//@angular/platform-browser",
"@npm//@angular/router",
"@npm//@nebular/theme",
"@npm//@nebular/eva-icons",
"@npm//rxjs",
"@npm//tslib",
],
Expand Down
9 changes: 6 additions & 3 deletions apps/lazy-loading-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NbEvaIconsModule } from '@nebular/eva-icons';

import { NbLayoutModule, NbSidebarModule } from '@nebular/theme';

import { AlertModule } from './alert/alert.module';
import { AppRoutingModule } from './app-routing.module';
Expand All @@ -15,9 +18,9 @@ import { JwtInterceptor } from './helpers/jwt.interceptor';
imports: [
AlertModule,
AuthModule,
// HomeModule,
// LoginModule,
// RegisterModule,
NbSidebarModule.forRoot(),
NbEvaIconsModule,
NbLayoutModule,
ReactiveFormsModule,
BrowserModule,
HttpClientModule,
Expand Down
16 changes: 16 additions & 0 deletions apps/lazy-loading-app/src/rxjs_shims.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,19 @@
});
Object.defineProperty(exports, '__esModule', {value: true});
});

// eva-icons
(function(factory) {
if (typeof module === 'object' && typeof module.exports === 'object') {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
} else if (typeof define === 'function' && define.amd) {
define('eva-icons', ['exports', 'eva'], factory);
}
})(function(exports, eva) {
'use strict';
Object.keys(eva).forEach(function(key) {
exports[key] = eva[key];
});
Object.defineProperty(exports, '__esModule', {value: true});
});
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@
"private": true,
"dependencies": {
"@angular/animations": "^8.2.0",
"@angular/cdk": "^8.1.3",
"@angular/common": "^8.2.0",
"@angular/compiler": "^8.2.0",
"@angular/core": "^8.2.0",
"@angular/forms": "^8.2.0",
"@angular/platform-browser": "^8.2.0",
"@angular/platform-browser-dynamic": "^8.2.0",
"@angular/router": "^8.2.0",
"@nebular/eva-icons": "npm:@scalio-oss/nebular-eva-icons@^4.1.3",
"@nebular/theme": "npm:@scalio-oss/nebular-theme@^4.1.3",
"@nestjs/common": "6.5.2",
"@nestjs/core": "6.5.2",
"@nestjs/jwt": "^6.1.1",
Expand All @@ -53,6 +56,7 @@
"core-js": "2.6.9",
"cors": "^2.8.5",
"dotenv": "^8.0.0",
"eva-icons": "^1.1.1",
"helmet": "^3.19.0",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
Expand Down
Loading