GithubHelp home page GithubHelp logo

niekraaijmakers / aem-sample-we-retail-journal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adobe/aem-sample-we-retail-journal

1.0 1.0 1.0 3.26 MB

We.Retail Journal is a sample showcasing SPA Editing capabilities in AEM using React and Angular

License: Apache License 2.0

JavaScript 6.32% TypeScript 9.63% Shell 0.40% CSS 66.17% HTML 1.77% Java 15.71%

aem-sample-we-retail-journal's Introduction

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:

  • content: Content Structure including /apps components and client libraries as well the /content specific sites and pages. The client library will be generated while building the SPAs.
  • react-app: We.Retail Journal React application.

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:

  • Proxima Nova Regular
  • Bagatela Light

Build

The project has the following minimal requirements:

  • Java SE Development Kit 8 or newer
  • Apache Maven 3.3.1 or newer

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:

  • autoInstallPackage - installs the package/bundle to an existing AEM author instance
  • autoInstallPackagePublish - installs the package/bundle to an existing AEM publish instance
  • autoInstallSinglePackage - package all the dependencies into a single content package and install everything to an existing AEM author instance
  • autoInstallSinglePackagePublish - package all the dependencies into a single content package and install everything to an existing AEM publish instance

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:

  • empty string (default): non-production / development
  • production: production

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

  • -pl/-projects option specifies the list of projects that you want to install
  • -am/-also-make options specifies that dependencies should also be built

Guidelines for SPA development in AEM

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.

  • Portability - As with any components, the components should be built to be as portable as possible. The SPA should be built with portable and reusable components.
  • AEM Drives Site Structure - The front end developer creates components and owns their internal structure, but relies on AEM to define the content structure of the site.
  • Dynamic Rendering - All rendering should be dynamic.
  • Dynamic Routing - The SPA is responsible for the routing and AEM listens to it and fetches based on it. Any routing should be dynamic as well.

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.

aem-sample-we-retail-journal's People

Contributors

bohnertchris avatar fistakus avatar gknobloch avatar grubyak avatar habansal avatar lydiapuric avatar norbiorb avatar pfauchere avatar samuelmeuli avatar sharanyavinod avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ksurendra

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.