Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ scully/bin
projects/sampleBlog/src/assets/scully-routes.json
scully/node_modules
scully/.vscode/settings.json
gp.js
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"extractCss": true,
"outputPath": "dist/sampleBlog",
"index": "projects/sampleBlog/src/index.html",
"main": "projects/sampleBlog/src/main.ts",
Expand Down
8 changes: 8 additions & 0 deletions gp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {parseAngularRoutes} from 'guess-parser';
import {join} from 'path';

const folder = join(__dirname, './src/app');

const r = parseAngularRoutes(folder).map(r => r.path);

console.table(r);
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"commit:select": "npx git-cz",
"build-bazel": "bazel build //...",
"test-bazel": "bazel test //...",
"gp": "npx tsc gp && node gp",
"compile-scully-watch": "ibazel build //scully:compile"
},
"private": true,
Expand Down Expand Up @@ -65,7 +66,7 @@
"express": "^4.17.1",
"front-matter": "^3.0.2",
"fs-extra": "^8.1.0",
"guess-parser": "^0.4.13",
"guess-parser": "^0.4.14",
"husky": "^4.0.0-beta.5",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
Expand Down
14 changes: 14 additions & 0 deletions projects/sampleBlog/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#352cea",
"activityBar.activeBorder": "#3a0806",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#3a0806",
"activityBarBadge.foreground": "#e7e7e7",
"statusBar.background": "#1d15ce",
"statusBarItem.hoverBackground": "#352cea",
"statusBar.foreground": "#e7e7e7"
},
"peacock.color": "#1d15ce"
}
116 changes: 0 additions & 116 deletions scully.config.js

This file was deleted.

17 changes: 16 additions & 1 deletion scully.sampleBlog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.config = {
/** outDir is where the static distribution files end up */
outDir: './dist/static',
// hostName: '0.0.0.0',
extraRoutes: [''],
extraRoutes: ['', '/user/:userId/post/:postId'],
routes: {
'/demo/:id': {
type: 'extra',
Expand All @@ -34,6 +34,21 @@ exports.config = {
property: 'id',
},
},
'/user/:userId/post/:postId': {
// Type is mandatory
type: 'json',
/**
* Every parameter in the route must exist here
*/
userId: {
url: 'https://jsonplaceholder.typicode.com/users',
property: 'id',
},
postId: {
url: 'https://jsonplaceholder.typicode.com/posts?userId=${userId}',
property: 'id',
},
},
'/nouser/:userId/:friendCode': {
// Type is mandatory
type: 'json',
Expand Down
2 changes: 1 addition & 1 deletion scully/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully",
"version": "0.0.61",
"version": "0.0.62",
"description": "Scully CLI",
"repository": {
"type": "GIT",
Expand Down