Last active
August 29, 2015 13:56
-
-
Save monokrome/9202343 to your computer and use it in GitHub Desktop.
Example configuration format for GLP (http://github.com/monokrome/glp)
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
# This file can be in the same directory that you run `gulp` from, or | |
# it can be ./etc/, your home directory, or any other system directory | |
# that a good piece of software would expect. Some example locations: | |
# | |
# ~/.config/glp.yml | |
# /usr/local/etc/glp.yml | |
# /etc/glp.yml | |
# C:\System32\glp.yml (This is smart enough to know what drive Windows is on) | |
# | |
# This automatic configuration discovery is provided by PreferJS. | |
# http://github.com/LimpidTech/prefer | |
root: 'public' # All output files are prefixed with the root path. | |
watch: true # Should we watch for changes and creation of files? | |
static: # Configuration of static file server | |
path: './dist' # Where to serve files from | |
enabled: true # Flip to false to completely disable static files | |
catchAll: 'index.html' # Serve index.html in place of any requests to non-existant files | |
# Allows you to define new types of filters which are applied to specific types. | |
filters: | |
scripts: | |
jade: | |
matches: | |
- '**/*.jade' | |
- '**/*.fake' # You could match a made up extension, for instance. | |
# or you could request another plugin to be used. For instance, this will | |
# use gulp-hamburger - which (as far as I know) does not actually exist. | |
# You can also pass an gulp plugin's function itself if you prefer to do | |
# that and happen to have written your configuratio in a language that | |
# lets you work with function - (IE, coffee or JS). | |
# | |
# See gulpfile.js to understand how to use other configuration file types. | |
# NOTE: Whenever using custom filters, remember to install them via npm. | |
# IE: npm install gulp-hamburger | |
transform: 'hamburger' | |
bananas: # or even define your own types! | |
# this one would use the gulp-banana plugin, and **/*.banana automatically. | |
banana: {} | |
# Per-plugin configurations can be specified. These are forwarded to the plugin | |
# for whichever type of file would be built. For instance, 'stylus' would (by | |
# default) use a plugin called 'gulp-stylus'. You can change the plugin names, | |
# and even do more complex logic (IE, hinting options on a per-type basis like | |
# jade files do) with the 'filters' configuration. | |
plugins: | |
stylus: # nib is already provided by default! | |
use: | |
- 'nib' | |
liveReload: | |
port: 35729 # Which port the LiveReload server listens on (Default shown) | |
inject: true # If false styles cause reloading, otherwise injected. | |
enabled: true # If false, liveReload will never occur. | |
files: # Contains description of all outputs to build | |
# Compiles any template files into dist/templates. | |
templates: | |
dist/templates/: | |
- 'templates/**/*.haml' | |
- 'templates/**/*.html' | |
- 'templates/**/*.jade' | |
scripts: | |
dist/scripts: # Compiles to dist/scripts.js. Concatenates matching files. | |
- 'scripts/**.*js' # Matches JS files | |
- 'scripts/**/*.coffee' # Matches coffee files | |
# Note that ordering is provided automatically by the list order when | |
# concatenating dependencies. | |
# This example will NOT concatenate, as it ends with a / - which denotes | |
# the output as a directory. Each file, instead, will be compiled and then | |
# the result will be placed in this directory with a matching name. | |
dist/vendor/: | |
# A file in `lib/banana.coffee` will be compiled to a file named | |
# `dist/vendor/banana.js`. A file called `lib/3d/example.js` will | |
# be compiled to dist/3d/example.js. These output paths are | |
# determined simply by removing the prefix before the index of the | |
# first pattern match (*) character in the matching filename. | |
- 'lib/**/*.js' | |
- 'lib/**/*.coffee' | |
dist/templates/: | |
# The compilation which occurs here might seem a bit unpredictable, until | |
# you realize what is going on. This will match any file under scripts | |
# which is in a `partials` directory and ends with the extension 'jade'. | |
# If a file called `scripts/example/templates/index.jade` was found, then | |
# the resulting output would be located at the following location: | |
# `dist/templates/example/partials/index.js | |
# The reason that this is a js file is because GLP has noticed that the | |
# jade file was matched inside of the "scripts" section of the files | |
# config. If it wasn't, then the output would be an HTML file - like | |
# in the templates section above. You can change the types that produce | |
# JS instead of HTML by simply creating your own list in the | |
# `scriptedTemplateTypes`. | |
- scripts/**/partials/*.jade | |
# Tasks are nested configurations which provide all the previously listed | |
# options within themselves. They allow you to override specific configuration | |
# variables by providing the task name to the gulp command. This allows | |
# you to change values for specific cases without modifying the configuration | |
# file. There are four tasks by default, but you can always define your own. | |
# | |
# The default tasks are: | |
# - build (default if no task provided) | |
# - watch (build + watches for changes) | |
# - release (default + minification) | |
# - server (watch + run a node server) | |
tasks: | |
example: | |
minify: false | |
plugins: | |
scripts: | |
jade: | |
pretty: true # Make jade output pretty files. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment