mirror of https://github.com/abpframework/abp.git
8 changed files with 58 additions and 9 deletions
@ -0,0 +1,20 @@ |
|||||
|
import { SchematicContext, Tree } from '@angular-devkit/schematics'; |
||||
|
import { |
||||
|
buildDefaultPath, |
||||
|
createProxyIndexGenerator, |
||||
|
removeDefaultPlaceholders, |
||||
|
resolveProject, |
||||
|
} from '../../utils'; |
||||
|
|
||||
|
export default function(schema: { target?: string }) { |
||||
|
const params = removeDefaultPlaceholders(schema); |
||||
|
|
||||
|
return async (host: Tree, _context: SchematicContext) => { |
||||
|
const target = await resolveProject(host, params.target!); |
||||
|
const targetPath = buildDefaultPath(target.definition); |
||||
|
|
||||
|
const generateIndex = createProxyIndexGenerator(targetPath); |
||||
|
|
||||
|
return generateIndex(host); |
||||
|
}; |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
{ |
||||
|
"$schema": "http://json-schema.org/schema", |
||||
|
"id": "SchematicsAbpIndexProxy", |
||||
|
"title": "ABP Index Proxy Schema", |
||||
|
"type": "object", |
||||
|
"properties": { |
||||
|
"target": { |
||||
|
"description": "Target Angular project to place the generated code", |
||||
|
"type": "string", |
||||
|
"$default": { |
||||
|
"$source": "argv", |
||||
|
"index": 0 |
||||
|
}, |
||||
|
"x-prompt": "Plese enter target Angular project to place the generated code. (default: workspace \"defaultProject\")" |
||||
|
} |
||||
|
}, |
||||
|
"required": [] |
||||
|
} |
||||
Loading…
Reference in new issue