survivejs / react-book

From apprentice to master (CC BY-NC-ND)
https://survivejs.com/react/introduction/
2.02k stars 366 forks source link

Developing with Webpack - #379

Closed vaichidrewar closed 8 years ago

vaichidrewar commented 8 years ago

In the chapter 'Developing with Webpack' Subsection: 'Adding a Build Shortcut' Book says to use 'npm run' shorcut. But it worked only when I ran 'npm run build' . Is this an error in the book?

bebraw commented 8 years ago

I will make that a little clearer, thanks.

The idea is that you can run any package.json script through npm run. Cases like npm start and npm test are exceptions. You can execute these too through npm run, though, so npm start and npm run start would be equivalent.