Skip to content

Commit

Permalink
fix: tuple folder path for build
Browse files Browse the repository at this point in the history
fix: tuple folder path for build
  • Loading branch information
Coly010 authored Jan 27, 2020
2 parents 08ab1aa + 11bf028 commit 17fd35d
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 27 deletions.
113 changes: 113 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"url": "https://github.com/coly010/notry.git"
},
"devDependencies": {
"@rollup/plugin-multi-entry": "^3.0.0",
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/commit-analyzer": "^6.3.3",
"@semantic-release/git": "^7.0.18",
Expand Down
88 changes: 61 additions & 27 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,68 @@
import ts from "rollup-plugin-typescript2";
import pkg from "./package.json";
import tuplePkg from "./tuple/package.json";

export default {
input: "./src/index.ts",
export default [
{
input: "./src/index.ts",

output: [
{
file: pkg.module,
format: "es",
exports: "named"
},
{
file: pkg.main,
format: "umd",
name: "of",
sourcemap: true,
exports: "named"
}
],
output: [
{
file: pkg.module,
format: "es",
exports: "named"
},
{
file: pkg.main,
format: "umd",
name: "no-try",
sourcemap: true,
exports: "named"
}
],

plugins: [
ts({
clean: true,
tsconfigOverride: {
compilerOptions: {
module: "esnext",
target: "esnext",
declaration: true
plugins: [
ts({
clean: true,
tsconfigOverride: {
compilerOptions: {
module: "esnext",
target: "esnext",
declaration: true
}
}
})
]
},
{
input: "./src/tuple/index.ts",

output: [
{
file: tuplePkg.module,
format: "es",
exports: "named"
},
{
file: tuplePkg.main,
format: "umd",
name: "no-try",
sourcemap: true,
exports: "named"
}
})
]
};
],

plugins: [
ts({
clean: true,
tsconfigOverride: {
compilerOptions: {
module: "esnext",
target: "esnext",
declaration: true
}
}
})
]
}
];
5 changes: 5 additions & 0 deletions tuple/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "../dist/tuple/index.js",
"module": "../dist/tuple/index.esm.js",
"types": "../dist/tuple/index.d.ts"
}

0 comments on commit 17fd35d

Please sign in to comment.