Skip to content

Commit

Permalink
fix default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
jalal246 committed Mar 19, 2020
1 parent dde327b commit 990b218
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
7 changes: 1 addition & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
import { error } from "@mytools/print";
import start from "./rollup.config";

start().catch(err => {
error(err);
});
export { default } from "./rollup.config";
38 changes: 23 additions & 15 deletions src/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async function bundlePackage({
}

async function start(...params) {
console.log("start -> params", ...params);
const {
silent: isSilent,
format,
Expand All @@ -84,23 +85,30 @@ async function start(...params) {

setIsSilent(isSilent);

const { sorted, pkgInfo } = initBuild(buildName, ...paths)(...packagesNames);

const bundleOpt = getBundleOpt(format, isMinify);

sorted.forEach(json => {
const { name } = json;

bundleOpt.forEach(({ IS_PROD, BUILD_FORMAT }) => {
bundlePackage({
plugins,
flags: { IS_PROD, IS_SILENT: isSilent },
BUILD_FORMAT,
json,
pkgInfo: pkgInfo[name]
try {
const { sorted, pkgInfo } = initBuild(
buildName,
...paths
)(...packagesNames);

const bundleOpt = getBundleOpt(format, isMinify);

await sorted.forEach(json => {
const { name } = json;

bundleOpt.forEach(({ IS_PROD, BUILD_FORMAT }) => {
bundlePackage({
plugins,
flags: { IS_PROD, IS_SILENT: isSilent },
BUILD_FORMAT,
json,
pkgInfo: pkgInfo[name]
});
});
});
});
} catch (err) {
error(err);
}
}

export default start;

0 comments on commit 990b218

Please sign in to comment.