update bundling config (#36)

* update bundling config

* fix generation
This commit is contained in:
Kurt Hutten
2022-12-12 15:20:04 +11:00
committed by GitHub
parent d5a71d01fe
commit e9e2f1058a
5 changed files with 15 additions and 15 deletions

View File

@ -1 +1 @@
module.exports = { presets: ['@babel/preset-env'] };
export default { presets: ['@babel/preset-env'] };

View File

@ -2,6 +2,7 @@
"name": "@kittycad/lib",
"version": "0.0.17",
"description": "Javascript library for KittyCAD API",
"type": "module",
"keywords": [
"hardward",
"library",
@ -21,19 +22,19 @@
"exports": {
".": {
"types": "./dist/types/src",
"import": "./dist/index.es.js",
"require": "./dist/index.js"
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js"
}
},
"main": "./dist/index.js",
"module": "./dist/index.es.js",
"browser": "./dist/index.umd.js",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"browser": "./dist/umd/index.js",
"types": "./dist/types/src",
"files": [
"dist"
],
"engines": {
"node": ">= 16.13 <17"
"node": ">= 16.13 <19"
},
"devDependencies": {
"@babel/preset-env": "^7.18.9",
@ -65,7 +66,7 @@
"build:js": "rollup -c",
"build:types": "tsc --emitDeclarationOnly",
"build": "rimraf dist && npm run build:types && npm run build:js",
"gen": "ts-node --project ./tsconfig.gen.json ./src/modelsGen.ts && prettier --config .prettierrc --write ./src && prettier --config .prettierrc --write ./__tests__ && prettier --config .prettierrc --write ./kittycad.ts.patch.json",
"gen": "ts-node ./src/modelsGen.ts && prettier --config .prettierrc --write ./src && prettier --config .prettierrc --write ./__tests__ && prettier --config .prettierrc --write ./kittycad.ts.patch.json",
"test": "jest",
"tsc": "tsc"
},

View File

@ -1,7 +1,8 @@
import fsp from 'node:fs/promises';
import { OpenAPIV3 } from 'openapi-types';
import { observe, generate } from 'fast-json-patch';
import { format } from 'prettier';
import pkg from 'fast-json-patch';
const { observe, generate } = pkg;
export default async function apiGen(lookup: any) {
const spec: OpenAPIV3.Document = JSON.parse(

View File

@ -1,6 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS"
}
}

View File

@ -25,4 +25,8 @@
},
"exclude": ["node_modules", "dist"],
"include": ["src/**/*", "__tests__/**/*"],
"ts-node": {
"esm": true,
"experimentalSpecifierResolution": "node",
}
}