{"id":19332483,"url":"https://github.com/yuchi/liferay-theme-tasks-fixed","last_synced_at":"2026-06-29T22:31:53.658Z","repository":{"id":140783581,"uuid":"160491501","full_name":"yuchi/liferay-theme-tasks-fixed","owner":"yuchi","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-05T09:23:55.000Z","size":249,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-26T22:18:01.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuchi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-05T09:13:57.000Z","updated_at":"2023-03-10T11:25:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e44e0aaf-701f-460f-b22c-035c36d41593","html_url":"https://github.com/yuchi/liferay-theme-tasks-fixed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuchi/liferay-theme-tasks-fixed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fliferay-theme-tasks-fixed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fliferay-theme-tasks-fixed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fliferay-theme-tasks-fixed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fliferay-theme-tasks-fixed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuchi","download_url":"https://codeload.github.com/yuchi/liferay-theme-tasks-fixed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Fliferay-theme-tasks-fixed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34945707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T02:45:58.827Z","updated_at":"2026-06-29T22:31:53.637Z","avatar_url":"https://github.com/yuchi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Liferay Theme Tasks [![Build Status](https://travis-ci.org/liferay/liferay-theme-tasks.svg?branch=master)](https://travis-ci.org/liferay/liferay-theme-tasks)\n\n\u003e The liferay-theme-tasks module is intended for use with the yeoman generator for [Liferay themes](https://github.com/liferay/generator-liferay-theme).\n\n## Available tasks\n\n* [build](#build)\n* [deploy](#deploy)\n* [extend](#extend)\n* [kickstart](#kickstart)\n* [status](#status)\n* [watch](#watch)\n* [init](#init)\n\n### Build\n\n```\ngulp build\n```\nThe `build` task generates the base theme files, compiles sass into css, and zips all theme files into a .war file, ready to be deployed to a Liferay server.\n\n### Deploy\n\n```\ngulp deploy\n```\n\nThe deploy initially runs the `build` task, and once the .war file has been created it deploys to the specified local appserver.\n\nIf you want to deploy to a live site, use the `--live` flag to deploy to a remote server.\n\n```\ngulp deploy --live\n```\n\nNote that the specified server must have the [server-manager-web](https://github.com/liferay/liferay-plugins/tree/master/webs/server-manager-web) plugin deployed. The `--live` flag will deploy to the remote server specified in the [init](#init) task.\n\nIf you want to deploy to a different server without changing the default server specified in [init](#init), you may use the `--url` flag.\n\n```\ngulp deploy --live --url http://some-host.com\n```\nYou may also specify your login credentials using the `-u`/`--username` and `-p`/`--password` flags.\n\n```\ngulp deploy --live -u test@liferay.com -p test\n```\n\n**Note:** the `deploy --live` task is not currently working for Liferay 7.0 as the `server-manager-web` plugin has not been migrated to work with OSGi.\n\n#### Deploy Gogo\n\nFor Liferay 7.0 themes, there is an optional deploy command for deploying your theme via OSGi. **This task will NOT work for 6.2 themes and for Docker deployment strategy.**\n\n```\ngulp deploy:gogo\n```\n\nNote that Liferay Portal's gogo shell must be running for this command to work.\n\n### Extend\n\n```\ngulp extend\n```\n\nThe `extend` task is what allows you to specify what base theme you are extending from. By default, themes created with the [theme generator](https://github.com/natecavanaugh/generator-liferay-theme) will base off the [styled theme](https://www.npmjs.com/package/liferay-frontend-theme-styled).\n\nYou first are prompted if you want to extend a Base theme or Themelet, then you will be prompted for where you would like to search for modules. `Globally installed npm modules` will search npm modules that have been installed on your computer with the `-g` flag. Selecting `npm registry` will search for published modules on npm.\n\nOnce it gives you the options and you make your selection, it will add any selected modules to your package.json under dependencies and run `npm install`.\n\n### Kickstart\n\n```\ngulp kickstart\n```\n\nThe `kickstart` task allows you to copy the css, images, js, and templates from another theme into the src directory of your own. This allows you to quickly get up and running with a production ready theme.\n\n`kickstart` is similar to `extend`. The difference is that kickstarting from another theme is a one time inheritance, while extending from another theme is a dynamic inheritance that applies your src files on top of the base theme on every build.\n\n### Status\n\n```\ngulp status\n```\nDisplays what base theme/themelets your theme is extending.\n\n### Watch\n\n```\ngulp watch\n```\n\nThe watch task allows you to see the changes you make to your theme without a full redeploy.\n\nAfter invoking the watch task, every time you save any changes to a file in your theme it compiles (if applicable) and copies it directly to your appserver.\n\n### Init\n\n```\ngulp init\n```\nPrompts user for local and remote appserver information used for deployment purposes (see [deploy](#deploy) task).\n\n## API\n\n### registerTasks\n\nTo register the liferay-theme-tasks you must call the `registerTasks` method in your theme's gulpfile.js, `gulp` being the only required parameter.\n\n```js\nvar gulp = require('gulp');\nvar liferayThemeTasks = require('liferay-theme-tasks');\n\nliferayThemeTasks.registerTasks({\n\tgulp: gulp\n});\n```\n\n#### Options\n\n##### distName\n\ntype: `string`\u003cbr\u003e\nrequired: `false`\n\nThe name that will be given to the generated war file. The `distName` can also be a template which has access to the theme's `package.json` fields.\n\n```js\nliferayThemeTasks.registerTasks({\n\tdistName: '${name}-${version}',\n\tgulp: gulp\n});\n\n// my-theme-1.0.0\n```\n\n**Note:** in 7.0 changing the war file name will also affect the context path of the theme when using `gulp deploy` which can result in having multiple versions of your theme deployed at the same time.\n\n##### gulp\n\ntype: `gulp instance`\u003cbr\u003e\nrequired: `true`\n\nA gulp instance for exposing liferay-theme-tasks.\n\n##### hookFn\n\ntype: `function`\n\nAllows theme developers to hook and overwrite tasks/sub tasks.\n\n```js\nvar gulp = require('gulp');\nvar liferayThemeTasks = require('liferay-theme-tasks');\n\nliferayThemeTasks.registerTasks({\n\tgulp: gulp,\n\thookFn: function(gulp) {\n\t\tgulp.hook('before:build:src', function(done) {\n\t\t\t// Fires before build:src task\n\t\t});\n\n\t\tgulp.hook('after:build', function(done) {\n\t\t\t// Fires after build task\n\t\t});\n\n\t\tgulp.task('build:base', function(done) {\n\t\t\t// Overwrites build:base task\n\t\t});\n\t}\n});\n```\nNote: `hook` callback function must invoke `done` argument OR return a stream.\n\n##### pathBuild\n\ntype: `string`\u003cbr\u003e\ndefault: `./build`\n\nDetermines the destination of built files.\n\n##### pathDist\n\ntype: `string`\u003cbr\u003e\ndefault: `./dist`\n\nDetermines the destination of the generated .war file.\n\n##### pathSrc\n\ntype: `string`\u003cbr\u003e\ndefault: `./src`\n\nDetermines where theme source files are located. If set to anything other than default value, you must manually relocate all files in src directory to new location.\n\n##### postcss\n\ntype: `array`\u003cbr\u003e\n\nSpecifies a list of [PostCSS](https://postcss.org/) plugins to run on the compiled CSS after the SASS compilation\n\n##### sassOptions\n\ntype: `object`\n\nWhatever properties are set in sassOptions get passed to either [gulp-sass](https://www.npmjs.com/package/gulp-sass#options) or [gulp-ruby-sass](https://www.npmjs.com/package/gulp-ruby-sass#options) depending on what sass compiler is implemented.\n\n## liferayTheme\n\nThe `liferayTheme` object is located in a theme's package.json file and contains various options that relate to the gulp tasks.\n\n```JSON\n{\n\t\"name\": \"my-liferay-theme\",\n\t\"version\": \"1.0.0\",\n\t\"main\": \"package.json\",\n\t\"keywords\": [\n\t\t\"liferay-theme\"\n\t],\n\t\"liferayTheme\": {\n\t\t\"baseTheme\": \"styled\",\n\t\t\"rubySass\": false,\n\t\t\"templateLanguage\": \"ftl\",\n\t\t\"version\": \"7.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"gulp\": \"^3.8.10\",\n\t\t\"liferay-theme-deps-7.0\": \"*\",\n\t\t\"liferay-theme-tasks\": \"*\"\n\t}\n}\n```\n\n### baseTheme\n\nDetermines the base theme. This property is set by the `extend` task.\n\n### hookModules\n\nThe name or names of npm modules. These modules must expose a function that follows the same pattern as a [hookFn](#hookFn).\n\nIf a module is listed in `hookModules`, it must also be added to the `devDependencies` of the theme.\n\n### rubySass\n\nIf set to true `gulp-ruby-sass` is used as sass compiler. If set to false `gulp-sass` is used.\n\nIf changing this property from the default value, the appropriate sass compiler will need to be added as a dev dependency of your theme.\n\nFor example, if your theme is intended for Liferay Portal 7.0 and you set `rubySass` to `true`, you will then need to add `gulp-ruby-sass` to the `devDependencies` of your theme and run `npm install`.\n\n### themelets\n\nDetermines the themelets that are implemented by this theme. This property is set by the `extend` task.\n\n### version\n\nVersion of Liferay Portal this theme is intended for.\n\n## Additional Theme Dependencies\n\nIn order for themes to successfully build, they must declare additional dependencies in their package.json file.\n\nThese additional dependencies are normally included via the [liferay-theme-deps-7.0](https://github.com/Robert-Frampton/liferay-theme-deps-7.0) and [liferay-theme-deps-6.2](https://github.com/Robert-Frampton/liferay-theme-deps-7.0) preset packages which are automatically added as dependencies to themes created with the [Theme Generator](https://github.com/liferay/generator-liferay-theme).\n\nThese preset packages will include the necessary base themes/tools for compiling the theme, such as [liferay-frontend-theme-unstyled](https://www.npmjs.com/package/liferay-frontend-theme-unstyled) and [liferay-frontend-theme-styled](https://www.npmjs.com/package/liferay-frontend-theme-styled).\n\nIf you would like to implement specific versions of these dependencies, you can specify them as dependencies directly in your theme's [package.json file](https://gist.github.com/Robert-Frampton/86a084704afe9bca3e3ccc05d2709a5b).\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Fliferay-theme-tasks-fixed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuchi%2Fliferay-theme-tasks-fixed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Fliferay-theme-tasks-fixed/lists"}