1
I’m not very experienced in javascript and wanted to know what would be a production version. I’m using the Grunt to concatenate and minify my application in order to make it smaller. The files generated by this process (app.js, app.min.js) end up inside the folder dist/js/.
So we have this structure:
APP
| -- dist -- js -- app.js / app.min.js
| -- images
| -- scripts / controllers / services / etc
| -- bower_components / dependencias
| -- node_modules / ...
| -- views
My question is: when we put this in production, we play the entire APP folder or put it in the process of Grunt, for it to copy the content of images, views and generate a version within dist, in which would be independent of other resources
So dist should contain all my dependencies, including the imported scripts?
– Paulo Gustavo
Exactly, if you are not using a CDN, you should put it in some other folder and concatenate and minify the files and configure Grunt to leave everything in your folder
dist
. I’m going to link a repository to Github, which I used Grunt to check. It’s one of my first uses with Grunt, but you can get an idea. https://github.com/flpms/MQBC– flpms
Thanks for the help! I’ll try to see ways to copy the dependency files, like the Angularjs inside the Bower folder. Thanks anyway
– Paulo Gustavo
So in this case you can reference the Angular file in your gruntfile.
– flpms
But in this case, I would have to for each file, manually reference, right?
– Paulo Gustavo
Yes. I don’t know if Angular already provides this in Gruntfile.
– flpms