From 2f7f2914605236a0d769a657ac9b62c703cba3f8 Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 13 Oct 2017 16:34:30 -0600 Subject: [PATCH 01/22] adding app.json --- Asp2017.csproj | 2 +- Asp2017.sln | 17 +++++++++++++++++ app.json | 20 ++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Asp2017.sln create mode 100644 app.json diff --git a/Asp2017.csproj b/Asp2017.csproj index d944c48d..97743c1c 100644 --- a/Asp2017.csproj +++ b/Asp2017.csproj @@ -46,7 +46,7 @@ - + %(DistFiles.Identity) PreserveNewest diff --git a/Asp2017.sln b/Asp2017.sln new file mode 100644 index 00000000..fa3ea9d3 --- /dev/null +++ b/Asp2017.sln @@ -0,0 +1,17 @@ + +Microsoft Visual Studio Solution File, Format Version 15.00 +# Visual Studio 2017 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asp2017", "Asp2017.csproj", "{333FA3D5-7E63-4583-B18D-26AD973BEAA9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/app.json b/app.json new file mode 100644 index 00000000..4c5275ff --- /dev/null +++ b/app.json @@ -0,0 +1,20 @@ +{ + "name": "aspnetcore-angular2-universal", + "description": "Deploy Angular 2+ Universal & ASP.NET Core SPA Advanced Starter on Heroku", + "logo": "https://raw.githubusercontent.com/herokumx/herokumxnet/master/NETChatterGroup.png", + "keywords": [ "heroku", "asp.net-core", "angular2", "spa" ], + "env": { + "NPM_CONFIG_PRODUCTION": { + "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", + "value": "true" + } + }, + "buildpacks": [ + { + "url": "heroku/nodejs" + }, + { + "url": "https://github.com/ORuban/dotnet-core-buildpack.git" + } + ] +} \ No newline at end of file From 08a503d0813a2ed0a3611106d2ae44c9f21a3bea Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Sat, 14 Oct 2017 19:33:25 -0600 Subject: [PATCH 02/22] Now able to build on windows --- .gitattributes | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ Asp2017.sln | 24 ++++++++++++------- 2 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/Asp2017.sln b/Asp2017.sln index fa3ea9d3..1a8d0744 100644 --- a/Asp2017.sln +++ b/Asp2017.sln @@ -1,7 +1,9 @@ - -Microsoft Visual Studio Solution File, Format Version 15.00 -# Visual Studio 2017 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Asp2017", "Asp2017.csproj", "{333FA3D5-7E63-4583-B18D-26AD973BEAA9}" + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2002 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Asp2017", "Asp2017.csproj", "{6D840EA5-1645-48F5-8484-49EA0B3CEA08}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,9 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {333FA3D5-7E63-4583-B18D-26AD973BEAA9}.Release|Any CPU.Build.0 = Release|Any CPU + {6D840EA5-1645-48F5-8484-49EA0B3CEA08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D840EA5-1645-48F5-8484-49EA0B3CEA08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D840EA5-1645-48F5-8484-49EA0B3CEA08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D840EA5-1645-48F5-8484-49EA0B3CEA08}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DE657E62-6B86-42DB-AF34-1799BE789EFF} EndGlobalSection EndGlobal From b1fb8bc18415e22a53058a801dc92e3fe493d10c Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 20 Oct 2017 20:50:37 -0600 Subject: [PATCH 03/22] Adding Material --- Asp2017.csproj | 2 +- .../Tcheckbox-configurable-example.html | 38 +++++++ .../checkbox-configurable-example.css | 14 +++ .../checkbox-configurable-example.ts | 16 +++ package.json | 3 +- webpack.config.vendor.js | 101 +----------------- 6 files changed, 73 insertions(+), 101 deletions(-) create mode 100644 ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html create mode 100644 ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css create mode 100644 ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts diff --git a/Asp2017.csproj b/Asp2017.csproj index 97743c1c..d944c48d 100644 --- a/Asp2017.csproj +++ b/Asp2017.csproj @@ -46,7 +46,7 @@ - + %(DistFiles.Identity) PreserveNewest diff --git a/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html b/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html new file mode 100644 index 00000000..9858146d --- /dev/null +++ b/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html @@ -0,0 +1,38 @@ + + +

Checkbox configuration

+ +
+ Checked + Indeterminate +
+ +
+ + + Start + End + +
+ +
+ Disabled +
+
+
+ + + +

Result

+ +
+ + I'm a checkbox + +
+
+
diff --git a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css new file mode 100644 index 00000000..558293fb --- /dev/null +++ b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css @@ -0,0 +1,14 @@ +.example-h2 { + margin: 10px; +} + +.example-section { + display: flex; + align-content: center; + align-items: center; + height: 60px; +} + +.example-margin { + margin: 0 10px; +} diff --git a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts new file mode 100644 index 00000000..f4bdf570 --- /dev/null +++ b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts @@ -0,0 +1,16 @@ +import {Component} from '@angular/core'; + +/** + * @title Configurable checkbox + */ +@Component({ + selector: 'checkbox-configurable-example', + templateUrl: 'checkbox-configurable-example.html', + styleUrls: ['checkbox-configurable-example.css'], +}) +export class CheckboxConfigurableExample { + checked = false; + indeterminate = false; + align = 'start'; + disabled = false; +} diff --git a/package.json b/package.json index 9ebbf620..7c21a961 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "webpack": "^3.6.0", "webpack-hot-middleware": "^2.19.1", "webpack-merge": "^4.1.0", - "zone.js": "^0.8.17" + "zone.js": "^0.8.17", + "@angular/material": "" }, "devDependencies": { "@angular/cli": "^1.3.2", diff --git a/webpack.config.vendor.js b/webpack.config.vendor.js index 3e07b78b..5a2cb3f0 100644 --- a/webpack.config.vendor.js +++ b/webpack.config.vendor.js @@ -1,99 +1,2 @@ -const path = require('path'); -const webpack = require('webpack'); -const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const merge = require('webpack-merge'); -const treeShakableModules = [ - '@angular/animations', - '@angular/common', - '@angular/compiler', - '@angular/core', - '@angular/forms', - '@angular/http', - '@angular/platform-browser', - '@angular/platform-browser-dynamic', - '@angular/router', - 'ngx-bootstrap', - 'zone.js', -]; -const nonTreeShakableModules = [ - // 'bootstrap', - // 'bootstrap/dist/css/bootstrap.css', - 'core-js', - // 'es6-promise', - // 'es6-shim', - 'event-source-polyfill', - // 'jquery', -]; -const allModules = treeShakableModules.concat(nonTreeShakableModules); - -module.exports = (env) => { - console.log(`env = ${JSON.stringify(env)}`) - const extractCSS = new ExtractTextPlugin('vendor.css'); - const isDevBuild = !(env && env.prod); - const sharedConfig = { - stats: { modules: false }, - resolve: { extensions: [ '.js' ] }, - module: { - rules: [ - { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } - ] - }, - output: { - publicPath: 'dist/', - filename: '[name].js', - library: '[name]_[hash]' - }, - plugins: [ - // new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) - new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 - new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 - new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 - ] - }; - - const clientBundleConfig = merge(sharedConfig, { - entry: { - // To keep development builds fast, include all vendor dependencies in the vendor bundle. - // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. - vendor: isDevBuild ? allModules : nonTreeShakableModules - }, - output: { path: path.join(__dirname, 'wwwroot', 'dist') }, - module: { - rules: [ - { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } - ] - }, - plugins: [ - extractCSS, - new webpack.DllPlugin({ - path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin() - ]) - }); - - const serverBundleConfig = merge(sharedConfig, { - target: 'node', - resolve: { mainFields: ['main'] }, - entry: { vendor: allModules.concat(['aspnet-prerendering']) }, - output: { - path: path.join(__dirname, 'ClientApp', 'dist'), - libraryTarget: 'commonjs2', - }, - module: { - rules: [ { test: /\.css(\?|$)/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] } ] - }, - plugins: [ - new webpack.DllPlugin({ - path: path.join(__dirname, 'ClientApp', 'dist', '[name]-manifest.json'), - name: '[name]_[hash]' - }) - ].concat(isDevBuild ? [] : [ - new webpack.optimize.UglifyJsPlugin() - ]) - }); - - return [clientBundleConfig, serverBundleConfig]; -} +const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const merge = require('webpack-merge'); const treeShakableModules = [ '@angular/animations', '@angular/common', '@angular/compiler', '@angular/core', '@angular/forms', '@angular/http', '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', + '@angular/material', 'ngx-bootstrap', 'zone.js', ]; const nonTreeShakableModules = [ // 'bootstrap', // 'bootstrap/dist/css/bootstrap.css', 'core-js', // 'es6-promise', // 'es6-shim', 'event-source-polyfill', // 'jquery', ]; const allModules = treeShakableModules.concat(nonTreeShakableModules); module.exports = (env) => { console.log(`env = ${JSON.stringify(env)}`) const extractCSS = new ExtractTextPlugin('vendor.css'); const isDevBuild = !(env && env.prod); const sharedConfig = { stats: { modules: false }, resolve: { extensions: [ '.js' ] }, module: { rules: [ { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } ] }, output: { publicPath: 'dist/', filename: '[name].js', library: '[name]_[hash]' }, plugins: [ // new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 ] }; const clientBundleConfig = merge(sharedConfig, { entry: { // To keep development builds fast, include all vendor dependencies in the vendor bundle. // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. vendor: isDevBuild ? allModules : nonTreeShakableModules }, output: { path: path.join(__dirname, 'wwwroot', 'dist') }, module: { rules: [ { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } ] }, plugins: [ extractCSS, new webpack.DllPlugin({ path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), name: '[name]_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); const serverBundleConfig = merge(sharedConfig, { target: 'node', resolve: { mainFields: ['main'] }, entry: { vendor: allModules.concat(['aspnet-prerendering']) }, output: { path: path.join(__dirname, 'ClientApp', 'dist'), libraryTarget: 'commonjs2', }, module: { rules: [ { test: /\.css(\?|$)/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] } ] }, plugins: [ new webpack.DllPlugin({ path: path.join(__dirname, 'ClientApp', 'dist', '[name]-manifest.json'), name: '[name]_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); return [clientBundleConfig, serverBundleConfig]; } \ No newline at end of file From bf16de1466908e9e1d989660f03f7789133e8e39 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Sat, 21 Oct 2017 19:42:39 -0600 Subject: [PATCH 04/22] Added a material component and now this is working. --- ClientApp/app/app.component.html | 1 + ClientApp/app/app.component.scss | 3 +- ClientApp/app/app.module.browser.ts | 2 +- ClientApp/app/app.module.ts | 8 +- .../Tcheckbox-configurable-example.html | 38 ------- .../checkbox-configurable-example.css | 14 --- .../checkbox-configurable-example.ts | 16 --- .../my-new-component.component.html | 6 + .../my-new-component.component.scss | 12 ++ .../my-new-component.component.ts | 25 +++++ .../app/containers/home/home.component.html | 2 +- Views/Home/Index.cshtml | 2 +- package.json | 41 +++---- webpack.config.vendor.js | 103 +++++++++++++++++- 14 files changed, 178 insertions(+), 95 deletions(-) delete mode 100644 ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html delete mode 100644 ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css delete mode 100644 ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts create mode 100644 ClientApp/app/components/my-new-component/my-new-component.component.html create mode 100644 ClientApp/app/components/my-new-component/my-new-component.component.scss create mode 100644 ClientApp/app/components/my-new-component/my-new-component.component.ts diff --git a/ClientApp/app/app.component.html b/ClientApp/app/app.component.html index a3e3bf9b..d51c5d08 100644 --- a/ClientApp/app/app.component.html +++ b/ClientApp/app/app.component.html @@ -3,4 +3,5 @@
+
diff --git a/ClientApp/app/app.component.scss b/ClientApp/app/app.component.scss index 481063dc..78209cff 100644 --- a/ClientApp/app/app.component.scss +++ b/ClientApp/app/app.component.scss @@ -1,10 +1,11 @@ -$navbar-default-bg: #312312; +$navbar-default-bg: #312312; $light-orange: #ff8c00; $navbar-default-color: $light-orange; /* Import Bootstrap & Fonts */ $icon-font-path: '~bootstrap-sass/assets/fonts/bootstrap/'; @import "http://github.com/~bootstrap-sass/assets/stylesheets/bootstrap"; +@import "http://github.com/~@angular/material/prebuilt-themes/indigo-pink.css"; diff --git a/ClientApp/app/app.module.browser.ts b/ClientApp/app/app.module.browser.ts index ac318d44..4d19bad4 100644 --- a/ClientApp/app/app.module.browser.ts +++ b/ClientApp/app/app.module.browser.ts @@ -1,4 +1,4 @@ -import { NgModule } from '@angular/core'; +import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { APP_BASE_HREF } from '@angular/common'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; diff --git a/ClientApp/app/app.module.ts b/ClientApp/app/app.module.ts index 1c492f1d..c26e8705 100644 --- a/ClientApp/app/app.module.ts +++ b/ClientApp/app/app.module.ts @@ -25,6 +25,10 @@ import { UserService } from './shared/user.service'; // import { ConnectionResolver } from './shared/route.resolver'; import { ORIGIN_URL } from './shared/constants/baseurl.constants'; import { TransferHttpModule } from '../modules/transfer-http/transfer-http.module'; +import { MyNewComponentComponent } from './components/my-new-component/my-new-component.component'; + +// New Imports +import { MatRadioModule } from '@angular/material'; export function createTranslateLoader(http: Http, baseHref) { // Temporary Azure hack @@ -45,12 +49,14 @@ export function createTranslateLoader(http: Http, baseHref) { HomeComponent, // ChatComponent, NotFoundComponent, - NgxBootstrapComponent + NgxBootstrapComponent, + MyNewComponentComponent ], imports: [ CommonModule, HttpModule, FormsModule, + MatRadioModule, Ng2BootstrapModule.forRoot(), // You could also split this up if you don't want the Entire Module imported TransferHttpModule, // Our Http TransferData method diff --git a/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html b/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html deleted file mode 100644 index 9858146d..00000000 --- a/ClientApp/app/components/checkbox-configurable-example/Tcheckbox-configurable-example.html +++ /dev/null @@ -1,38 +0,0 @@ - - -

Checkbox configuration

- -
- Checked - Indeterminate -
- -
- - - Start - End - -
- -
- Disabled -
-
-
- - - -

Result

- -
- - I'm a checkbox - -
-
-
diff --git a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css deleted file mode 100644 index 558293fb..00000000 --- a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.css +++ /dev/null @@ -1,14 +0,0 @@ -.example-h2 { - margin: 10px; -} - -.example-section { - display: flex; - align-content: center; - align-items: center; - height: 60px; -} - -.example-margin { - margin: 0 10px; -} diff --git a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts b/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts deleted file mode 100644 index f4bdf570..00000000 --- a/ClientApp/app/components/checkbox-configurable-example/checkbox-configurable-example.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component} from '@angular/core'; - -/** - * @title Configurable checkbox - */ -@Component({ - selector: 'checkbox-configurable-example', - templateUrl: 'checkbox-configurable-example.html', - styleUrls: ['checkbox-configurable-example.css'], -}) -export class CheckboxConfigurableExample { - checked = false; - indeterminate = false; - align = 'start'; - disabled = false; -} diff --git a/ClientApp/app/components/my-new-component/my-new-component.component.html b/ClientApp/app/components/my-new-component/my-new-component.component.html new file mode 100644 index 00000000..4dd92317 --- /dev/null +++ b/ClientApp/app/components/my-new-component/my-new-component.component.html @@ -0,0 +1,6 @@ + + + {{season}} + + +
Your favorite season is: {{favoriteSeason}}
diff --git a/ClientApp/app/components/my-new-component/my-new-component.component.scss b/ClientApp/app/components/my-new-component/my-new-component.component.scss new file mode 100644 index 00000000..f70c1b3b --- /dev/null +++ b/ClientApp/app/components/my-new-component/my-new-component.component.scss @@ -0,0 +1,12 @@ +.example-radio-group { + display: inline-flex; + flex-direction: column; +} + +.example-radio-button { + margin: 5px; +} + +.example-selected-value { + margin: 15px 0; +} diff --git a/ClientApp/app/components/my-new-component/my-new-component.component.ts b/ClientApp/app/components/my-new-component/my-new-component.component.ts new file mode 100644 index 00000000..5add9fc1 --- /dev/null +++ b/ClientApp/app/components/my-new-component/my-new-component.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; + +/** + * @title Radios with ngModel + */ +@Component({ + selector: 'app-my-new-component', + templateUrl: './my-new-component.component.html', + styleUrls: ['./my-new-component.component.scss'], +}) + +export class MyNewComponentComponent implements OnInit { + favoriteSeason: string; + + seasons = [ + 'Winter', + 'Spring', + 'Summer', + 'Autumn', + ]; + constructor() { } + + ngOnInit() { + } +} diff --git a/ClientApp/app/containers/home/home.component.html b/ClientApp/app/containers/home/home.component.html index 06d801e7..4f6c4394 100644 --- a/ClientApp/app/containers/home/home.component.html +++ b/ClientApp/app/containers/home/home.component.html @@ -1,4 +1,4 @@ -

{{ title }}

+

{{ title }}

Enjoy the latest features from .NET Core & Angular 4.0! diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index b0796562..7dbdbd4d 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -1,4 +1,4 @@ -@Html.Raw(ViewData["SpaHtml"]) +@Html.Raw(ViewData["SpaHtml"]) @section scripts { diff --git a/package.json b/package.json index 7c21a961..4c14a059 100644 --- a/package.json +++ b/package.json @@ -15,21 +15,23 @@ "clean": "rimraf wwwroot/dist clientapp/dist" }, "dependencies": { - "@angular/animations": "^4.3.0", - "@angular/common": "^4.3.0", - "@angular/compiler": "^4.3.0", - "@angular/compiler-cli": "^4.3.0", - "@angular/core": "^4.3.0", - "@angular/forms": "^4.3.0", - "@angular/http": "^4.3.0", - "@angular/platform-browser": "^4.3.0", - "@angular/platform-browser-dynamic": "^4.3.0", - "@angular/platform-server": "^4.3.0", - "@angular/router": "^4.3.0", + "@angular/animations": "^4.4.6", + "@angular/cdk": "^2.0.0-beta.12", + "@angular/common": "^4.4.6", + "@angular/compiler": "^4.4.6", + "@angular/compiler-cli": "^4.4.6", + "@angular/core": "^4.4.6", + "@angular/forms": "^4.4.6", + "@angular/http": "^4.4.6", + "@angular/material": "^2.0.0-beta.12", + "@angular/platform-browser": "^4.4.6", + "@angular/platform-browser-dynamic": "^4.4.6", + "@angular/platform-server": "^4.4.6", + "@angular/router": "^4.4.6", "@nguniversal/aspnetcore-engine": "^1.0.0-beta.2", "@ngx-translate/core": "^6.0.1", "@ngx-translate/http-loader": "0.0.3", - "@types/node": "^7.0.12", + "@types/node": "^7.0.46", "angular2-router-loader": "^0.3.5", "angular2-template-loader": "^0.6.2", "aspnet-prerendering": "^3.0.1", @@ -54,20 +56,19 @@ "preboot": "^5.0.0", "raw-loader": "^0.5.1", "rimraf": "^2.6.2", - "rxjs": "^5.4.3", + "rxjs": "^5.5.0", "sass-loader": "^6.0.6", "style-loader": "^0.18.2", "to-string-loader": "^1.1.5", "typescript": "2.5.2", "url-loader": "^0.5.7", - "webpack": "^3.6.0", - "webpack-hot-middleware": "^2.19.1", + "webpack": "^3.8.1", + "webpack-hot-middleware": "^2.20.0", "webpack-merge": "^4.1.0", - "zone.js": "^0.8.17", - "@angular/material": "" + "zone.js": "^0.8.17" }, "devDependencies": { - "@angular/cli": "^1.3.2", + "@angular/cli": "^1.4.9", "@ngtools/webpack": "^1.3.0", "@types/chai": "^3.4.34", "@types/jasmine": "^2.5.37", @@ -80,12 +81,12 @@ "karma-chrome-launcher": "^2.2.0", "karma-coverage": "^1.1.1", "karma-jasmine": "^1.1.0", - "karma-mocha-reporter": "^2.2.4", + "karma-mocha-reporter": "^2.2.5", "karma-phantomjs-launcher": "^1.0.4", "karma-remap-coverage": "^0.1.4", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^2.0.3", - "tslint": "^5.7.0", + "tslint": "^5.8.0", "webpack-bundle-analyzer": "^2.9.0" } } diff --git a/webpack.config.vendor.js b/webpack.config.vendor.js index 5a2cb3f0..600f1912 100644 --- a/webpack.config.vendor.js +++ b/webpack.config.vendor.js @@ -1,2 +1,101 @@ -const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const merge = require('webpack-merge'); const treeShakableModules = [ '@angular/animations', '@angular/common', '@angular/compiler', '@angular/core', '@angular/forms', '@angular/http', '@angular/platform-browser', '@angular/platform-browser-dynamic', '@angular/router', - '@angular/material', 'ngx-bootstrap', 'zone.js', ]; const nonTreeShakableModules = [ // 'bootstrap', // 'bootstrap/dist/css/bootstrap.css', 'core-js', // 'es6-promise', // 'es6-shim', 'event-source-polyfill', // 'jquery', ]; const allModules = treeShakableModules.concat(nonTreeShakableModules); module.exports = (env) => { console.log(`env = ${JSON.stringify(env)}`) const extractCSS = new ExtractTextPlugin('vendor.css'); const isDevBuild = !(env && env.prod); const sharedConfig = { stats: { modules: false }, resolve: { extensions: [ '.js' ] }, module: { rules: [ { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } ] }, output: { publicPath: 'dist/', filename: '[name].js', library: '[name]_[hash]' }, plugins: [ // new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 ] }; const clientBundleConfig = merge(sharedConfig, { entry: { // To keep development builds fast, include all vendor dependencies in the vendor bundle. // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. vendor: isDevBuild ? allModules : nonTreeShakableModules }, output: { path: path.join(__dirname, 'wwwroot', 'dist') }, module: { rules: [ { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } ] }, plugins: [ extractCSS, new webpack.DllPlugin({ path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), name: '[name]_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); const serverBundleConfig = merge(sharedConfig, { target: 'node', resolve: { mainFields: ['main'] }, entry: { vendor: allModules.concat(['aspnet-prerendering']) }, output: { path: path.join(__dirname, 'ClientApp', 'dist'), libraryTarget: 'commonjs2', }, module: { rules: [ { test: /\.css(\?|$)/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] } ] }, plugins: [ new webpack.DllPlugin({ path: path.join(__dirname, 'ClientApp', 'dist', '[name]-manifest.json'), name: '[name]_[hash]' }) ].concat(isDevBuild ? [] : [ new webpack.optimize.UglifyJsPlugin() ]) }); return [clientBundleConfig, serverBundleConfig]; } \ No newline at end of file +const path = require('path'); +const webpack = require('webpack'); +const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const merge = require('webpack-merge'); +const treeShakableModules = [ + '@angular/animations', + '@angular/common', + '@angular/compiler', + '@angular/core', + '@angular/forms', + '@angular/http', + '@angular/platform-browser', + '@angular/platform-browser-dynamic', + '@angular/router', + '@angular/material', + '@angular/cdk', + 'ngx-bootstrap', + 'zone.js', +]; +const nonTreeShakableModules = [ + // 'bootstrap', + // 'bootstrap/dist/css/bootstrap.css', + 'core-js', + // 'es6-promise', + // 'es6-shim', + 'event-source-polyfill', + // 'jquery', +]; +const allModules = treeShakableModules.concat(nonTreeShakableModules); + +module.exports = (env) => { + console.log(`env = ${JSON.stringify(env)}`) + const extractCSS = new ExtractTextPlugin('vendor.css'); + const isDevBuild = !(env && env.prod); + const sharedConfig = { + stats: { modules: false }, + resolve: { extensions: [ '.js' ] }, + module: { + rules: [ + { test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, use: 'url-loader?limit=100000' } + ] + }, + output: { + publicPath: 'dist/', + filename: '[name].js', + library: '[name]_[hash]' + }, + plugins: [ + // new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable) + new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580 + new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898 + new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100 + ] + }; + + const clientBundleConfig = merge(sharedConfig, { + entry: { + // To keep development builds fast, include all vendor dependencies in the vendor bundle. + // But for production builds, leave the tree-shakable ones out so the AOT compiler can produce a smaller bundle. + vendor: isDevBuild ? allModules : nonTreeShakableModules + }, + output: { path: path.join(__dirname, 'wwwroot', 'dist') }, + module: { + rules: [ + { test: /\.css(\?|$)/, use: extractCSS.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) } + ] + }, + plugins: [ + extractCSS, + new webpack.DllPlugin({ + path: path.join(__dirname, 'wwwroot', 'dist', '[name]-manifest.json'), + name: '[name]_[hash]' + }) + ].concat(isDevBuild ? [] : [ + new webpack.optimize.UglifyJsPlugin() + ]) + }); + + const serverBundleConfig = merge(sharedConfig, { + target: 'node', + resolve: { mainFields: ['main'] }, + entry: { vendor: allModules.concat(['aspnet-prerendering']) }, + output: { + path: path.join(__dirname, 'ClientApp', 'dist'), + libraryTarget: 'commonjs2', + }, + module: { + rules: [ { test: /\.css(\?|$)/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] } ] + }, + plugins: [ + new webpack.DllPlugin({ + path: path.join(__dirname, 'ClientApp', 'dist', '[name]-manifest.json'), + name: '[name]_[hash]' + }) + ].concat(isDevBuild ? [] : [ + new webpack.optimize.UglifyJsPlugin() + ]) + }); + + return [clientBundleConfig, serverBundleConfig]; +} From 5bebf6783de13644b85865fc3a60bd0ba3670549 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Sat, 21 Oct 2017 20:07:51 -0600 Subject: [PATCH 05/22] Added hammerjs --- ClientApp/app/app.module.ts | 3 ++- .../my-new-component/my-new-component.component.html | 1 + ClientApp/boot.browser.ts | 1 + Views/Home/Index.cshtml | 1 + package.json | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ClientApp/app/app.module.ts b/ClientApp/app/app.module.ts index c26e8705..2bec8835 100644 --- a/ClientApp/app/app.module.ts +++ b/ClientApp/app/app.module.ts @@ -28,7 +28,7 @@ import { TransferHttpModule } from '../modules/transfer-http/transfer-http.modul import { MyNewComponentComponent } from './components/my-new-component/my-new-component.component'; // New Imports -import { MatRadioModule } from '@angular/material'; +import { MatRadioModule, MatSlideToggleModule } from '@angular/material'; export function createTranslateLoader(http: Http, baseHref) { // Temporary Azure hack @@ -57,6 +57,7 @@ export function createTranslateLoader(http: Http, baseHref) { HttpModule, FormsModule, MatRadioModule, + MatSlideToggleModule, Ng2BootstrapModule.forRoot(), // You could also split this up if you don't want the Entire Module imported TransferHttpModule, // Our Http TransferData method diff --git a/ClientApp/app/components/my-new-component/my-new-component.component.html b/ClientApp/app/components/my-new-component/my-new-component.component.html index 4dd92317..2281a987 100644 --- a/ClientApp/app/components/my-new-component/my-new-component.component.html +++ b/ClientApp/app/components/my-new-component/my-new-component.component.html @@ -4,3 +4,4 @@
Your favorite season is: {{favoriteSeason}}
+ diff --git a/ClientApp/boot.browser.ts b/ClientApp/boot.browser.ts index a7830543..c399e99d 100644 --- a/ClientApp/boot.browser.ts +++ b/ClientApp/boot.browser.ts @@ -2,6 +2,7 @@ import './polyfills/browser.polyfills'; import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module.browser'; +import 'hammerjs'; const rootElemTagName = 'app'; // Update this if you change your root component selector diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index 7dbdbd4d..a9731e8b 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -5,3 +5,4 @@ } + diff --git a/package.json b/package.json index 4c14a059..8a2905e1 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "expose-loader": "^0.7.3", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^0.11.2", + "hammerjs": "^2.0.8", "html-loader": "^0.5.1", "isomorphic-fetch": "^2.2.1", "jquery": "^2.2.1", From 36114929cc7d7d55963a70ff0310d810e1e6142d Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Mon, 23 Oct 2017 18:32:03 -0600 Subject: [PATCH 06/22] Shanged the name of the home button --- ClientApp/app/components/navmenu/navmenu.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ClientApp/app/components/navmenu/navmenu.component.html b/ClientApp/app/components/navmenu/navmenu.component.html index bd6eadda..6afd75e4 100644 --- a/ClientApp/app/components/navmenu/navmenu.component.html +++ b/ClientApp/app/components/navmenu/navmenu.component.html @@ -8,7 +8,7 @@ - Angular 4 Universal & ASP.NET Core + Layers-N-Lashes
From 7d891213f5e8152c3ebc02e1c01a61a8a569f7fd Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 31 Oct 2017 13:20:36 -0600 Subject: [PATCH 07/22] Added new Image component. --- ClientApp/app/app.component.html | 5 ++-- ClientApp/app/app.module.ts | 7 ++++-- .../image-list/image-list.component.html | 8 ++++++ .../image-list/image-list.component.scss | 0 .../image-list/image-list.component.ts | 25 +++++++++++++++++++ .../app/containers/home/home.component.html | 1 + 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 ClientApp/app/components/image-list/image-list.component.html create mode 100644 ClientApp/app/components/image-list/image-list.component.scss create mode 100644 ClientApp/app/components/image-list/image-list.component.ts diff --git a/ClientApp/app/app.component.html b/ClientApp/app/app.component.html index d51c5d08..5a75563f 100644 --- a/ClientApp/app/app.component.html +++ b/ClientApp/app/app.component.html @@ -2,6 +2,7 @@
- + -
+ + \ No newline at end of file diff --git a/ClientApp/app/app.module.ts b/ClientApp/app/app.module.ts index 2bec8835..5f85a94f 100644 --- a/ClientApp/app/app.module.ts +++ b/ClientApp/app/app.module.ts @@ -26,9 +26,10 @@ import { UserService } from './shared/user.service'; import { ORIGIN_URL } from './shared/constants/baseurl.constants'; import { TransferHttpModule } from '../modules/transfer-http/transfer-http.module'; import { MyNewComponentComponent } from './components/my-new-component/my-new-component.component'; +import { ImageListComponent } from './components/image-list/image-list.component'; // New Imports -import { MatRadioModule, MatSlideToggleModule } from '@angular/material'; +import { MatRadioModule, MatSlideToggleModule, MatGridListModule } from '@angular/material'; export function createTranslateLoader(http: Http, baseHref) { // Temporary Azure hack @@ -50,7 +51,8 @@ export function createTranslateLoader(http: Http, baseHref) { // ChatComponent, NotFoundComponent, NgxBootstrapComponent, - MyNewComponentComponent + MyNewComponentComponent, + ImageListComponent ], imports: [ CommonModule, @@ -58,6 +60,7 @@ export function createTranslateLoader(http: Http, baseHref) { FormsModule, MatRadioModule, MatSlideToggleModule, + MatGridListModule, Ng2BootstrapModule.forRoot(), // You could also split this up if you don't want the Entire Module imported TransferHttpModule, // Our Http TransferData method diff --git a/ClientApp/app/components/image-list/image-list.component.html b/ClientApp/app/components/image-list/image-list.component.html new file mode 100644 index 00000000..7cf5bcda --- /dev/null +++ b/ClientApp/app/components/image-list/image-list.component.html @@ -0,0 +1,8 @@ + + + {{tile.text}} + + \ No newline at end of file diff --git a/ClientApp/app/components/image-list/image-list.component.scss b/ClientApp/app/components/image-list/image-list.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ClientApp/app/components/image-list/image-list.component.ts b/ClientApp/app/components/image-list/image-list.component.ts new file mode 100644 index 00000000..2416d7cb --- /dev/null +++ b/ClientApp/app/components/image-list/image-list.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; + +/** + * @title Radios with ngModel + */ + +@Component({ + selector: 'app-image-list', + templateUrl: './image-list.component.html', + styleUrls: ['./image-list.component.scss'] +}) +export class ImageListComponent implements OnInit { + + tiles = [ + {text: 'One', cols: 3, rows: 1, color: 'lightblue'}, + {text: 'Two', cols: 1, rows: 2, color: 'lightgreen'}, + {text: 'Three', cols: 1, rows: 1, color: 'lightpink'}, + {text: 'Four', cols: 2, rows: 1, color: '#DDBDF1'}, + ]; + constructor() { } + + ngOnInit() { + } + +} diff --git a/ClientApp/app/containers/home/home.component.html b/ClientApp/app/containers/home/home.component.html index 4f6c4394..7c2dd001 100644 --- a/ClientApp/app/containers/home/home.component.html +++ b/ClientApp/app/containers/home/home.component.html @@ -7,6 +7,7 @@

{{ title }}

+

{{ 'HOME_FEATURE_LIST_TITLE' | translate }}

    From 0000ec2385784b701af8511530c593856558f13c Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Sun, 5 Nov 2017 22:38:08 -0700 Subject: [PATCH 08/22] Worked more with image --- .../components/image-list/image-list.component.html | 11 ++++++----- .../components/image-list/image-list.component.scss | 5 +++++ .../app/components/image-list/image-list.component.ts | 9 +++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ClientApp/app/components/image-list/image-list.component.html b/ClientApp/app/components/image-list/image-list.component.html index 7cf5bcda..3645d84c 100644 --- a/ClientApp/app/components/image-list/image-list.component.html +++ b/ClientApp/app/components/image-list/image-list.component.html @@ -1,8 +1,9 @@ - + {{tile.text}} - \ No newline at end of file + diff --git a/ClientApp/app/components/image-list/image-list.component.scss b/ClientApp/app/components/image-list/image-list.component.scss index e69de29b..6fa8a4d6 100644 --- a/ClientApp/app/components/image-list/image-list.component.scss +++ b/ClientApp/app/components/image-list/image-list.component.scss @@ -0,0 +1,5 @@ +mat-grid-tile { + background-size: contain; + background-repeat: no-repeat; + background-position: center; +} diff --git a/ClientApp/app/components/image-list/image-list.component.ts b/ClientApp/app/components/image-list/image-list.component.ts index 2416d7cb..a03a532b 100644 --- a/ClientApp/app/components/image-list/image-list.component.ts +++ b/ClientApp/app/components/image-list/image-list.component.ts @@ -12,10 +12,11 @@ import { Component, OnInit } from '@angular/core'; export class ImageListComponent implements OnInit { tiles = [ - {text: 'One', cols: 3, rows: 1, color: 'lightblue'}, - {text: 'Two', cols: 1, rows: 2, color: 'lightgreen'}, - {text: 'Three', cols: 1, rows: 1, color: 'lightpink'}, - {text: 'Four', cols: 2, rows: 1, color: '#DDBDF1'}, + { text: 'One', image: 'https://www.w3schools.com/images/colorpicker.gif'}, + { text: 'Two', image: 'https://www.w3schools.com/images/colorpicker.gif'}, + { text: 'Three', image: 'https://www.w3schools.com/images/colorpicker.gif'}, + { text: 'Four', image: 'https://www.w3schools.com/images/colorpicker.gif'}, + { text: 'Four', image: 'https://www.w3schools.com/images/colorpicker.gif' }, ]; constructor() { } From 003ae0413e9f73d62057718a1eeab26d7d405802 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 7 Nov 2017 13:04:23 -0700 Subject: [PATCH 09/22] Added new services Component for displaying services and pricing --- ClientApp/app/app.component.html | 1 + ClientApp/app/app.module.ts | 7 +- .../services/services.component.html | 28 ++++++++ .../services/services.component.scss | 11 ++++ .../components/services/services.component.ts | 65 +++++++++++++++++++ 5 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 ClientApp/app/components/services/services.component.html create mode 100644 ClientApp/app/components/services/services.component.scss create mode 100644 ClientApp/app/components/services/services.component.ts diff --git a/ClientApp/app/app.component.html b/ClientApp/app/app.component.html index 5a75563f..dd5f3a38 100644 --- a/ClientApp/app/app.component.html +++ b/ClientApp/app/app.component.html @@ -5,4 +5,5 @@ +
\ No newline at end of file diff --git a/ClientApp/app/app.module.ts b/ClientApp/app/app.module.ts index 5f85a94f..464a5e19 100644 --- a/ClientApp/app/app.module.ts +++ b/ClientApp/app/app.module.ts @@ -29,7 +29,8 @@ import { MyNewComponentComponent } from './components/my-new-component/my-new-co import { ImageListComponent } from './components/image-list/image-list.component'; // New Imports -import { MatRadioModule, MatSlideToggleModule, MatGridListModule } from '@angular/material'; +import { MatRadioModule, MatSlideToggleModule, MatGridListModule, MatTableModule } from '@angular/material'; +import { ServicesComponent } from './components/services/services.component'; export function createTranslateLoader(http: Http, baseHref) { // Temporary Azure hack @@ -52,7 +53,8 @@ export function createTranslateLoader(http: Http, baseHref) { NotFoundComponent, NgxBootstrapComponent, MyNewComponentComponent, - ImageListComponent + ImageListComponent, + ServicesComponent ], imports: [ CommonModule, @@ -61,6 +63,7 @@ export function createTranslateLoader(http: Http, baseHref) { MatRadioModule, MatSlideToggleModule, MatGridListModule, + MatTableModule, Ng2BootstrapModule.forRoot(), // You could also split this up if you don't want the Entire Module imported TransferHttpModule, // Our Http TransferData method diff --git a/ClientApp/app/components/services/services.component.html b/ClientApp/app/components/services/services.component.html new file mode 100644 index 00000000..032ef78d --- /dev/null +++ b/ClientApp/app/components/services/services.component.html @@ -0,0 +1,28 @@ +
+ + + + + No. + {{element.position}} + + + + Name + {{element.name}} + + + + Weight + {{element.weight}} + + + + Symbol + {{element.symbol}} + + + + +
diff --git a/ClientApp/app/components/services/services.component.scss b/ClientApp/app/components/services/services.component.scss new file mode 100644 index 00000000..ed85d209 --- /dev/null +++ b/ClientApp/app/components/services/services.component.scss @@ -0,0 +1,11 @@ +.example-container { + display: flex; + flex-direction: column; + max-height: 500px; + min-width: 300px; +} + +.mat-table { + overflow: auto; + max-height: 500px; +} \ No newline at end of file diff --git a/ClientApp/app/components/services/services.component.ts b/ClientApp/app/components/services/services.component.ts new file mode 100644 index 00000000..ebb1f44d --- /dev/null +++ b/ClientApp/app/components/services/services.component.ts @@ -0,0 +1,65 @@ +import { Component, OnInit } from '@angular/core'; +import {DataSource} from '@angular/cdk/collections'; +import {Observable} from 'rxjs/Observable'; +import 'rxjs/add/observable/of'; + +@Component({ + selector: 'app-services', + templateUrl: './services.component.html', + styleUrls: ['./services.component.scss'] +}) +export class ServicesComponent implements OnInit { + + displayedColumns = ['position', 'name', 'weight', 'symbol']; + dataSource = new ExampleDataSource(); + constructor() { } + + ngOnInit() { + } + +} + + export interface Element { + name: string; + position: number; + weight: number; + symbol: string; + } + + const data: Element[] = [ + {position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'}, + {position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'}, + {position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li'}, + {position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be'}, + {position: 5, name: 'Boron', weight: 10.811, symbol: 'B'}, + {position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C'}, + {position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N'}, + {position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O'}, + {position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F'}, + {position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne'}, + {position: 11, name: 'Sodium', weight: 22.9897, symbol: 'Na'}, + {position: 12, name: 'Magnesium', weight: 24.305, symbol: 'Mg'}, + {position: 13, name: 'Aluminum', weight: 26.9815, symbol: 'Al'}, + {position: 14, name: 'Silicon', weight: 28.0855, symbol: 'Si'}, + {position: 15, name: 'Phosphorus', weight: 30.9738, symbol: 'P'}, + {position: 16, name: 'Sulfur', weight: 32.065, symbol: 'S'}, + {position: 17, name: 'Chlorine', weight: 35.453, symbol: 'Cl'}, + {position: 18, name: 'Argon', weight: 39.948, symbol: 'Ar'}, + {position: 19, name: 'Potassium', weight: 39.0983, symbol: 'K'}, + {position: 20, name: 'Calcium', weight: 40.078, symbol: 'Ca'}, + ]; + + /** + * Data source to provide what data should be rendered in the table. The observable provided + * in connect should emit exactly the data that should be rendered by the table. If the data is + * altered, the observable should emit that new set of data on the stream. In our case here, + * we return a stream that contains only one set of data that doesn't change. + */ + export class ExampleDataSource extends DataSource { + /** Connect function called by the table to retrieve one stream containing the data to render. */ + connect(): Observable { + return Observable.of(data); + } + + disconnect() {} + } From ead7716191b7d2fd713fb09d0d4ef598c2652af8 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 9 Nov 2017 13:26:22 -0700 Subject: [PATCH 10/22] Fixed the price to display as currency with only the $ symbol. --- ClientApp/app/app.module.ts | 10 ++++- .../image-list/image-list.component.html | 28 +++++++++---- .../image-list/image-list.component.scss | 11 +++-- .../image-list/image-list.component.ts | 7 ---- .../services/services.component.html | 23 ++++------ .../components/services/services.component.ts | 42 +++++++------------ 6 files changed, 59 insertions(+), 62 deletions(-) diff --git a/ClientApp/app/app.module.ts b/ClientApp/app/app.module.ts index 464a5e19..c54da476 100644 --- a/ClientApp/app/app.module.ts +++ b/ClientApp/app/app.module.ts @@ -29,7 +29,14 @@ import { MyNewComponentComponent } from './components/my-new-component/my-new-co import { ImageListComponent } from './components/image-list/image-list.component'; // New Imports -import { MatRadioModule, MatSlideToggleModule, MatGridListModule, MatTableModule } from '@angular/material'; +import { + MatRadioModule, + MatSlideToggleModule, + MatGridListModule, + MatTableModule, + MatCardModule +} from '@angular/material'; + import { ServicesComponent } from './components/services/services.component'; export function createTranslateLoader(http: Http, baseHref) { @@ -64,6 +71,7 @@ export function createTranslateLoader(http: Http, baseHref) { MatSlideToggleModule, MatGridListModule, MatTableModule, + MatCardModule, Ng2BootstrapModule.forRoot(), // You could also split this up if you don't want the Entire Module imported TransferHttpModule, // Our Http TransferData method diff --git a/ClientApp/app/components/image-list/image-list.component.html b/ClientApp/app/components/image-list/image-list.component.html index 3645d84c..7cab4c74 100644 --- a/ClientApp/app/components/image-list/image-list.component.html +++ b/ClientApp/app/components/image-list/image-list.component.html @@ -1,9 +1,19 @@ - - - {{tile.text}} - - + + +
+ Shiba Inu + Dog Breed +
+ Photo of a Shiba Inu + +

+ The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan. + A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally + bred for hunting. +

+
+ + + + +
\ No newline at end of file diff --git a/ClientApp/app/components/image-list/image-list.component.scss b/ClientApp/app/components/image-list/image-list.component.scss index 6fa8a4d6..b48427f8 100644 --- a/ClientApp/app/components/image-list/image-list.component.scss +++ b/ClientApp/app/components/image-list/image-list.component.scss @@ -1,5 +1,8 @@ -mat-grid-tile { - background-size: contain; - background-repeat: no-repeat; - background-position: center; +.example-card { + width: 400px; } + +.example-header-image { + background-image: url('http://material.angular.io/assets/img/examples/shiba1.jpg'); + background-size: cover; +} \ No newline at end of file diff --git a/ClientApp/app/components/image-list/image-list.component.ts b/ClientApp/app/components/image-list/image-list.component.ts index a03a532b..924ef17a 100644 --- a/ClientApp/app/components/image-list/image-list.component.ts +++ b/ClientApp/app/components/image-list/image-list.component.ts @@ -11,13 +11,6 @@ import { Component, OnInit } from '@angular/core'; }) export class ImageListComponent implements OnInit { - tiles = [ - { text: 'One', image: 'https://www.w3schools.com/images/colorpicker.gif'}, - { text: 'Two', image: 'https://www.w3schools.com/images/colorpicker.gif'}, - { text: 'Three', image: 'https://www.w3schools.com/images/colorpicker.gif'}, - { text: 'Four', image: 'https://www.w3schools.com/images/colorpicker.gif'}, - { text: 'Four', image: 'https://www.w3schools.com/images/colorpicker.gif' }, - ]; constructor() { } ngOnInit() { diff --git a/ClientApp/app/components/services/services.component.html b/ClientApp/app/components/services/services.component.html index 032ef78d..21034808 100644 --- a/ClientApp/app/components/services/services.component.html +++ b/ClientApp/app/components/services/services.component.html @@ -2,25 +2,20 @@ - - - No. - {{element.position}} - Name - {{element.name}} + {{service.name}} - - - Weight - {{element.weight}} + + + Description + {{service.description}} - - - Symbol - {{element.symbol}} + + + Price + {{ service.price | currency:'USD':true }} diff --git a/ClientApp/app/components/services/services.component.ts b/ClientApp/app/components/services/services.component.ts index ebb1f44d..59ebf47f 100644 --- a/ClientApp/app/components/services/services.component.ts +++ b/ClientApp/app/components/services/services.component.ts @@ -2,15 +2,17 @@ import { Component, OnInit } from '@angular/core'; import {DataSource} from '@angular/cdk/collections'; import {Observable} from 'rxjs/Observable'; import 'rxjs/add/observable/of'; +import { CurrencyPipe } from '@angular/common'; @Component({ selector: 'app-services', + templateUrl: './services.component.html', styleUrls: ['./services.component.scss'] }) export class ServicesComponent implements OnInit { - displayedColumns = ['position', 'name', 'weight', 'symbol']; + displayedColumns = ['name', 'description', 'price']; dataSource = new ExampleDataSource(); constructor() { } @@ -19,34 +21,20 @@ export class ServicesComponent implements OnInit { } - export interface Element { + export interface Service { name: string; - position: number; - weight: number; - symbol: string; + description: string; + price: number; } - const data: Element[] = [ - {position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'}, - {position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'}, - {position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li'}, - {position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be'}, - {position: 5, name: 'Boron', weight: 10.811, symbol: 'B'}, - {position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C'}, - {position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N'}, - {position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O'}, - {position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F'}, - {position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne'}, - {position: 11, name: 'Sodium', weight: 22.9897, symbol: 'Na'}, - {position: 12, name: 'Magnesium', weight: 24.305, symbol: 'Mg'}, - {position: 13, name: 'Aluminum', weight: 26.9815, symbol: 'Al'}, - {position: 14, name: 'Silicon', weight: 28.0855, symbol: 'Si'}, - {position: 15, name: 'Phosphorus', weight: 30.9738, symbol: 'P'}, - {position: 16, name: 'Sulfur', weight: 32.065, symbol: 'S'}, - {position: 17, name: 'Chlorine', weight: 35.453, symbol: 'Cl'}, - {position: 18, name: 'Argon', weight: 39.948, symbol: 'Ar'}, - {position: 19, name: 'Potassium', weight: 39.0983, symbol: 'K'}, - {position: 20, name: 'Calcium', weight: 40.078, symbol: 'Ca'}, + const data: Service[] = [ + {name: 'Micro Blade', description: 'Hydrogen', price: 10.00}, + {name: 'Kids Cut', description: 'Helium', price: 10.00}, + {name: 'Eye Lash Extensions', description: 'Lithium', price: 10.00}, + {name: 'temp', description: 'Beryllium', price: 9.00}, + {name: 'temp', description: 'Boron', price: 10.81}, + {name: 'temp', description: 'Carbon', price: 12.01}, + {name: 'temp', description: 'Nitrogen', price: 14.00}, ]; /** @@ -57,7 +45,7 @@ export class ServicesComponent implements OnInit { */ export class ExampleDataSource extends DataSource { /** Connect function called by the table to retrieve one stream containing the data to render. */ - connect(): Observable { + connect(): Observable { return Observable.of(data); } From 1d6b14407830a96f1e992fa8108423d3d535df9a Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 10 Nov 2017 13:34:37 -0700 Subject: [PATCH 11/22] Formatting the home page --- ClientApp/app/app.component.html | 3 -- .../image-list/image-list.component.scss | 2 +- .../components/navmenu/navmenu.component.css | 7 +++ .../components/navmenu/navmenu.component.html | 4 +- .../services/services.component.html | 3 ++ .../app/containers/home/home.component.html | 49 ++----------------- .../app/containers/home/home.component.ts | 2 +- Startup.cs | 2 +- 8 files changed, 19 insertions(+), 53 deletions(-) diff --git a/ClientApp/app/app.component.html b/ClientApp/app/app.component.html index dd5f3a38..53921664 100644 --- a/ClientApp/app/app.component.html +++ b/ClientApp/app/app.component.html @@ -3,7 +3,4 @@
- - -
\ No newline at end of file diff --git a/ClientApp/app/components/image-list/image-list.component.scss b/ClientApp/app/components/image-list/image-list.component.scss index b48427f8..d24d7eb5 100644 --- a/ClientApp/app/components/image-list/image-list.component.scss +++ b/ClientApp/app/components/image-list/image-list.component.scss @@ -1,5 +1,5 @@ .example-card { - width: 400px; + max-width: 400px; } .example-header-image { diff --git a/ClientApp/app/components/navmenu/navmenu.component.css b/ClientApp/app/components/navmenu/navmenu.component.css index 8d86aa03..c453a91c 100644 --- a/ClientApp/app/components/navmenu/navmenu.component.css +++ b/ClientApp/app/components/navmenu/navmenu.component.css @@ -34,6 +34,9 @@ li.link-active a:focus { font-size: 14px; background-color: #f1f1f1; } + + + .navbar-toggle { padding: 0px 5px; margin-top: 0px; @@ -50,6 +53,10 @@ li.link-active a:focus { background-color: white; } + .navbar { + background-color: #f1f1f1; + } + .navbar a { /* If a menu item's text is too long, truncate it */ white-space: nowrap; diff --git a/ClientApp/app/components/navmenu/navmenu.component.html b/ClientApp/app/components/navmenu/navmenu.component.html index 6afd75e4..d8ed0630 100644 --- a/ClientApp/app/components/navmenu/navmenu.component.html +++ b/ClientApp/app/components/navmenu/navmenu.component.html @@ -19,7 +19,7 @@ {{ 'HOME' | translate }} -
  • + diff --git a/ClientApp/app/containers/home/home.component.html b/ClientApp/app/containers/home/home.component.html index 7c2dd001..8282e984 100644 --- a/ClientApp/app/containers/home/home.component.html +++ b/ClientApp/app/containers/home/home.component.html @@ -1,62 +1,21 @@

    {{ title }}

    -
    - Enjoy the latest features from .NET Core & Angular 4.0! -
    For more info check the repo here: AspNetCore-Angular2-Universal repo -

    -
    -

    {{ 'HOME_FEATURE_LIST_TITLE' | translate }}

    -
      -
    • ASP.NET Core 2.0 :: ( Visual Studio 2017 )
    • -
    • - Angular 4.* front-end UI framework -
        -
      • Angular **platform-server** (aka: Universal) - server-side rendering for SEO, deep-linking, and - incredible performance.
      • - -
      • AoT (Ahead-of-time) production compilation for even faster Prod builds.
      • -
      -
    • -
    • - The latest TypeScript 2.* features - -
    • -
    • - Webpack -
        - -
      • Hot Module Reloading/Replacement for an amazing development experience.
      • -
      • Tree-shaking
      • -
      -
    • - -
    • Bootstrap (ngx-bootstrap) : Bootstrap capable of being rendered even on the server.
    • -
    • Unit testing via karma & jasmine.
    • - -
    -

    {{ 'HOME_ISSUES_TITLE' | translate }}

    - -
    + + +
    diff --git a/ClientApp/app/containers/home/home.component.ts b/ClientApp/app/containers/home/home.component.ts index 3065c0b1..6c0ded9a 100644 --- a/ClientApp/app/containers/home/home.component.ts +++ b/ClientApp/app/containers/home/home.component.ts @@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core'; }) export class HomeComponent implements OnInit { - title: string = 'Angular 4.0 Universal & ASP.NET Core 2.0 advanced starter-kit'; + title: string = 'Layers N Lashes'; // Use "constructor"s only for dependency injection constructor( diff --git a/Startup.cs b/Startup.cs index 7736f9e9..0648b14e 100644 --- a/Startup.cs +++ b/Startup.cs @@ -54,7 +54,7 @@ public void ConfigureServices(IServiceCollection services) // Register the Swagger generator, defining one or more Swagger documents services.AddSwaggerGen(c => { - c.SwaggerDoc("v1", new Info { Title = "Angular 4.0 Universal & ASP.NET Core advanced starter-kit web API", Version = "v1" }); + c.SwaggerDoc("v1", new Info { Title = "Layers N Lashes", Version = "v1" }); }); } From f5bcf38237533c8aa4c7fb383dce62e4f3aa39cd Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 20:22:09 -0700 Subject: [PATCH 12/22] trying to get the website to build on heroku --- app.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 4c5275ff..9e7852ec 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,11 @@ -{ +{ "name": "aspnetcore-angular2-universal", "description": "Deploy Angular 2+ Universal & ASP.NET Core SPA Advanced Starter on Heroku", "logo": "https://raw.githubusercontent.com/herokumx/herokumxnet/master/NETChatterGroup.png", "keywords": [ "heroku", "asp.net-core", "angular2", "spa" ], + "scripts": { + "predeploy": "npm install && npm run build:dev && dotnet restore && dotnet run" + }, "env": { "NPM_CONFIG_PRODUCTION": { "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", @@ -17,4 +20,4 @@ "url": "https://github.com/ORuban/dotnet-core-buildpack.git" } ] -} \ No newline at end of file +} From 43135665142d6acb2c889679aec246b119362c35 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 20:23:56 -0700 Subject: [PATCH 13/22] trying to get the website to build on heroku --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index 9e7852ec..c97b172f 100644 --- a/app.json +++ b/app.json @@ -9,7 +9,7 @@ "env": { "NPM_CONFIG_PRODUCTION": { "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", - "value": "true" + "value": "false" } }, "buildpacks": [ From 257841ada93fd19ae7f6c6b9ad3f5b7eed8cea01 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 21:01:48 -0700 Subject: [PATCH 14/22] trying to get wepsite to deploy on heroku --- app.json | 3 --- package.json | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app.json b/app.json index c97b172f..d394f83e 100644 --- a/app.json +++ b/app.json @@ -3,9 +3,6 @@ "description": "Deploy Angular 2+ Universal & ASP.NET Core SPA Advanced Starter on Heroku", "logo": "https://raw.githubusercontent.com/herokumx/herokumxnet/master/NETChatterGroup.png", "keywords": [ "heroku", "asp.net-core", "angular2", "spa" ], - "scripts": { - "predeploy": "npm install && npm run build:dev && dotnet restore && dotnet run" - }, "env": { "NPM_CONFIG_PRODUCTION": { "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", diff --git a/package.json b/package.json index 8a2905e1..1a72b7df 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "angular4-aspnetcore-universal", "version": "1.0.0-rc3", "scripts": { + "start": "npm run build:vendor && npm run build:webpack", "lint": "tslint -p tsconfig.json", "test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js", "test:watch": "npm run test -- --auto-watch --no-single-run", From be8abd181d0d41f913904ce0a9bf2e0041e6f1cc Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 21:11:55 -0700 Subject: [PATCH 15/22] FIxes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a72b7df..9a1d0816 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "angular4-aspnetcore-universal", "version": "1.0.0-rc3", "scripts": { - "start": "npm run build:vendor && npm run build:webpack", + "start": "node app.json", "lint": "tslint -p tsconfig.json", "test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js", "test:watch": "npm run test -- --auto-watch --no-single-run", From 73b58cecf76145a6eeea04da35096ce3f51ee1dc Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 21:29:19 -0700 Subject: [PATCH 16/22] test --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index d394f83e..08a18c5b 100644 --- a/app.json +++ b/app.json @@ -7,7 +7,7 @@ "NPM_CONFIG_PRODUCTION": { "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", "value": "false" - } + } }, "buildpacks": [ { From ee86843f4b26f71aafa69de5a9f9e0a984f244f4 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 22:16:45 -0700 Subject: [PATCH 17/22] test --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index 08a18c5b..f06c20ea 100644 --- a/app.json +++ b/app.json @@ -6,7 +6,7 @@ "env": { "NPM_CONFIG_PRODUCTION": { "description": "False as we need to install devDependencies on heroku instance (webpack, ...)", - "value": "false" + "value": "true" } }, "buildpacks": [ From 319dd269052aee61609a96f097c4a1fe771fc6d7 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 22:28:15 -0700 Subject: [PATCH 18/22] test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a1d0816..6c7188b8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "angular4-aspnetcore-universal", "version": "1.0.0-rc3", "scripts": { - "start": "node app.json", + "start": "npm install && npm run build:dev && dotnet restore", "lint": "tslint -p tsconfig.json", "test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js", "test:watch": "npm run test -- --auto-watch --no-single-run", From d3f8a930756b071d214d075e5061c267dbd17196 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 22:51:06 -0700 Subject: [PATCH 19/22] test --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 6c7188b8..fb7a4dd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,11 @@ { "name": "angular4-aspnetcore-universal", "version": "1.0.0-rc3", + "license": "UNLICENSED", + "repository": { + "type": "git", + "url": "https://github.com/tboneteen18/aspnetcore-angular2-universal.git" + }, "scripts": { "start": "npm install && npm run build:dev && dotnet restore", "lint": "tslint -p tsconfig.json", From bce41a789a57ead3f9d94be353bf17fe885795fe Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 23:07:45 -0700 Subject: [PATCH 20/22] test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb7a4dd9..3254b654 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/tboneteen18/aspnetcore-angular2-universal.git" }, "scripts": { - "start": "npm install && npm run build:dev && dotnet restore", + "start": "npm install && npm run build:dev && dotnet restore && dotnet run", "lint": "tslint -p tsconfig.json", "test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js", "test:watch": "npm run test -- --auto-watch --no-single-run", From 7f33c15eee4f8b3dc2d9101755b8b70e73904658 Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 23:39:23 -0700 Subject: [PATCH 21/22] Test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3254b654..ca82f2e3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/tboneteen18/aspnetcore-angular2-universal.git" }, "scripts": { - "start": "npm install && npm run build:dev && dotnet restore && dotnet run", + "start": "", "lint": "tslint -p tsconfig.json", "test": "npm run build:vendor && karma start ClientApp/test/karma.conf.js", "test:watch": "npm run test -- --auto-watch --no-single-run", From c64e24aeb0f47c0bbfebfdf7490099e7777876ce Mon Sep 17 00:00:00 2001 From: Tyler Russon Date: Fri, 10 Nov 2017 23:54:48 -0700 Subject: [PATCH 22/22] it works --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index f06c20ea..edb6c994 100644 --- a/app.json +++ b/app.json @@ -14,7 +14,7 @@ "url": "heroku/nodejs" }, { - "url": "https://github.com/ORuban/dotnet-core-buildpack.git" + "url": "https://github.com/jincod/dotnetcore-buildpack" } ] }