commercetools / commercetools-sunrise-theme

Sunrise Theme from commercetools
http://commercetools.github.io/commercetools-sunrise-theme/site/en/home.html
13 stars 16 forks source link

Commercetools Sunrise Theme

Build Status Download stability-experimental Stories in Ready

Attention

Currently the templates as well as the CSS and JavaScript files are not ready to be re-used.

Despite of that we recommend to use the project itself to develop your own theme with the current setup, as it provides useful tasks that can help you in the process. For more details, please check the Commands section.

Demo

Installation

How to use

You can import the theme to your project as a WebJars dependency.

All releases for this theme can be found in a Maven repository hosted by Bintray:

How to develop

Duplicate the repository and adapt package.json to create your own theme.

Set it up as explained in the Installation section, then apply your modifications as follows:

  1. Run grunt
  2. Modify the source files located in input/ folder
  3. Check your changes by accessing the desired HTML file generated in the output/ folder
  4. Once ready, enable the theme in your Sunrise project following one of the methods described in Create WebJars file

Commands

Besides grunt, which builds the whole generated site (grunt build) and watches for changes, there are other commands available. Below are listed a non-exhaustive list of them.

Notice you can always add --verbose and/or --debug to any command in order to obtain more information.

Generate HTML Site

Build the site for your theme and access the HTML files to see how it looks like.

Building the generated site also performs these tasks:

Create WebJars File

Create a WebJars file from this theme and apply it to any Sunrise Java project. There are three possible ways to achieve this:

Publish to GitHub Pages

Publish the generated output/ folder to GitHub Pages, so that you can easily access and share the generated HTML files of your theme, as well as all other files.

If you want to publish to GitHub Pages each time your theme changes, all you need to do is enable Travis CI for your project and define the environment variable GH_TOKEN as explained in the Travis CI Documentation.