Files
sphinx_rtd_theme/Gruntfile.js
Matthew Iversen b99bad47b5 Update setup.py to work, rework file structure
- rebase sass files to ./sass
- Place all theme files in ./sphinx_rtd_theme
- Grunt now uses `default` and `build` tasks
- `build` will minify css for committing / dist
- Added Gemfile and requirements.txt for python/ruby requirements
- Cleaned up Gruntfile, copying no longer needed.
- moved compass config to compass.rb

Squashed commits:

- Move out sphinx_rtd_theme to root folder
- Manifest unneeded
- Move out sass to root dir
- Remove dist from git
- Reconfigure paths
- Add requirements for sphinx
- Add gemfile for compass
- Udpate components path
- Move to static/css
- Add line for rbenv
- Require livereload, don't need copy
- Comment static path, update theme path for demo conf.py
- Add css files
- Correct name of .ruby-version...
- Update path to theme.css
- Remove unprefixed badge_only.css
- Update location of theme.js
- Update paths in Gruntfile, tasks
- re-add __init__.py, bump version
- Update setup.py to pick up version easily
- Move config.rb to compass.rb
- Correct compass import paths
- Add debug / production environment
- Commit with production built css
- Add theme.conf, get requires from requirements.txt
- rename tasks, use sphinx-build, add comments
- Fix font path
- Update css files
2013-11-04 20:37:27 +11:00

82 lines
1.9 KiB
JavaScript

module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
open : {
dev: {
path: 'http://localhost:1919'
}
},
connect: {
server: {
options: {
port: 1919,
base: 'demo_docs/build',
livereload: true
}
}
},
compass: {
prod: {
options: {
config: 'compass.rb',
environment: 'production',
force: true
}
},
debug: {
options: {
config: 'compass.rb',
force: true
}
}
},
exec: {
bower_update: {
cmd: 'bower update'
},
build_sphinx: {
cmd: 'sphinx-build demo_docs/source demo_docs/build'
}
},
clean: {
build: ["demo_docs/build"]
},
watch: {
/* Compile sass changes into theme directory */
sass: {
files: ['sass/*.sass', 'bower_components/**/*.sass'],
tasks: ['compass:debug']
},
/* Changes in theme dir rebuild sphinx */
sphinx: {
files: ['sphinx_rtd_theme/**/*'],
tasks: ['exec:build_sphinx']
},
/* live-reload the demo_docs if sphinx re-builds */
livereload: {
files: ['demo_docs/build/**/*'],
options: { livereload: true }
}
}
});
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-open');
grunt.registerTask('default', ['exec:bower_update','clean:build','compass:debug','exec:build_sphinx','connect','open','watch']);
grunt.registerTask('build', ['exec:bower_update','clean:build','compass:prod','exec:build_sphinx']);
}