2.1.1 • Published 3 years ago
upts v2.1.1
UPTS
A build tool created on top of Roolup. For TypeScript and React Typescript to .JS
How to use
Install the package: npm i upts rollup -D
or yarn add upts rollup -D
- Add the configuration of your package
{
"exports": {
".": {
"import": "./dist/index.module.js",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"unpkg": "dist/index.min.js",
"module": "dist/index.module.js",
"source": "src/index.ts", // use "src/index.tsx" for tsx
"types": "./dist/@types/index.d.ts",
"files": [
"dist",
"types"
],
}
- Create the
rollup.config.js
file with content
import { build } from "upts";
import pkg from "./package.json";
export default build(pkg);
- Execute:
rollup -c
on terminal.
Recomendations
Add two scripts on package.json:
{
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w"
}
}