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'; import { Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
export class AutoCRUDController { export class SkeletonCRUDController {
@Post() @Post()
create() {} create() {}

View File

@ -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": [

View File

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

View File

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

View File

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

View File

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