Skip to main content

A simple Lektor plugin for gulp

Project description

This plugin for Lektor CMS adds gulp support to projects. When enabled with the -f gulp flag it runs npm install and then the gulp default or watch tasks as they are defined into your own gulpfile.js.

The general documentation about Lektor plugins is here.

lektor build

The command lektor build -f gulp runs the ``default`` gulp task, for example defined as something like:

gulp.task('build', ['clean', 'copy', 'js', 'css', 'imagemin'], () => { });
gulp.task('default', ['build'], () => { });

In the above example the default task points to a build task, which is usually composed by several other gulp tasks, etc.

lektor server

The command lektor server -f gulp runs the Lektor embedded server on http://localhost:5000, starting a gulp ``watch`` task in background. For example, you can define something such as:

gulp.task('watch', () => {
    gulp.watch('lib/js/**/*.js', ['js']);
    gulp.watch('lib/css/**/*.css', ['css']);
});

In the above example, each time one touches Javascript or CSS files in the lib/ folder then assets could be minified, concatenated and copied into the standard assets/static/ lektor folder, or whatever is defined into your own gulpfile.js.

Credits

This plugin is based on the official Webpack plugin with very little differences.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
lektor-gulp-0.3.2.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None May 29, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page