Doubts about grunt

1

I'm not very experienced in javascript and wanted to know what a production version would be. I'm using Grunt to concatenate and minify my application in order to make it smaller. The files generated by this process (app.js, app.min.js) will stop inside the dist / js / folder.

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 into production, we throw the whole APP folder or put it in the grunt process, to copy the contents of images, views and generate a version within dist, which would be independent of other resources

    
asked by anonymous 10.02.2016 / 13:49

1 answer

2

When using Grunt , you are generating the packages for different environments. The folder you put into production is dist the App folder is a development environment, it would be good if you include a task to send to the dist folder of the images as well.

About Grunt.

Think of Grunt as a task automator. Some tasks take time and can lead to errors Grunt, will automate this. In your Gruntfile.js you will define which tasks you can also modify and include other tasks, including modifying the output of the production files.

If you need the times for a test package and others for production, you can also define this, go to your taste and also a lot of queries to the Grunt documentation

    
10.02.2016 / 14:22