Skip to content

Commit 22b1bd5

Browse files
committed
feat(package): support of angular v7
1 parent 974617b commit 22b1bd5

File tree

8 files changed

+5133
-5186
lines changed

8 files changed

+5133
-5186
lines changed

demo/angular.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@
116116
"outputPath": "dist/server",
117117
"main": "src/main.server.ts",
118118
"tsConfig": "src/tsconfig.server.json"
119+
},
120+
"configurations": {
121+
"production": {
122+
"fileReplacements": [
123+
{
124+
"replace": "src/environments/environment.ts",
125+
"with": "src/environments/environment.prod.ts"
126+
}
127+
]
128+
}
119129
}
120130
}
121131
}
@@ -144,4 +154,4 @@
144154
}
145155
},
146156
"defaultProject": "google-maps-autocomplete-demo"
147-
}
157+
}

demo/package-lock.json

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

demo/package.json

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,82 +8,92 @@
88
"start": "ng serve",
99
"serve:prod": "ng serve --prod",
1010
"build": "ng build",
11-
"test": "jest",
12-
"lint": "ng lint",
11+
"build:doc": "cd ../ && gulp build:doc",
12+
"build:prod": "ng build --prod ",
13+
"build:client-and-server-bundles": "ng build --prod && ng run ngx-linkifyjs-demo:server:production",
14+
"build:prerender": "npm run build:client-and-server-bundles && npm run webpack:server && npm run generate:prerender",
15+
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
16+
"compile:server": "tsc -p server.tsconfig.json",
1317
"e2e": "ng e2e",
14-
"postinstall": "npm link @angular-material-extensions/google-maps-autocomplete"
18+
"generate:prerender": "cd dist && node prerender",
19+
"lint": "ng lint",
20+
"test": "ng test",
21+
"postinstall": "npm link @angular-material-extensions/google-maps-autocomplete",
22+
"serve:prerender": "cd dist/browser && http-server",
23+
"serve:ssr": "node dist/server",
24+
"webpack:server": "webpack --config webpack.server.config.js --progress --colors"
1525
},
1626
"private": true,
1727
"dependencies": {
1828
"@angular-material-extensions/faq": "^3.0.2",
1929
"@angular-material-extensions/jumbotron": "^1.0.1",
20-
"@angular/animations": "^6.1.9",
21-
"@angular/cdk": "^6.4.7",
22-
"@angular/common": "^6.1.9",
23-
"@angular/compiler": "^6.1.9",
24-
"@angular/core": "^6.1.9",
25-
"@angular/flex-layout": "^6.0.0-beta.18",
26-
"@angular/forms": "^6.1.9",
27-
"@angular/http": "^6.1.9",
28-
"@angular/material": "^6.4.7",
29-
"@angular/platform-browser": "^6.1.9",
30-
"@angular/platform-browser-dynamic": "^6.1.9",
31-
"@angular/platform-server": "^6.1.9",
32-
"@angular/pwa": "^0.8.4",
33-
"@angular/router": "^6.1.9",
34-
"@angular/service-worker": "^6.1.9",
35-
"@ng-bootstrap/ng-bootstrap": "^2.2.2",
30+
"@angular/animations": "^7.0.2",
31+
"@angular/cdk": "^7.0.2",
32+
"@angular/common": "^7.0.2",
33+
"@angular/compiler": "^7.0.2",
34+
"@angular/core": "^7.0.2",
35+
"@angular/flex-layout": "^7.0.0-beta.19",
36+
"@angular/forms": "^7.0.2",
37+
"@angular/http": "^7.0.2",
38+
"@angular/material": "^7.0.2",
39+
"@angular/platform-browser": "^7.0.2",
40+
"@angular/platform-browser-dynamic": "^7.0.2",
41+
"@angular/platform-server": "^7.0.2",
42+
"@angular/pwa": "^0.10.4",
43+
"@angular/router": "^7.0.2",
44+
"@angular/service-worker": "^7.0.2",
45+
"@ng-bootstrap/ng-bootstrap": "^4.0.0",
3646
"@stackblitz/sdk": "^1.2.0",
37-
"angulartics2": "^6.3.1",
47+
"angulartics2": "^7.0.2",
3848
"bootstrap": "^4.1.3",
3949
"core-js": "^2.5.4",
4050
"font-awesome": "^4.7.0",
4151
"include-media": "^1.4.9",
4252
"material-design-icons": "^3.0.1",
43-
"ngx-highlightjs": "^2.1.1",
53+
"ngx-highlightjs": "^2.1.3",
4454
"rxjs": "^6.3.3",
4555
"zone.js": "^0.8.26"
4656
},
4757
"devDependencies": {
48-
"@angular-devkit/build-angular": "^0.7.5",
49-
"@angular-devkit/schematics": "^0.7.5",
50-
"@angular/cli": "^6.2.4",
51-
"@angular/compiler-cli": "^6.1.9",
52-
"@angular/language-service": "^6.1.9",
58+
"@angular-devkit/build-angular": "^0.10.4",
59+
"@angular-devkit/schematics": "^7.0.4",
60+
"@angular/cli": "^7.0.4",
61+
"@angular/compiler-cli": "^7.0.2",
62+
"@angular/language-service": "^7.0.2",
5363
"@angularclass/hmr": "~2.1.3",
5464
"@compodoc/gulp-compodoc": "^0.0.9",
55-
"@nguniversal/common": "^6.1.0",
56-
"@nguniversal/express-engine": "^6.1.0",
57-
"@nguniversal/module-map-ngfactory-loader": "^6.1.0",
58-
"@types/jest": "^23.3.5",
59-
"@types/node": "^10.11.6",
65+
"@nguniversal/common": "^7.0.2",
66+
"@nguniversal/express-engine": "^7.0.2",
67+
"@nguniversal/module-map-ngfactory-loader": "^7.0.2",
68+
"@types/jest": "^23.3.9",
69+
"@types/node": "^10.12.2",
6070
"angular-cli-ghpages": "0.5.2",
61-
"ansi-colors": "^2.0.5",
71+
"ansi-colors": "^3.2.1",
6272
"codelyzer": "^4.5.0",
6373
"commitplease": "3.2.0",
6474
"conventional-github-releaser": "2.0.2",
6575
"del": "3.0.0",
66-
"express": "^4.16.3",
76+
"express": "^4.16.4",
6777
"fancy-log": "1.3.2",
6878
"greenkeeper-lockfile": "1.15.1",
6979
"gulp": "3.9.1",
7080
"gulp-bump": "3.1.1",
71-
"gulp-conventional-changelog": "^2.0.3",
81+
"gulp-conventional-changelog": "^2.0.9",
7282
"gulp-coveralls": "0.1.4",
7383
"gulp-file": "0.4.0",
74-
"gulp-git": "2.7.0",
84+
"gulp-git": "^2.8.0",
7585
"gulp-hub": "0.8.0",
7686
"jest": "^23.6.0",
77-
"jest-preset-angular": "^5.2.3",
78-
"lodash": "4.17.10",
87+
"jest-preset-angular": "^6.0.1",
88+
"lodash": "^4.17.11",
7989
"protractor": "^5.4.1",
8090
"reflect-metadata": "~0.1.12",
8191
"run-sequence": "2.2.1",
8292
"travis-status": "^3.0.1",
83-
"ts-loader": "^4.5.0",
93+
"ts-loader": "^5.3.0",
8494
"ts-node": "^7.0.1",
8595
"tslint": "~5.11.0",
86-
"typescript": "~2.9.2",
96+
"typescript": "~3.1.6",
8797
"webpack-cli": "^3.1.2",
8898
"yargs": "^12.0.2"
8999
},

demo/prerender.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { ROUTES } from './static.paths';
1616
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
1717
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main');
1818

19-
const BROWSER_FOLDER = join(process.cwd(), 'dist', 'browser');
19+
const BROWSER_FOLDER = join(process.cwd(), 'browser');
2020

2121
// Load the index.html file containing referances to your application bundle.
2222
const index = readFileSync(join(BROWSER_FOLDER, 'index.html'), 'utf8');
@@ -25,7 +25,7 @@ let previousRender = Promise.resolve();
2525

2626
// Iterate each route path
2727
ROUTES.forEach(route => {
28-
var fullPath = join(BROWSER_FOLDER, route);
28+
const fullPath = join(BROWSER_FOLDER, route);
2929

3030
// Make sure the directory structure is there
3131
if (!existsSync(fullPath)) {

demo/src/app/app.module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import {FlexLayoutModule} from '@angular/flex-layout';
1515
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
1616
import {MatJumbotronModule} from '@angular-material-extensions/jumbotron';
1717

18-
import { Angulartics2Module } from 'angulartics2';
19-
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
20-
import { ServiceWorkerModule } from '@angular/service-worker';
18+
import {Angulartics2Module} from 'angulartics2';
19+
import {Angulartics2GoogleAnalytics} from 'angulartics2/ga';
20+
import {ServiceWorkerModule} from '@angular/service-worker';
2121

2222
// import {} from '@types/googlemaps';
2323

@@ -37,7 +37,7 @@ const googleMapsParams = {
3737
// The application ID can be any identifier which is unique on
3838
// the page.
3939
BrowserModule.withServerTransition({appId: '@angular-material-extensions/google-maps-autocomplete-demo-id'}),
40-
Angulartics2Module.forRoot([Angulartics2GoogleAnalytics]),
40+
Angulartics2Module.forRoot(),
4141
AgmCoreModule.forRoot(googleMapsParams),
4242
MatGoogleMapsAutocompleteModule.forRoot(),
4343
MatJumbotronModule.forRoot(),
@@ -50,7 +50,7 @@ const googleMapsParams = {
5050
AppRoutingModule,
5151
AppSharedModule,
5252
HomeModule,
53-
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
53+
ServiceWorkerModule.register('ngsw-worker.js', {enabled: environment.production})
5454
],
5555
providers: [],
5656
bootstrap: [AppComponent]

0 commit comments

Comments
 (0)