As a designer I am totally new to magento 2 file structure and preprocessing.
As far as my understanding is correct, magento uses less files and uses gruntfile.js for preprocessing so that via livereload extension we can runtime compile our _extend.less file.
I had confgured gruntfile for this and after these commands what I get is four files in pub/static/frontend/vendorname/customthemename/en_us/css/ directory that were not before grunt configuration.
Now inside app/design/frontend/vendorname/customthemename/css/web/css/source directory I have my own _extend.less file for extending default magento library variables,mixins etc.
Currently there are two questions in my mind.
Now as grunt needs this root source files in pub directory for prepeocessing, what if I accidently run any developer command for magento.
Is it that I will lose this structure or that by putting any .less (imported via _extend.less) file in app folder will manage this?
grunt clean:theme command clean all content inside pub/static/frontend/vendorname/customthemename/en_us.
How to not lose those all after configuring grunt? Now I am little worried about losing any static content after configuring grunt.
Second question is that to install grunt, I have to install all node modules via command
npm install. Now that I have done all process in my local pc, this is fine but how to do the same (i.e. install all node modules) for grunt in server?