2
0

👷 Transpile components for better DX

This commit is contained in:
Baptiste Arnaud
2022-09-18 09:46:42 +02:00
committed by Baptiste Arnaud
parent 898367a33b
commit c1dd4d403e
147 changed files with 343 additions and 485 deletions

View File

@@ -7,7 +7,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "pnpm rollup -c",
"dx": "pnpm rollup -c --watch",
"dev": "pnpm rollup -c --watch",
"lint": "eslint --fix -c ./.eslintrc.js \"./src/**/*.ts*\""
},
"dependencies": {
@@ -26,6 +26,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.0.1",
"@rollup/plugin-typescript": "8.5.0",
"@types/node": "18.7.16",
"@types/qs": "^6.9.7",
"@types/react": "18.0.19",
"@types/react-phone-number-input": "^3.0.14",

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"lib": ["ES2015", "DOM"],
"lib": ["ES2017", "DOM"],
"target": "es5",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,

View File

@@ -5,7 +5,7 @@
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"dx": "dotenv -e ../../apps/builder/.env.local prisma db push && pnpm generate:schema && pnpm start:sutdio ",
"dev": "dotenv -e ../../apps/builder/.env.local prisma db push && pnpm generate:schema && pnpm start:sutdio ",
"build": "pnpm generate:schema",
"start:sutdio": "dotenv -e ../../apps/builder/.env.local -v BROWSER=none prisma studio",
"generate:schema": "dotenv -e ../../apps/builder/.env.local prisma generate",

View File

@@ -1,26 +1,15 @@
{
"name": "models",
"version": "1.0.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"main": "./index.ts",
"types": "./index.ts",
"license": "AGPL-3.0-or-later",
"private": true,
"scripts": {
"build": "pnpm rollup -c",
"dx": "pnpm rollup -c --watch"
},
"dependencies": {
"zod": "^3.19.0"
},
"devDependencies": {
"typescript": "^4.8.3",
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-node-resolve": "^14.0.1",
"@rollup/plugin-typescript": "8.5.0",
"rollup": "2.79.0",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"next": "12.3.0",
"db": "workspace:*"
},

View File

@@ -1,38 +0,0 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'
import dts from 'rollup-plugin-dts'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
const packageJson = require('./package.json')
export default [
{
input: 'src/index.ts',
output: [
{
file: packageJson.main,
format: 'cjs',
sourcemap: true,
inlineDynamicImports: true,
},
{
file: packageJson.module,
format: 'esm',
sourcemap: true,
inlineDynamicImports: true,
},
],
plugins: [
peerDepsExternal(),
resolve(),
commonjs(),
typescript({ tsconfig: './tsconfig.json' }),
],
},
{
input: 'dist/esm/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'esm' }],
plugins: [dts()],
},
]

View File

@@ -1,3 +1,4 @@
export * from './utils'
export * from './storage'
export * from './sendEmailNotification'
export * from './encryption'

View File

@@ -1,6 +1,4 @@
export * from './utils'
export * from './api'
export * from './encryption'
export * from './results'
export * from './pricing'
export * from './playwright'

View File

@@ -3,27 +3,15 @@
"version": "1.0.0",
"license": "AGPL-3.0-or-later",
"private": true,
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "pnpm rollup -c",
"dx": "pnpm rollup -c --watch"
},
"main": "./index.ts",
"types": "./index.ts",
"devDependencies": {
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-node-resolve": "^14.0.1",
"@rollup/plugin-typescript": "8.5.0",
"@types/nodemailer": "6.4.5",
"aws-sdk": "2.1213.0",
"db": "workspace:*",
"models": "workspace:*",
"next": "12.3.0",
"nodemailer": "^6.7.8",
"rollup": "2.79.0",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"tslib": "^2.4.0",
"typescript": "^4.8.3"
},
"peerDependencies": {

View File

@@ -1,38 +0,0 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import typescript from '@rollup/plugin-typescript'
import dts from 'rollup-plugin-dts'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
const packageJson = require('./package.json')
export default [
{
input: 'src/index.ts',
output: [
{
file: packageJson.main,
format: 'cjs',
sourcemap: true,
inlineDynamicImports: true,
},
{
file: packageJson.module,
format: 'esm',
sourcemap: true,
inlineDynamicImports: true,
},
],
plugins: [
peerDepsExternal(),
resolve(),
commonjs(),
typescript({ tsconfig: './tsconfig.json' }),
],
},
{
input: 'dist/esm/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'esm' }],
plugins: [dts()],
},
]