inrupt / generator-solid-angular

Generator for Solid Angular applications
MIT License
31 stars 12 forks source link

Build and preview the production-ready app #11

Closed ecocarlisle closed 5 years ago

ecocarlisle commented 5 years ago

Tried both npm run serve:dist and ng serve:dist and got errors.

vleput commented 5 years ago

I don't think that's an out of the box command for Angular projects: aren't you looking for ng build --prod instead? Then you can preview that using http-server for example

james-martin-jd commented 5 years ago

I think that @vleput is correct, according to the docs, there's no serve:dist option. That sounds like a grunt setup or something similar to me, not angular-cli.

That same doc link above says you can add --prod to ng serve command, so "ng serve --prod" would likely be what you want.

ecocarlisle commented 5 years ago

I'll try that. I appreciate the help. I was following the Yeoman tutorial something that was hinted on in the Getting Started instructions for Solid. In that tutorial you can preview the distribution locally with the following command: npm run serve:dist. I assumed that this was something that I could do in angular cli too. I realize now that angular-cli has webpack under the hood and its own set of commands for bundling. Thanks again!

vleput commented 5 years ago

Right, that is the command in the Yeoman tutorial which uses the Fountain Webapp Generator: http://yeoman.io/codelab/prepare-production.html This project here might have been generated with a different generator, and probably with the goal of matching regular Angular CLI generated project? @james-martin-jd