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