Commit 685b91c9 authored by Stéphane Bouvry's avatar Stéphane Bouvry
Browse files

Base

parents
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+4 −0
Original line number Diff line number Diff line
node_modules
dist
src/**/*.html
**.*~

gulpfile.js

0 → 100644
+26 −0
Original line number Diff line number Diff line
var gulp = require('gulp'),
    shell = require('gulp-shell'),
    exec = require('child_process').exec;


var src = './src/',
    articles = src +'articles/'

gulp.task('default', function(){
  gulp.src(articles + '**/*.md', { read: false })
    .pipe(shell(
      ['pandoc --template=./src/templates/unicaen.html --standalone <%= file.path %> -o <%= f(file.path) %>'],
      {
        templateData: {
          f: function(s){
            return s.replace(/\.md/, '.html')
          }
        }
      }
    ))
});

gulp.task('watch', function(){
  gulp.watch('src/articles/**/*.md', ['default']);
  gulp.watch('src/templates/unicaen.html', ['default']);
})

package.json

0 → 100644
+19 −0
Original line number Diff line number Diff line
{
  "name": "dev-notes",
  "version": "1.0.0",
  "description": "",
  "main": "gulpfile.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "gulp": "^3.9.1",
    "gulp-sass": "^4.0.1",
    "gulp-shell": "^0.6.5"
  },
  "dependencies": {
    "gulp-md-docs": "^0.1.8"
  }
}