adobe / aem-sample-we-retail-journal

We.Retail Journal is a sample showcasing SPA Editing capabilities in AEM using React and Angular
Apache License 2.0
70 stars 69 forks source link

CircleCI

We.Retail Journal Single Page Applications

Contains We.Retail Journal SPAs for authoring on AEM.

Branching model

The current repository follows the Gitflow Workflow branching model design.

Go to the master branch to access the latest public state of the project.

Modules

This project contains:

Usage of online fonts

The application is using online Fonts included via Typekit.

You would either need a network connection or have the fonts installed on your computer:

Build

The project has the following minimal requirements:

Build all modules

To build all the modules run in the project root directory the following command with Maven 3:

mvn clean install

Module build order

The react-app module builds and transpiles the es6 javascript source code into a browser friendly 2015 version. It then creates a client library and copy the built javascript files in the content module. Run your Maven command lines from the root of the project to respect the module build ordering and ensure the latest version of the react-app module is used.

For ease of build and installation the following profiles are provided:

UberJar

This project relies on the unobfuscated AEM 6.3 cq-quickstart. This is publicly available on https://repo.adobe.com

For more details about the UberJar please head over to the How to Build AEM Projects using Apache Maven documentation page.

Install everything

You can install everything needed to use the components on your running AEM instance by issuing the following command in the top level folder of the project:

mvn clean install -PautoInstallSinglePackage

You can also choose build environment by using setting build.environment property (format: colon + name):

mvn clean install -PautoInstallSinglePackage -Dbuild.environment=":production"

Available environments:

Install local version of NPM sub-modules

You can install local version of the NPM modules @adobe/cq-spa-page-model-manager and @adobe/cq-spa-component-mapping by changing a few lines in the react-app module's POM. By default, the released versions of those modules are transitively installed by @adobe/cq-react-editable-components but it is possible to override this and install local development versions instead.

First, build and link the local NPM modules you want to use by running (for instance, in your local checkout of @adobe/cq-spa-page-model-manager):

npm run build && npm link

Then use the npmLinkDeps profile when installing the project's bundles and packages such as:

mvn clean install -PautoInstallPackage,npmLinkDeps

Individual packages/bundles

You can install individual packages/bundles by issuing the following command in the top level folder of the project:

mvn clean install -PautoInstallPackage -pl <project_name(s)> -am

Please note that

Developing single page applications on AEM assumes that the front-end developer observes standard best practices when creating an SPA. If as a front end developer you follow these general best practices as well as few AEM-specific principles, your SPA will be functional with AEM and its content-authoring capabilities.

If you keep these principles in mind as you develop your SPA, it will be as flexible and as future proof as possible while enabling all supported AEM authoring functionality.

For further details about SPA development on AEM including guideliens, walkthroughs, best practices and examples, see the AEM Developer Documentation.