feat: change the base to skeleton

This commit is contained in:
Supan Adit Pratama 2024-10-26 17:41:36 +07:00
parent 191b69ad46
commit e291d489e3
12 changed files with 15 additions and 50 deletions

View File

@ -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 {}

View File

@ -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();
});
});

View File

@ -1,4 +0,0 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class AutocrudService {}

View File

@ -1,4 +0,0 @@
import 'reflect-metadata';
export * from './autocrud.module';
export * from './autocrud.service';
export * from './autocrud.controller';

View File

@ -0,0 +1 @@
export * from './skeleton-crud.controller';

View File

@ -1,6 +1,6 @@
import { Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
export class AutoCRUDController {
export class SkeletonCRUDController {
@Post()
create() {}

View File

@ -10,7 +10,7 @@
"experimentalDecorators": true,
"target": "es6",
"sourceMap": false,
"outDir": "../../dist/libs/autocrud",
"outDir": "../../dist/libs/skeleton",
"skipLibCheck": true,
},
"include": [

View File

@ -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"
}
}
}

View File

@ -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"
}
}
}

View File

@ -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"
}
}

View File

@ -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/*"
]
}
}