0.0.6 • Published 5 years ago

argonui-clientlibs v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

ArgonUI-clientlibs

Converts a regular javascript or css package to an AEM client library

Install

npm install --save-dev argonui-clientlibs

This package is part of ArgonUI Boilerplate. However, it can function independently based on your project needs.

How does it work?

The package requires argon.config.js file. The configuration looks something like this:

const clientlibDist = `apps/settings/wcm/designs`;
const projectName = `argonui`;
module.exports = {
    jcrRoot: 'dist/jcr_root', // This path will have preference over "target" if it exists
    target: 'dist', // Target root folder
    clientlibs: {
        vendor: {
            categories: ['argonui.vendor'],
            basePath: `${clientlibDist}/${projectName}/clientlibs/vendor.publish`,
            paths: [
                `${clientlibDist}/${projectName}/clientlibs/vendor.publish`
            ]
        },
        global: {
            categories: ['argonui.global'], // Clientlib categories
            // Processor configuration for clientlib minification
            jsProcessor: [
                'min:gcc',
                'obfuscate=true',
                'languageIn=ECMASCRIPT5',
                'languageOut=ECMASCRIPT5'
            ],
            basePath: `${clientlibDist}/${projectName}/clientlibs/global.publish`, // where .content.xml will be placed
            paths: [
                // Scan these folders for js and css files
                `${clientlibDist}/${projectName}/clientlibs/global.publish`,
                `${clientlibDist}/${projectName}/clientlibs/common.publish`,
            ]
        }
    }
};

To convert a regular JS path to a client library run following command

npx create-clientlib

OR

npx create-clientlib --config=someOtherFileName.config.js
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago