Closed Wtower closed 8 years ago
Note: For any changes, update readme appropriately.
After several tests, some findings:
django-bower
works brilliantly, with any limitations bower may have. Downside is that it requires node.js.django-pipeline
not workingdjango-compressor
not covering requirements (provide template tags, compress to file)Further findings:
django-pipeline
still not working with no indication why.django-bower
works.Other possible features
A note on serving minified packages vs cdn.
Regarding grunt, a separate app would be necessary:
Only the first app in INSTALLED_APPS
seems to override a command. Therefore to override the runserver command it has to happen before django.contrib.staticfiles
. A separate app will keep front-end JS completely off 9cms.
Features:
Further findings:
Updates:
django-gulp
does not integrate well with some IDEs including PyCharm because nvm is not called when running server.gulp build --production
.Use the following stack:
Method:
package.json
and gulpfile.js
.Setup gulp:
sudo apt-get install imagemagick
npm install -g gulp-cli
npm install -D gulp yargs gulp-utilbrowserify gulp-concat gulp-minify-css gulp-autoprefixer del gulp-notify gulp-if\
watchify vinyl-source-stream vinyl-buffer gulp-uglify gulp-sass gulp-postcss gulp-sourcemaps\
gulp-less jshint gulp-jshint jshint-stylish gulp-image-resize event-stream gulp-rename\
concurrent-transform gulp-changed gulp-mocha gulp-google-webfonts
npm install -S jquery bootstrap lightbox2 normalize.css font-awesome puse-icons-feather
In case gulp watch not working with ENOSPC
, increase the inotify watch limit:
# echo fs.inotify.max_user_watches=16384 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p # bash
$ echo fs.inotify.max_user_watches=16384 | sudo tee -a /etc/sysctl.conf; and sudo sysctl -p # fish
Published gulpfile-ninecms.
Update readme.
As of v0.6.0 (f9a7f8152cab2a295a46f5a342c9fcbcbf8d33c4) the previous (totally basic) package management was removed in favour to other standard solutions. This issue deals with this and how to incorporate them with NineCMS.
Some preliminary suggestions include:
django-pipeline
django-compressor
require.js
with django-require