-
-
Save rparree/aae0e4551a1259579e7a to your computer and use it in GitHub Desktop.
assemble config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assemble = require('assemble-core'); | |
var extname = require('gulp-extname'); | |
var loader = require('assemble-loader'); | |
var runtimes = require('composer-runtimes'); | |
var path = require('path'); | |
var matter = require('parser-front-matter'); | |
var app = assemble(); | |
app.use(runtimes()); | |
app.on('preRender', function (view) { | |
console.log(' rendering >', view.relative); | |
}); | |
app.use(loader()); | |
app.engine('*', require('engine-handlebars')); | |
app.create('layouts', { | |
viewType: 'layout', | |
renameKey: function (key) { | |
return path.basename(key, ".hbs"); | |
} | |
}); | |
app.create('partials', { | |
viewType: 'partial', | |
renameKey: function (key) { | |
return path.basename(key, ".hbs"); | |
} | |
}); | |
app.onLoad(/./, function (view, next) { | |
matter.parse(view, next); | |
}); | |
app.helper('list', require('./src/templates/helpers/augment-info.js')); | |
app.helper('./src/templates/helpers/*.js'); | |
app.helper('markdown', require('helper-markdown')); | |
app.data({ | |
scalajs: '/assets', | |
vendor: '/vendor', | |
site: { | |
keywords: '' | |
} | |
}); | |
app.create("publicPages"); | |
app.layouts('./src/templates/_layouts/*.hbs'); | |
app.partials('./src/templates/_includes/*.hbs'); | |
app.task('site', function () { | |
/* | |
app.src('./src/templates/public-pages/!**') | |
.pipe(app.renderFile('*')) | |
.pipe(extname()) | |
.pipe(app.dest('./build/public')); | |
app.src('./src/templates/admin-pages/!**') | |
.pipe(app.renderFile('*')) | |
.pipe(extname()) | |
.pipe(app.dest('./build/admin')); | |
*/ | |
app.src('./src/templates/blog-pages/**') | |
.pipe(app.renderFile('*')) | |
.pipe(extname()) | |
.pipe(app.dest('./build/public/blog')); | |
}); | |
app.build('site', function (err) { | |
if (err) return console.log(err); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "app", | |
"version": "0.0.0", | |
"description": "", | |
"main": "gulpfile.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"gulp": "^3.8.11", | |
"gulp-express": "^0.1.0", | |
"gulp-grunt": "^0.5.2", | |
"gulp-jshint": "^1.8.5", | |
"gulp-minify-css": "^0.3.11", | |
"gulp-rename": "^1.2.2", | |
"gulp-sass": "^1.2.0", | |
"gulp-sitemap": "^2.0.1", | |
"gulp-sourcemaps": "^1.2.4", | |
"gulp-image-resize": "~0.7.1", | |
"underscore": "~1.8.3", | |
"assemble-json-index": "0.0.2", | |
"gulp-minify-html": "~1.0.4", | |
"gulp-extname": "~0.2.0", | |
"handlebars-helpers": "~0.5.8", | |
"assemble-loader": "~0.2.4", | |
"engine-handlebars": "~0.8.0", | |
"composer-runtimes": "~0.7.0", | |
"parser-front-matter": "~1.3.0", | |
"handlebars": "~4.0.5", | |
"moment": "~2.10.6", | |
"lodash": "~3.10.1", | |
"assemble-core": "~0.7.0" | |
}, | |
"keywords": [ | |
"pager" | |
], | |
"dependencies": { | |
"helper-markdown": "~0.1.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment