Commit 48bb083b authored by Gerson Sunyé's avatar Gerson Sunyé
Browse files

grunt configuration files

parent f19e99e4
{
"directory": "bower_components"
}
{
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": true
}
{
"generator-reveal": {
"presentationTitle": "Software Construction and Evolution",
"packageVersion": "0.0.1",
"revealTheme": "simple",
"useSass": false,
"deployToGithubPages": true,
"githubUsername": "sunye",
"githubRepository": "software-construction"
}
}
\ No newline at end of file
# Generated on 2017-12-29 using generator-reveal 1.0.0
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
livereload:
options:
livereload: true
files: [
'index.html'
'slides/{,*/}*.{md,html}'
'js/*.js'
'resources/**'
]
index:
files: [
'templates/_index.html'
'templates/_section.html'
'slides/list.json'
]
tasks: ['buildIndex']
coffeelint:
files: ['Gruntfile.coffee']
tasks: ['coffeelint']
jshint:
files: ['js/*.js']
tasks: ['jshint']
connect:
livereload:
options:
port: 9000
base: '.'
open: true
livereload: true
coffeelint:
options:
indentation:
value: 4
max_line_length:
level: 'ignore'
all: ['Gruntfile.coffee']
jshint:
options:
jshintrc: '.jshintrc'
all: ['js/*.js']
copy:
dist:
files: [{
expand: true
src: [
'slides/**'
'bower_components/**'
'js/**'
'resources/**'
]
dest: 'dist/'
},{
expand: true
src: ['index.html']
dest: 'dist/'
filter: 'isFile'
}]
buildcontrol:
options:
dir: 'dist'
commit: true
push: true
message: 'Built from %sourceCommit% on branch %sourceBranch%'
pages:
options:
remote: '<%= pkg.repository.url %>'
branch: 'gh-pages'
# Load all grunt tasks.
require('load-grunt-tasks')(grunt)
grunt.registerTask 'buildIndex',
'Build index.html from templates/_index.html and slides/list.json.',
->
indexTemplate = grunt.file.read 'templates/_index.html'
sectionTemplate = grunt.file.read 'templates/_section.html'
slides = grunt.file.readJSON 'slides/list.json'
html = grunt.template.process indexTemplate, data:
slides:
slides
section: (slide) ->
grunt.template.process sectionTemplate, data:
slide:
slide
grunt.file.write 'index.html', html
grunt.registerTask 'test',
'*Lint* javascript and coffee files.', [
'coffeelint'
'jshint'
]
grunt.registerTask 'serve',
'Run presentation locally and start watch process (living document).', [
'buildIndex'
'connect:livereload'
'watch'
]
grunt.registerTask 'dist',
'Save presentation files to *dist* directory.', [
'test'
'buildIndex'
'copy'
]
grunt.registerTask 'deploy',
'Deploy to Github Pages', [
'dist'
'buildcontrol'
]
# Define default task.
grunt.registerTask 'default', [
'test'
'serve'
]
{
"name": "software-construction-and-evolution",
"version": "0.0.1",
"dependencies": {
"reveal.js": "~3.3.0",
"highlightjs": "~9.0.0"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment