npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@aemforms/aem-site-theme-builder

v5.3.0

Published

This repository contains scripts for building a Site Theme, ensuring compatibility with the requirements of AEM Site Templates. The recommended way of integrating the Theme Builder is to install it as an npm dependency of the Site Template Theme. This way

Downloads

121

Readme

AEM Site Theme Builder

This repository contains scripts for building a Site Theme, ensuring compatibility with the requirements of AEM Site Templates. The recommended way of integrating the Theme Builder is to install it as an npm dependency of the Site Template Theme. This way aem-site-theme-builder commands can be used in NPM scripts. Example of such integration can be found in Standard Site Template.

Installation

cd <your-site-theme>
npm install @aemforms/aem-site-theme-builder --save-dev

Usage

Proxy

Proxy your site running on AEM as a Cloud Service to localhost and replace requests made to the Site Theme with your locally compiled version of the Site Theme.

npx aem-site-theme-builder proxy

The URLs to a Site Theme can be provided via .env described in environment variables. In order to inject your locally compiled theme, the location of compiled site theme must match.

Live Preview

The live preview will run proxy server (desribed above) as well browser sync functionality. Browser sync will point to the proxied page and will be looking for changes in the dist folder and will refresh the page each time you got a change.

npx aem-site-theme-builder live

Theme Deployment

  1. Compile your theme and make the artifact available on GitHub. AEM as a Cloud Service will try to access https://api.github.com/repos/%GIT_ORG%/%GIT_REPO%/actions/artifacts/%GIT_ARTIFACT_ID%/zip in order to download the theme.
  2. Execute npx aem-site-theme-builder deploy in order to update the reference on AEM as a Cloud Service.

Complete development workflow

In order to make best use of theme-builder you have to run the live preview which provides proxy and browser sync functionalities. On top of that you need to make sure that you have additional watcher for your source files that triggers your theme build process which produces changes in the dist folder of your theme. This way after making change in your source file you will get your proxy page refreshed via browser sync.

API

Environment Variables

Theme Builder scripts are based on the environment variables you provide. These variables are used to properly provide live preview and deploy functionality of the AEM Site Theme Builder.

Here is the list of required variables:

AEM_URL=<URL of the AEM as a Cloud Service instance>
AEM_SITE=<name of the AEM site>
AEM_PROXY_PORT=<localhost proxy server port>

Here is the list of optional variables:

AEM_ADAPTIVE_FORM=<name of the AEM Form>

Recommended way to define site variables is to use / create .env file within your theme project repository.

Expected Output of Compiled Site Theme

You're free to use any build tools of your choice. The only contract with the Site Theme Builder is that the compiled artifact shall be provided as follows:

dist/
    css/
        theme.css
    js/
        theme.js
    resources/
        a-font.font
        an-image.png

Release and publish

Run the "Release and publish" GitHub workflow and provide the semantic version you're about to release.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the MIT License. See LICENSE for more information.