Starting with version 8.0.0-rc.0 of official liferay-themes-sdk project, docker support comes OOTB. Please use this project only for Liferay 7.0.0 GAx compatibility.
The docker-gulp-tasks-4-liferay module is intended for use with Yeoman generated Liferay themes. In particular, it allows to use gulp watch features on the host machine when Liferay runs on a local container. Please refer to this blog article for more details.
The docker-gulp-tasks-4-liferay
module should be added as an hook module in your theme's gulpfile.js and in package.json's devDependencies. The dockerContainerName
parameter is required.
var gulp = require('gulp');
var liferayThemeTasks = require('liferay-theme-tasks');
liferayThemeTasks.registerTasks({
gulp: gulp,
hookModules: [ 'docker-gulp-tasks-4-liferay' ],
dockerContainerName: 'liferay_docker_container_name'
});
type: string
required: true
The name of the Liferay container in which theme files should be deployed by gulp watch
task.
type: string
default: /tmp/themes
Determines a folder into the container into which files are syncronised by gulp watch
task. In particular, gulp watch
copies theme files into ${dockerThemesDir}/${themeName}/.web_bundle_build directory.