Skip to content

Commit 9e7a5e4

Browse files
committed
Configure Angular Bootstrap UI KIT #14
1 parent 55fc1e4 commit 9e7a5e4

File tree

6 files changed

+96
-7
lines changed

6 files changed

+96
-7
lines changed

project/application/angular.json

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@
2323
"polyfills": "src/polyfills.ts",
2424
"tsConfig": "src/tsconfig.app.json",
2525
"assets": ["src/favicon.ico", "src/assets"],
26-
"styles": ["src/styles.scss"],
27-
"scripts": []
26+
"styles": [
27+
"node_modules/font-awesome/scss/font-awesome.scss",
28+
"node_modules/angular-bootstrap-md/scss/bootstrap/bootstrap.scss",
29+
"node_modules/angular-bootstrap-md/scss/mdb-free.scss",
30+
"src/styles.scss"
31+
],
32+
"scripts": [
33+
"node_modules/chart.js/dist/Chart.min.js",
34+
"node_modules/hammerjs/hammer.min.js"
35+
]
2836
},
2937
"configurations": {
3038
"production": {
@@ -70,8 +78,16 @@
7078
"polyfills": "src/polyfills.ts",
7179
"tsConfig": "src/tsconfig.spec.json",
7280
"karmaConfig": "src/karma.conf.js",
73-
"styles": ["src/styles.scss"],
74-
"scripts": [],
81+
"styles": [
82+
"node_modules/font-awesome/scss/font-awesome.scss",
83+
"node_modules/angular-bootstrap-md/scss/bootstrap/bootstrap.scss",
84+
"node_modules/angular-bootstrap-md/scss/mdb-free.scss",
85+
"src/styles.scss"
86+
],
87+
"scripts": [
88+
"node_modules/chart.js/dist/Chart.min.js",
89+
"node_modules/hammerjs/hammer.min.js"
90+
],
7591
"assets": ["src/favicon.ico", "src/assets"]
7692
}
7793
},

project/application/package-lock.json

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project/application/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,18 @@
2828
"@angular/router": "^6.1.0",
2929
"@nguniversal/express-engine": "6.0.0",
3030
"@nguniversal/module-map-ngfactory-loader": "6.0.0",
31+
"angular-bootstrap-md": "^6.2.2",
32+
"chart.js": "^2.5.0",
3133
"classlist.js": "^1.1.20150312",
3234
"core-js": "^2.5.4",
3335
"domino": "^2.1.0",
3436
"es5-shim": "^4.5.10",
3537
"es6-shim": "^0.35.3",
38+
"font-awesome": "^4.7.0",
39+
"hammerjs": "^2.0.8",
3640
"rxjs": "^6.0.0",
3741
"ts-loader": "^4.4.2",
42+
"webpack-node-externals": "^1.7.2",
3843
"zone.js": "~0.8.26"
3944
},
4045
"devDependencies": {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
<h1>{{ title }}</h1>
2+
3+
<button mdbBtn type="button" color="primary" class="waves-light" mdbWavesEffect>Primary</button>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { NgModule } from '@angular/core';
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { MDBBootstrapModule } from 'angular-bootstrap-md';
23

34
import { HomeRoutingModule } from './home-routing.module';
45
import { HomeComponent } from './home.component';
56

67
@NgModule({
7-
imports: [HomeRoutingModule],
8+
imports: [HomeRoutingModule, MDBBootstrapModule.forRoot()],
89
declarations: [HomeComponent],
10+
schemas: [NO_ERRORS_SCHEMA],
911
})
1012
export class HomeModule {}

project/application/webpack.server.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
const path = require('path');
22
const webpack = require('webpack');
3+
const nodeExternals = require('webpack-node-externals');
34

45
module.exports = {
56
entry: { server: './server.ts' },
67
resolve: { extensions: ['.js', '.ts'] },
78
target: 'node',
89
mode: 'none',
910
// this makes sure we include node_modules and other 3rd party libraries
10-
externals: [/node_modules/],
11+
externals: [
12+
/node_modules/,
13+
nodeExternals({
14+
whitelist: [/^hammerjs/],
15+
}),
16+
],
1117
output: {
1218
path: path.join(__dirname, 'tmp'),
1319
filename: '[name].js',

0 commit comments

Comments
 (0)