Skip to content

Commit

Permalink
v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sw-yx committed Jul 9, 2019
1 parent b3ec916 commit 78db2dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ program
.action(function(cmd, options) {
console.log("netlify-lambda: Building functions")

const { config: userWebpackConfig, babelrc: useBabelrc = true } = program
// const { config: userWebpackConfig, babelrc: useBabelrc = true } = program
build
.run(cmd, { userWebpackConfig, useBabelrc })
.run(cmd)
// .run(cmd, { userWebpackConfig, useBabelrc })
.then(function(stats) {
console.log(stats.toString({ color: true }))
})
Expand Down
8 changes: 5 additions & 3 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ const cpy = require("cpy")
const fs = require("fs")
const path = require("path")
const cmd = hasYarn() ? "yarn" : "npm"
;(async () => {
const { stdout } = await execa(cmd, ["build"])

module.exports.run = async (arg) => {
console.log({ arg })
const { stdout } = await execa(cmd, ["next", "build"])
console.log(stdout)
// build complete
const nextConfig = require(path.join(process.cwd(), "next.config.js"))
Expand All @@ -18,4 +20,4 @@ const cmd = hasYarn() ? "yarn" : "npm"
await cpy([`${distDir}/serverless/pages/*`], fnsfolder)
console.log("Files copied!")
//
})()
}

0 comments on commit 78db2dd

Please sign in to comment.