Skip to content

Commit dd6574d

Browse files
Merge pull request #11 from sumitparakh/sumit/django-support
feat(schematics): add template support
2 parents bc56bc8 + f88fdbe commit dd6574d

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

packages/nx-python/src/schematics/nx-python/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export interface NxPythonSchematicSchema {
22
name: string;
33
tags?: string;
44
directory?: string;
5+
template?: string;
56
}

packages/nx-python/src/schematics/nx-python/schema.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,32 @@
2222
"type": "string",
2323
"description": "A directory where the project is placed",
2424
"alias": "d"
25+
},
26+
"template": {
27+
"type": "string",
28+
"alias": "f",
29+
"default": "none",
30+
"x-prompt": {
31+
"message": "Which python framework would you like to use for the application?",
32+
"type": "list",
33+
"items": [
34+
{
35+
"value": "(none)",
36+
"label": "none"
37+
},
38+
{
39+
"value": "django",
40+
"label": "django [ https://www.djangoproject.com/ ]"
41+
},
42+
{
43+
"value": "flask",
44+
"label": "Flask [ https://pypi.org/project/Flask/ ]"
45+
}
46+
]
47+
}
2548
}
2649
},
27-
"required": ["name"]
28-
}
50+
"required": [
51+
"name"
52+
]
53+
}

0 commit comments

Comments
 (0)