Merge pull request #15030 from Budibase/chore/cleanup-npm-package-config
Cleanup npm package config
This commit is contained in:
commit
7b5fbf3be0
|
@ -1,6 +1,4 @@
|
|||
*
|
||||
!dist/**/*
|
||||
dist/tsconfig.build.tsbuildinfo
|
||||
!package.json
|
||||
!src/**
|
||||
!tests/**
|
||||
!package.json
|
|
@ -9,6 +9,13 @@
|
|||
"./tests": "./dist/tests/index.js",
|
||||
"./*": "./dist/*.js"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"tests": [
|
||||
"dist/tests/index.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "./tsconfig.build.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["es2020", "dom"],
|
||||
"composite": true,
|
||||
"baseUrl": "."
|
||||
},
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
*
|
||||
!dist/**/*
|
||||
dist/tsconfig.build.tsbuildinfo
|
||||
!package.json
|
|
@ -4,7 +4,7 @@
|
|||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "dist/bundle.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
"types": "src/index.ts",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MPL-2.0",
|
||||
"exports": {
|
||||
".": {
|
||||
|
@ -12,12 +12,8 @@
|
|||
"import": "./dist/bundle.mjs"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./iife": "./src/iife.js"
|
||||
"./iife": "./dist/iife.mjs"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc --emitDeclarationOnly && rollup -c",
|
||||
"dev": "rollup -cw",
|
||||
|
|
|
@ -10,8 +10,8 @@ import inject from "@rollup/plugin-inject"
|
|||
|
||||
const production = !process.env.ROLLUP_WATCH
|
||||
|
||||
const config = (format, outputFile) => ({
|
||||
input: "src/index.ts",
|
||||
const config = (input, outputFile, format) => ({
|
||||
input,
|
||||
output: {
|
||||
sourcemap: !production,
|
||||
format,
|
||||
|
@ -42,6 +42,7 @@ const config = (format, outputFile) => ({
|
|||
})
|
||||
|
||||
export default [
|
||||
config("cjs", "./dist/bundle.cjs"),
|
||||
config("esm", "./dist/bundle.mjs"),
|
||||
config("src/index.ts", "./dist/bundle.cjs", "cjs"),
|
||||
config("src/index.ts", "./dist/bundle.mjs", "esm"),
|
||||
config("src/iife.ts", "./dist/iife.mjs", "esm"),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue