Skip to content

Instantly share code, notes, and snippets.

@andyshora
Last active August 29, 2015 14:18
Show Gist options
  • Save andyshora/ecff3916c706d288b4d9 to your computer and use it in GitHub Desktop.
Save andyshora/ecff3916c706d288b4d9 to your computer and use it in GitHub Desktop.
app.coffee
axis = require 'axis'
js_pipeline = require 'js-pipeline'
css_pipeline = require 'css-pipeline'
roots_config = require 'roots-config'
Q = require 'q'
readdirp = require 'readdirp'
siteFiles = []
# generate files for sitemap
generateFileList = () ->
console.log 'generateFileList'
deferred = Q.defer()
readdirp { root: './public', fileFilter: '*.html' }
.on 'data', (entry) ->
# console.log entry
siteFiles.push entry.path
return
.on 'end', () ->
console.log 'finished. ' + siteFiles.length + ' files found'
deferred.resolve()
return true
return deferred.promise
module.exports =
ignores: [
'readme.md',
'**/layout.*',
'**/_*',
'.gitignore',
'ship.*conf',
'.divshot-cache/*',
'.editorconfig',
'.DS_Store',
'layouts/*'
]
before: generateFileList
extensions: [
js_pipeline(manifest: 'assets/js/manifest.yml', out: 'js/main.js'),
css_pipeline(files: 'assets/css/styles.scss', out: 'css/main.css'),
roots_config(files: siteFiles)
]
'coffee-script':
sourcemap: true
jade:
pretty: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment