mirror of
https://github.com/aditama-labs/nest-autocrud.git
synced 2024-11-24 21: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';
|
||||
|
||||
export class AutoCRUDController {
|
||||
export class SkeletonCRUDController {
|
||||
@Post()
|
||||
create() {}
|
||||
|
@ -10,7 +10,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"target": "es6",
|
||||
"sourceMap": false,
|
||||
"outDir": "../../dist/libs/autocrud",
|
||||
"outDir": "../../dist/libs/skeleton",
|
||||
"skipLibCheck": true,
|
||||
},
|
||||
"include": [
|
@ -7,13 +7,13 @@
|
||||
"webpack": true
|
||||
},
|
||||
"projects": {
|
||||
"autocrud": {
|
||||
"skeleton": {
|
||||
"type": "library",
|
||||
"root": "libs/autocrud",
|
||||
"root": "libs/skeleton",
|
||||
"entryFile": "index",
|
||||
"sourceRoot": "libs/autocrud/src",
|
||||
"sourceRoot": "libs/skeleton/src",
|
||||
"compilerOptions": {
|
||||
"tsConfigPath": "libs/autocrud/tsconfig.lib.json"
|
||||
"tsConfigPath": "libs/skeleton/tsconfig.lib.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"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\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "nest start --watch",
|
||||
@ -72,7 +72,7 @@
|
||||
"<rootDir>/libs/"
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"^@autocrud/autocrud(|/.*)$": "<rootDir>/libs/autocrud/src/$1"
|
||||
"^@autocrud/skeleton(|/.*)$": "<rootDir>/libs/skeleton/src/$1"
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
},
|
||||
"moduleNameMapper": {
|
||||
"@autocrud/autocrud/(.*)": "<rootDir>/../libs/autocrud/src/$1",
|
||||
"@autocrud/autocrud": "<rootDir>/../libs/autocrud/src"
|
||||
"@autocrud/skeleton/(.*)": "<rootDir>/../libs/skeleton/src/$1",
|
||||
"@autocrud/skeleton": "<rootDir>/../libs/skeleton/src"
|
||||
}
|
||||
}
|
@ -18,11 +18,11 @@
|
||||
"forceConsistentCasingInFileNames": false,
|
||||
"noFallthroughCasesInSwitch": false,
|
||||
"paths": {
|
||||
"@autocrud/autocrud": [
|
||||
"libs/autocrud/src"
|
||||
"@autocrud/skeleton": [
|
||||
"libs/skeleton/src"
|
||||
],
|
||||
"@autocrud/autocrud/*": [
|
||||
"libs/autocrud/src/*"
|
||||
"@autocrud/skeleton/*": [
|
||||
"libs/skeleton/src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user