Skip to content

Commit

Permalink
Add build config
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Jung committed Apr 18, 2016
1 parent 67ed016 commit 1eee06a
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
'use strict';

module.exports = {
'css:toolkit': {
src: './src/assets/toolkit/styles/*.css',
dest: './dist/assets/toolkit/styles',
name: 'css:toolkit'
},

'css:drizzle': {
src: './src/assets/**/drizzle.css',
dest: './dist/assets',
prefix: 'drizzle-',
name: 'css:drizzle'
},

js: {
plugins: {
webpack: {
entry: {
// Drizzle UI scripts
'drizzle/scripts/drizzle':
'./src/assets/drizzle/scripts/drizzle.js',
// Common toolkit scripts
'toolkit/scripts/toolkit':
'./src/assets/toolkit/scripts/toolkit.js'
},
output: {
path: './dist/assets',
filename: '[name].js'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader']
}
]
},
externals: {}
}
}
},

serve: {
plugins: {
browserSync: {
open: false,
notify: false,
files: ['./dist/**/*'],
server: {baseDir: './dist'}
}
}
},

watch: {
watchers: [
{
match: ['./src/assets/**/*.css'],
tasks: ['css']
},
{
match: ['./src/assets/**/*.js'],
tasks: ['js']
},
{
match: [
'./src/**/*.hbs',
'./src/data/**/*'
],
tasks: ['drizzle']
}
]
},

drizzle: {
src: {
patterns: {
basedir: './src/patterns',
glob: './src/patterns/**/*.hbs'
},
templates: {
basedir: './src/templates',
glob: './src/templates/**/*.hbs'
}
},
dest: {
pages: './dist',
patterns: './dist/patterns'
},
fieldParsers: {
notes: 'markdown'
}
}
};

0 comments on commit 1eee06a

Please sign in to comment.