Skip to content
Merged
2 changes: 1 addition & 1 deletion schematics/scully/package-lock.json

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

2 changes: 1 addition & 1 deletion schematics/scully/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/init",
"version": "0.0.4",
"version": "0.0.5",
"description": "Add scully to your angular app",
"repository": {
"type": "GIT",
Expand Down
5 changes: 3 additions & 2 deletions schematics/scully/src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {apply, forEach, mergeWith, Rule, SchematicContext, Source, Tree} from '@angular-devkit/schematics';
import {strings} from '@angular-devkit/core';

interface Data {
name: string;
Expand All @@ -7,10 +8,10 @@ interface Data {
}

export function addRouteToScullyConfig(scullyConfigJs: string, data: Data) {
const addRoute = `\n '/${data.name}/:${data.slug}': {
const addRoute = `\n '/${strings.dasherize(data.name)}/:${data.slug}': {
type: '${data.type}',
${data.slug}: {
folder: "./${data.name}"
folder: "./${strings.dasherize(data.name)}"
}
},`;
let output;
Expand Down