Skip to content

Commit

Permalink
feat: new exports
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Feb 7, 2022
1 parent 051c672 commit 38d97fe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
1 change: 0 additions & 1 deletion js/index.js
Expand Up @@ -4,7 +4,6 @@ export * from "./api";
export * from "./base";
export * from "./data";
export * from "./express";
export * from "./fastify";
export * from "./rollup";
export * from "./util";

Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -19,11 +19,6 @@
},
"license": "Apache-2.0",
"author": "Hive Solutions",
"main": "dist/yonius.cjs.js",
"unpkg": "dist/yonius.umd.js",
"module": "dist/yonius.esm.js",
"browser": "dist/yonius.umd.js",
"types": "types/index.d.ts",
"exports": {
".": {
"import": "./dist/yonius.esm.js",
Expand All @@ -38,6 +33,11 @@
"typings": "./types/fastify/index.d.ts"
}
},
"main": "dist/yonius.cjs.js",
"unpkg": "dist/yonius.umd.js",
"module": "dist/yonius.esm.js",
"browser": "dist/yonius.umd.js",
"types": "types/index.d.ts",
"typesVersions": {
"*": {
"*": [
Expand Down
28 changes: 28 additions & 0 deletions rollup.config.js
Expand Up @@ -79,6 +79,34 @@ export default [
})
]
},
{
input: "js/fastify/index.js",
external: ["node-fetch", "fs", "process", "path"],
output: [
{
file: "dist/yonius.fastify.cjs.js",
banner: banner,
format: "cjs",
exports: "named",
sourcemap: true
},
{
file: "dist/yonius.fastify.esm.js",
banner: banner,
format: "es",
sourcemap: true
}
],
plugins: [
json(),
commonjs(),
resolve({
customResolveOptions: {
paths: nodePath
}
})
]
},
{
input: "types/index.d.ts",
output: [{ file: "dist/yonius.d.ts", format: "es" }],
Expand Down

0 comments on commit 38d97fe

Please sign in to comment.