Skip to content

Instantly share code, notes, and snippets.

@PavelGavlik
Created June 6, 2014 12:18
Show Gist options
  • Save PavelGavlik/9185df4729b46e222189 to your computer and use it in GitHub Desktop.
Save PavelGavlik/9185df4729b46e222189 to your computer and use it in GitHub Desktop.
Sample Phở Devstack config for a Wordpress theme
// For all available options, see node_modules/pho-dev-stack/config.js
// These are production build settings, see gulpfile.js for development settings
var gulp = require('gulp');
var extend = require('node.extend');
var substituteConfig = require('./substitute-config');
require('pho-devstack')(gulp, {
dist: {
/* Directories and file patterns for build output */
markupDir: 'wp-content/themes/symvest/',
scriptDir: 'wp-content/themes/symvest/scripts/',
styleDir: 'wp-content/themes/symvest/styles/',
imageDir: 'wp-content/themes/symvest/images/',
spriteDir: 'wp-content/themes/symvest/images/sprites/',
markupFiles: '**/*.php'
},
src: {
/* Directories and file patterns of source files */
markupDir: 'wp-content/themes/symvest/src/',
scriptDir: 'wp-content/themes/symvest/src/scripts/',
styleDir: 'wp-content/themes/symvest/src/styles/',
imageDir: 'wp-content/themes/symvest/src/images/',
markupFiles: '**/*.php'
},
browserify: {
debug: false,
transforms: {
uglifyify: true
}
},
htmlmin: {
enabled: false
},
less: {
paths: [ // directories for locating less files
'wp-content/themes/symvest/src/styles/',
'wp-content/themes/symvest/src/bower_components/'
],
sourceMap: false
},
livereload: {
enabled: false
},
plumber: {
enabled: false
},
rename: {
enabled: true
},
watch: {
enabled: false
},
spritesPreprocessor: {
enabled: true,
prefix: '../images/sprites/' // change this to prefix path before sprites. '/images/sprites/' for absolute paths
},
base64: {
// baseDir: 'wp-content/themes/symvest/src' // uncomment if you are using absolute paths
enabled: true
},
substituter: extend(true, substituteConfig, {
cdn: 'http://localhost/symvest-website/wp-content/themes/symvest/' // using absolute paths
// cdn: 'http://example.com' // url to your cdn server
}),
copy: ['fonts/**/*', 'humans.txt', 'bower_components/flexslider/jquery.flexslider-min.js', 'bower_components/jquery/dist/*']
});
// These are development build settings, see gulpfile-production.js for production settings
var gulp = require('gulp');
var extend = require('node.extend');
var substituteConfig = require('./substitute-config');
require('pho-devstack')(gulp, {
dist: {
/* Directories and file patterns for build output */
markupDir: 'wp-content/themes/symvest/',
scriptDir: 'wp-content/themes/symvest/scripts/',
styleDir: 'wp-content/themes/symvest/styles/',
imageDir: 'wp-content/themes/symvest/images/',
spriteDir: 'wp-content/themes/symvest/images/sprites/',
markupFiles: '**/*.php'
},
src: {
/* Directories and file patterns of source files */
markupDir: 'wp-content/themes/symvest/src/',
scriptDir: 'wp-content/themes/symvest/src/scripts/',
styleDir: 'wp-content/themes/symvest/src/styles/',
imageDir: 'wp-content/themes/symvest/src/images/',
markupFiles: '**/*.php'
},
htmlmin: {
enabled: false
},
imagemin: {
enabled: false
},
less: {
paths: [ // directories for locating less files
'wp-content/themes/symvest/src/styles/',
'wp-content/themes/symvest/src/bower_components/'
]
},
substituter: extend(true, substituteConfig, {
cdn: 'http://localhost/symvest-website/wp-content/themes/symvest/', // using absolute paths
livereload: function() {
return "<script>document.write('<script src=\"http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1\"></' + 'script>')</script>";
}
}),
copy: ['images/sprites/**/*', 'fonts/**/*', 'humans.txt', 'bower_components/flexslider/jquery.flexslider-min.js', 'bower_components/jquery/dist/*']
});
gulp = require('gulp');
module.exports = {
analytics: 'UA-XXXXX-X',
description: '',
author: '',
keywords: '',
'og:url': '',
'og:image': '',
'og:type': '',
'og:site_name': '',
'twitter:title': '',
'twitter:url': '',
'twitter:image': '',
'twitter:card': '',
'twitter:site': '',
'twitter:creator': '',
header: function() { return gulp.src('wp-content/themes/symvest/src/partials/header.htm'); },
footer: function() { return gulp.src('wp-content/themes/symvest/src/partials/footer.htm'); },
angel_investing_nav: function() { return gulp.src('wp-content/themes/symvest/src/partials/angel-investing-nav.htm'); }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment