Browse Source
Merge pull request #15038 from abpframework/mini-update/add-dist-schematic
Add dist schematic
pull/15040/head
Muhammed Altuğ
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
6 deletions
-
npm/ng-packs/package.json
-
npm/ng-packs/scripts/mock-schematic/mock-schematic-json.ts
|
|
|
@ -33,11 +33,12 @@ |
|
|
|
"postinstall": "node ./decorate-angular-cli.js && yarn compile:ivy", |
|
|
|
"build:schematics": "cd scripts && yarn && yarn build:schematics && cd ..", |
|
|
|
"dev:schematics": "tsc -p packages/schematics/tsconfig.json -w", |
|
|
|
"mock:schematics": "cd scripts/mock-schematic && yarn && yarn start", |
|
|
|
"debug:schematics": "./node_modules/.bin/ng g ./packages/schematics/src/collection.json:proxy-add --module __default --apiName __default --source __default --target __default --url https://localhost:44305 --serviceType application", |
|
|
|
"debug:schematics-dist": "./node_modules/.bin/ng g ./dist/packages/schematics/collection.json:proxy-add --module __default --apiName __default --source __default --target __default --url http://localhost:4300 --service-type application", |
|
|
|
"ci": "yarn affected:lint && yarn affected:build && yarn affected:test", |
|
|
|
"lerna": "lerna", |
|
|
|
"migrate-nx": "yarn nx migrate --run-migrations", |
|
|
|
"mock:schematics": "cd scripts/mock-schematic && yarn && yarn start", |
|
|
|
"debug:schematics": "./node_modules/.bin/ng g ./packages/schematics/src/collection.json:proxy-add --module __default --apiName __default --source __default --target __default --url https://localhost:44305 --serviceType application" |
|
|
|
"migrate-nx": "yarn nx migrate --run-migrations" |
|
|
|
}, |
|
|
|
"private": true, |
|
|
|
"devDependencies": { |
|
|
|
|
|
|
|
@ -1,11 +1,15 @@ |
|
|
|
import express, { Request, Response } from 'express'; |
|
|
|
import express, { Request } from 'express'; |
|
|
|
import fs from 'fs'; |
|
|
|
|
|
|
|
const port = 4300; |
|
|
|
const app = express(); |
|
|
|
|
|
|
|
app.get('/api/abp/api-definition', async (req: Request, res: Response) => { |
|
|
|
const file = fs.readFileSync('./api-definition.json'); |
|
|
|
app.get('/', function(req:any, res:any){ |
|
|
|
res.redirect('/api/abp/api-definition'); |
|
|
|
}); |
|
|
|
|
|
|
|
app.get('/api/abp/api-definition', async (req: Request, res: any) => { |
|
|
|
const file = fs.readFileSync('./api-definition.json'); |
|
|
|
res.contentType('application/json'); |
|
|
|
res.send(file); |
|
|
|
}); |
|
|
|
|