Skip to content

Commit

Permalink
build: change build strategy remove preconstruct (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
omermorad authored Dec 14, 2021
1 parent a86d0af commit bfc3ae2
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 291 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"readme": "https://github.com/omermorad/mockingbird/README.md",
"scripts": {
"prepare": "husky install",
"postinstall": "preconstruct dev && lerna run build",
"build": "tsc --noEmit && preconstruct build",
"build": "lerna run build",
"watch": "lerna exec -- watch",
"test": "jest --runInBand && yarn test:sample",
"test:sample": "export NODE_ENV=test && cd sample/mockingbird-typeorm && yarn test",
Expand All @@ -60,7 +59,6 @@
"@commitlint/config-conventional": "^15.0.0",
"@commitlint/config-lerna-scopes": "^12.1.4",
"@manypkg/cli": "^0.19.1",
"@preconstruct/cli": "^2.1.5",
"@types/faker": "^5.5.7",
"@types/jest": "26.0.24",
"@types/node": "^12.20.15",
Expand Down
1 change: 1 addition & 0 deletions packages/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
1 change: 0 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"license": "MIT",
"description": "Mockingbird Common Package",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"main": "dist/index.js",
"contributors": [
{
Expand Down
3 changes: 1 addition & 2 deletions packages/common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "../tsconfig.build.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "src",
"baseUrl": ".",
"outDir": "dist",
"sourceMap": false,
"target": "es6"
},
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions packages/logger/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
5 changes: 3 additions & 2 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"version": "1.0.0-rc.1",
"license": "MIT",
"description": "Mockingbird Logger Package",
"main": "dist/mockingbird-logger.cjs.js",
"module": "dist/mockingbird-logger.esm.js",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"contributors": [
{
"name": "Omer Morad",
Expand All @@ -21,6 +20,8 @@
},
"readme": "https://github.com/omermorad/mockingbird/tree/refactor/master/packages/logger/README.md",
"scripts": {
"prebuild": "npx rimraf dist",
"build": "tsc",
"watch": "tsc --watch",
"lint": "eslint '{src,test}/**/*.ts'",
"lint:fix": "eslint '{src,test}/**/*.ts' --fix"
Expand Down
4 changes: 3 additions & 1 deletion packages/logger/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "../tsconfig.build.json",
"compilerOptions": {
"rootDir": "./src",
"rootDir": "src",
"baseUrl": ".",
"outDir": "dist",
"target": "es6"
},
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions packages/mockingbird/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
6 changes: 4 additions & 2 deletions packages/mockingbird/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "mockingbird",
"version": "3.0.0-rc.2",
"license": "MIT",
"main": "dist/mockingbird.cjs.js",
"module": "dist/mockingbird.esm.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"description": "Super Simple, Yet Powerful, TypeScript Library for Creating Mocks. Mockingbird allows you to create class mocks like a breeze with a simple yet powerful @Mock decorator",
"keywords": [
"faker",
Expand Down Expand Up @@ -37,6 +37,8 @@
},
"readme": "https://github.com/omermorad/mockingbird/README.md",
"scripts": {
"prebuild": "npx rimraf dist",
"build": "tsc",
"watch": "tsc --watch",
"test": "jest --runInBand --verbose",
"lint": "eslint '{src,test}/**/*.ts'",
Expand Down
2 changes: 2 additions & 0 deletions packages/mockingbird/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "../tsconfig.build.json",
"compilerOptions": {
"rootDir": "src",
"baseUrl": ".",
"outDir": "dist",
"target": "es6"
},
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions packages/parser/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
6 changes: 4 additions & 2 deletions packages/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@mockingbird/parser",
"version": "4.0.0-rc.2",
"license": "MIT",
"main": "dist/mockingbird-parser.cjs.js",
"module": "dist/mockingbird-parser.esm.js",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"description": "Mockingbird Parser Package",
"contributors": [
{
Expand All @@ -20,6 +20,8 @@
},
"readme": "https://github.com/omermorad/mockingbird/tree/refactor/master/packages/parser/README.md",
"scripts": {
"prebuild": "npx rimraf dist",
"build": "tsc",
"watch": "tsc --watch",
"test": "jest --runInBand --verbose",
"lint": "eslint '{src,test}/**/*.ts'",
Expand Down
3 changes: 2 additions & 1 deletion packages/parser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": "../tsconfig.build.json",
"compilerOptions": {
"experimentalDecorators": true,
"rootDir": "src",
"baseUrl": ".",
"outDir": "dist",
"target": "es6"
},
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions packages/reflect/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src';
6 changes: 4 additions & 2 deletions packages/reflect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "4.0.0-rc.2",
"license": "MIT",
"description": "Mockingbird Reflect Package",
"main": "dist/mockingbird-reflect.cjs.js",
"module": "dist/mockingbird-reflect.esm.js",
"types": "dist/index.d.ts",
"main": "dist/index.js",
"contributors": [
{
"name": "Omer Morad",
Expand All @@ -20,6 +20,8 @@
},
"readme": "https://github.com/omermorad/mockingbird/tree/refactor/master/packages/reflect/README.md",
"scripts": {
"prebuild": "npx rimraf dist",
"build": "tsc",
"watch": "tsc --watch",
"test": "jest --runInBand --verbose",
"lint": "eslint '{src,test}/**/*.ts'",
Expand Down
6 changes: 4 additions & 2 deletions packages/reflect/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": "../tsconfig.build.json",
"compilerOptions": {
"rootDir": "./src",
"target": "es2018"
"rootDir": "src",
"baseUrl": ".",
"outDir": "dist",
"target": "es6"
},
"exclude": [
"index.ts",
Expand Down
5 changes: 3 additions & 2 deletions packages/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"isolatedModules": true,
"incremental": false,
"sourceMap": true
"sourceMap": false,
"target": "es6"
},
"exclude": [
"**/jest.config.js",
"node_modules",
"dist",
"test",
Expand Down
Loading

0 comments on commit bfc3ae2

Please # to comment.