Skip to content

Commit

Permalink
feat: convert blog to use scully (#20)
Browse files Browse the repository at this point in the history
* feat: convert blog to use scully
* chore: update deployment script
  • Loading branch information
brandonroberts committed Jun 25, 2020
1 parent a315ac7 commit 7f65f62
Show file tree
Hide file tree
Showing 63 changed files with 1,277 additions and 1,450 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ testem.log
# System Files
.DS_Store
Thumbs.db
scully.log
39 changes: 0 additions & 39 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"node_modules/prism-themes/themes/prism-atom-dark.css"
],
"scripts": [
"node_modules/marked/lib/marked.js",
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-typescript.min.js"
],
Expand Down Expand Up @@ -133,44 +132,6 @@
}
}
}
},
"router": {
"projectType": "library",
"root": "projects/router",
"sourceRoot": "projects/router/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/router/tsconfig.lib.json",
"project": "projects/router/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/router/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/router/src/test.ts",
"tsConfig": "projects/router/tsconfig.spec.json",
"karmaConfig": "projects/router/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/router/tsconfig.lib.json",
"projects/router/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "blog"
Expand Down
7 changes: 7 additions & 0 deletions src/content/pages/about.md → content/pages/about.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: About Me
description: 'About Me'
published: true
slug: about
---

<div class="page about-page">

## About Me
Expand Down
7 changes: 7 additions & 0 deletions src/content/pages/talks.md → content/pages/talks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: Tech Talks and Appearances
description: 'Stuff'
published: true
slug: talks
---

<div class="page talks-page">

## Talks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
title: Handling Error States with NgRx
description: 'Handling Error States with NgRx'
published: true
slug: 2019-03-04-handling-error-states-with-ngrx
publishedDate: 2019-03-04
---

## Handling Error States with NgRx

<img src="/content/posts/david-travis-548920-unsplash.jpg" width="100%"/>
<img src="/assets/posts/david-travis-548920-unsplash.jpg" width="100%"/>

When building applications with NgRx, one thing you have to be aware of is how to handle error states. Whether this be from submitting a login form, making a request for loading data, or handling user timeouts, errors still need to be displayed to the user in some way. The question arises of where do you put the error information. Should your error state be handled locally in the component, or added to your global state? There are multiple ways to do this, each with different advantages and drawbacks. Let's look at a movies page to walk through the different ways of handling and displaying errors.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
---
title: Custom Route Matching with the Angular Router
description: 'Custom Route Matching with the Angular Router'
published: true
slug: 2019-03-27-custom-route-matching-angular-router
publishedDate: 2019-03-27
---

## Custom Route Matching with the Angular Router

<a href="https://unsplash.com/@soymeraki?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" target="_blank" title="Photo by Javier Allegue Barros on Unsplash">
<img src="/content/posts/javier-allegue-barros-761133-unsplash.jpg" class="center"/>
<img src="/assets/posts/javier-allegue-barros-761133-unsplash.jpg" class="center"/>
</a>

When using the [Angular Router](https://angular.io/guide/router), there are usually only a few types of routes you need to create. A static route with no parameters, a variable route for dynamic parameters, and catchall routes for [404 pages](https://bobrov.dev/blog/angular-smart-404-page/). The Angular Router can handle all these scenarios with its powerful [route matching strategy](https://blog.angularindepth.com/angular-routing-series-pillar-1-router-states-and-url-matching-12520e62d0fc). The Angular Router also supports custom pattern matching for URL paths for more complex URLs. You've seen this before on Medium where it uses your Twitter handle in the URL. If you were building this route in your own application, you want to use this handle in your application as a route parameter but you don't want to parse out the `@` symbol every time.
Expand Down
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"public": "dist/blog",
"public": "dist/static",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"deploy": "yarn build:prod && firebase deploy --project brandonroberts-website",
"format": "prettier --write ."
"deploy": "yarn build && yarn scully && firebase deploy --project brandonroberts-website",
"format": "prettier --write .",
"scully": "scully",
"scully:serve": "scully serve"
},
"private": true,
"dependencies": {
Expand All @@ -24,6 +26,10 @@
"@angular/platform-browser": "~9.1.4",
"@angular/platform-browser-dynamic": "~9.1.4",
"@angular/router": "~9.1.4",
"@scullyio/init": "^0.0.28",
"@scullyio/ng-lib": "latest",
"@scullyio/scully": "latest",
"prismjs": "^1.20.0",
"core-js": "^2.5.4",
"ngx-markdown": "^8.1.0",
"path-to-regexp": "^6.1.0",
Expand Down
25 changes: 0 additions & 25 deletions projects/router/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions projects/router/karma.conf.js

This file was deleted.

7 changes: 0 additions & 7 deletions projects/router/ng-package.json

This file was deleted.

12 changes: 0 additions & 12 deletions projects/router/package.json

This file was deleted.

121 changes: 0 additions & 121 deletions projects/router/src/lib/link-active.ts

This file was deleted.

0 comments on commit 7f65f62

Please sign in to comment.