Skip to content

kyle-miho/generator-liferay-fragments

 
 

Repository files navigation

NPM Publish Version

generator-liferay-fragments

Yeoman generator for creating and maintaining Liferay Fragment projects

Requirements

Installation

First, install Yeoman and generator-liferay-fragments using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-liferay-fragments

Then generate your new project:

yo liferay-fragments

This command will guide you through a project creation and will ask you some simple questions. Then you can just cd to this new project and start working.

cd my-new-fragments-project

Usage

Once you've created your project, there is a bunch of npm scripts that will allow you perform many actions with your existing fragments. Fragments are organized inside collections, and keep an extremely simple structure:

src/
  collection-a/
    collection.json
    fragment-1/
      fragment.json
      index.html
      styles.css
      main.js
    fragment-2/
      ...
  collection-b/
    ...

Each collection's and fragment's information is stored inside JSON files, and you can change them manually, there is no magic in here. But we provide some extra scripts to do these modifications easily.

  • add-collection
  • add-fragment
  • export
  • compress
  • import
  • import:watch

About

Yeoman generator for creating and maintaining Liferay Fragment projects

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.6%
  • HTML 2.3%
  • CSS 0.1%