mirror of
https://github.com/aditama-labs/nest-autocrud.git
synced 2024-11-22 03:16:21 +00:00
feat: change the base to skeleton
This commit is contained in:
parent
191b69ad46
commit
e291d489e3
@ -1,10 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common';
|
|
||||||
import { AutocrudService as AutoCRUDService } from './autocrud.service';
|
|
||||||
import { AutoCRUDController } from './autocrud.controller';
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
providers: [AutoCRUDService],
|
|
||||||
exports: [AutoCRUDService],
|
|
||||||
controllers: [AutoCRUDController],
|
|
||||||
})
|
|
||||||
export class AutoCRUDModule {}
|
|
@ -1,18 +0,0 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
|
||||||
import { AutocrudService } from './autocrud.service';
|
|
||||||
|
|
||||||
describe('AutocrudService', () => {
|
|
||||||
let service: AutocrudService;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
|
||||||
providers: [AutocrudService],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
service = module.get<AutocrudService>(AutocrudService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(service).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,4 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class AutocrudService {}
|
|
@ -1,4 +0,0 @@
|
|||||||
import 'reflect-metadata';
|
|
||||||
export * from './autocrud.module';
|
|
||||||
export * from './autocrud.service';
|
|
||||||
export * from './autocrud.controller';
|
|
1
libs/skeleton/src/index.ts
Normal file
1
libs/skeleton/src/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './skeleton-crud.controller';
|
@ -1,6 +1,6 @@
|
|||||||
import { Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
|
import { Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
|
||||||
|
|
||||||
export class AutoCRUDController {
|
export class SkeletonCRUDController {
|
||||||
@Post()
|
@Post()
|
||||||
create() {}
|
create() {}
|
||||||
|
|
@ -10,7 +10,7 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"outDir": "../../dist/libs/autocrud",
|
"outDir": "../../dist/libs/skeleton",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
@ -7,13 +7,13 @@
|
|||||||
"webpack": true
|
"webpack": true
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"autocrud": {
|
"skeleton": {
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"root": "libs/autocrud",
|
"root": "libs/skeleton",
|
||||||
"entryFile": "index",
|
"entryFile": "index",
|
||||||
"sourceRoot": "libs/autocrud/src",
|
"sourceRoot": "libs/skeleton/src",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"tsConfigPath": "libs/autocrud/tsconfig.lib.json"
|
"tsConfigPath": "libs/skeleton/tsconfig.lib.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
"build:lib:autocrud": "tsc -p libs/autocrud/tsconfig.lib.json",
|
"build:lib:skeleton": "tsc -p libs/skeleton/tsconfig.lib.json",
|
||||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"",
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"",
|
||||||
"start": "nest start",
|
"start": "nest start",
|
||||||
"start:dev": "nest start --watch",
|
"start:dev": "nest start --watch",
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"<rootDir>/libs/"
|
"<rootDir>/libs/"
|
||||||
],
|
],
|
||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
"^@autocrud/autocrud(|/.*)$": "<rootDir>/libs/autocrud/src/$1"
|
"^@autocrud/skeleton(|/.*)$": "<rootDir>/libs/skeleton/src/$1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,7 +11,7 @@
|
|||||||
"^.+\\.(t|j)s$": "ts-jest"
|
"^.+\\.(t|j)s$": "ts-jest"
|
||||||
},
|
},
|
||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
"@autocrud/autocrud/(.*)": "<rootDir>/../libs/autocrud/src/$1",
|
"@autocrud/skeleton/(.*)": "<rootDir>/../libs/skeleton/src/$1",
|
||||||
"@autocrud/autocrud": "<rootDir>/../libs/autocrud/src"
|
"@autocrud/skeleton": "<rootDir>/../libs/skeleton/src"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,11 +18,11 @@
|
|||||||
"forceConsistentCasingInFileNames": false,
|
"forceConsistentCasingInFileNames": false,
|
||||||
"noFallthroughCasesInSwitch": false,
|
"noFallthroughCasesInSwitch": false,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@autocrud/autocrud": [
|
"@autocrud/skeleton": [
|
||||||
"libs/autocrud/src"
|
"libs/skeleton/src"
|
||||||
],
|
],
|
||||||
"@autocrud/autocrud/*": [
|
"@autocrud/skeleton/*": [
|
||||||
"libs/autocrud/src/*"
|
"libs/skeleton/src/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user