wcm-io-frontend / aem-clientlib-generator

Creates configuration files for AEM ClientLibs and synchronizes assets.
Apache License 2.0
62 stars 32 forks source link

Version parameter has side effect on expected default behavior of clientlib utility. #50

Open ksuayan opened 1 year ago

ksuayan commented 1 year ago

aem-clientlib-generator when invoked with the --version parameter will not execute its functionality, moreso suppress the output of the --verbose switch!

package.json entry

  "scripts": {
...
    "cl": "clientlib --verbose --version",
...
  },
$ yarn run cl

I was puzzled why after running several maven builds on my local machine, I was not seeing the transpiled code getting deployed in AEM. One would expect that the --version parameter would not have any side effect and that it would merely print out the version of code to standard output.

This NPM is responsible for copying over transpiled output from ui.frontend into ui.apps as an AEM ClientLib. I realized that something was wrong after I deleted the contents of clientlib-site in ui.apps and nothing was getting generated after invoking it through yarn/npm.

The above is not a sensible default behavior for a command line utility.