banderson / generator-redux

CLI tools for Redux: next-gen functional Flux/React with devtools
252 stars 36 forks source link

Major Bug: package.json dependencies and devDependencies aren't quoted correctly #30

Closed kevinold closed 9 years ago

kevinold commented 9 years ago

I've just noticed that on the latest master (e29aa42d4ee3469ac073588530ebcfda42b5f197) the package.json generated does not have the quotes correct:

Notice how the entire line is quoted instead of quotes being around the key and then the value:

  "dependencies": [
    "babel-core: ^5.0.0",
    "es6-promise: ^3.0.2",
    "whatwg-fetch: ^0.10.1",
    "lodash: ^3.10.1",
    "react: ^0.14.0",
    "react-dom: ^0.14.0",
    "redux: ^3.0.4",
    "react-redux: ^4.0.0",
    "redux-devtools: ^2.1.5",
    "redux-thunk: ^1.0.0"
  ],
  "devDependencies": [
    "webpack: ^1.12.4",
    "webpack-dev-server: ^1.12.1",
    "css-loader: ^0.22.0",
    "babel-core: ^5.0.0",
    "babel-loader: ^5.0.0",
    "react-hot-loader: ^1.3.0",
    "style-loader: ^0.13.0",
    "extract-text-webpack-plugin: ^0.9.1",
    "cssnext-loader: ^1.0.1"
  ]
kevinold commented 9 years ago

The main issue is that both dependencies and devDependencies are arrays in package.json and thus prevents installing any additional modules via "npm --save" or "npm --save-dev"

kevinold commented 9 years ago

@geekjuice ^^ any ideas on how we could fix so that these are objects?

geekjuice commented 9 years ago

Heh... that was probably a typo on my end I didn't test properly :sweat: ... I'll create an PR to fix this