Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Grunt with Django: Best Workflow

I have inherited a Django site from another person and I'm trying to use Grunt.js alongside it. My app directory structure looks like:

app_name
 |__ pages
 |__ settings
 |__ static
     |__ config.rb
     |__ css
     |__ Gruntfile.js
     |__ img
     |__ js
     |__ node_modules
     |__ package.json
     |__ sass
 |__ templates
 |__ etc

Should I be using Grunt within the static directory? - i.e. Is it best practice to use Grunt in the root of the folder (in this case alongside app_name)?

When I upload my css/scripts to production, I don't want the Gruntfile.js to be visible.

like image 492
cusejuice Avatar asked Apr 30 '14 06:04

cusejuice


1 Answers

You can symlink Gruntfile and node_modules from upper folders to current, this way grunt build will works well and you will not store cfg file in static folder. Other way is to exclude it with your packaging system like deb or rpm.

like image 167
greggyNapalm Avatar answered Oct 19 '22 23:10

greggyNapalm