Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Fix WithNodeJs opt
Browse files Browse the repository at this point in the history
Currently, the only way to generate a project with node is to use
Webpack. If the --skip-webpack flag is used, WithNodeJs must be false
then.
  • Loading branch information
stanislas-m committed Jul 3, 2019
1 parent 67e981f commit 076d366
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion buffalo/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ var xbuildCmd = &cobra.Command{
ctx, cancel := sigtx.WithCancel(context.Background(), os.Interrupt)
defer cancel()

pwd, _ := os.Getwd()
pwd, err := os.Getwd()
if err != nil {
return err
}

buildOptions.App = meta.New(pwd)
if len(buildOptions.bin) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions buffalo/cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"path/filepath"
"strings"

"github.com/gobuffalo/buffalo/genny/docker"
pop "github.com/gobuffalo/buffalo-pop/genny/newapp"
"github.com/gobuffalo/buffalo/genny/assets/standard"
"github.com/gobuffalo/buffalo/genny/assets/webpack"
"github.com/gobuffalo/buffalo/genny/ci"
"github.com/gobuffalo/buffalo/genny/docker"
"github.com/gobuffalo/buffalo/genny/newapp/api"
"github.com/gobuffalo/buffalo/genny/newapp/core"
"github.com/gobuffalo/buffalo/genny/newapp/web"
Expand Down Expand Up @@ -89,7 +89,7 @@ func parseNewOptions(args []string) (newAppOptions, error) {
app.WithPop = !viper.GetBool("skip-pop")
app.WithWebpack = !viper.GetBool("skip-webpack")
app.WithYarn = !viper.GetBool("skip-yarn")
app.WithNodeJs = app.WithYarn || app.WithWebpack
app.WithNodeJs = app.WithWebpack
app.AsWeb = !app.AsAPI

if app.AsAPI {
Expand Down

0 comments on commit 076d366

Please sign in to comment.