Socket
Socket
Sign inDemoInstall

@americanexpress/generator-one-app-module

Package Overview
Dependencies
Maintainers
9
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@americanexpress/generator-one-app-module

generator for One App Modules


Version published
Maintainers
9
Created
Source

@americanexpress/generator-one-app-module

yeoman generator for a bare-bones One App holocron Module

🤹‍ Usage

Assuming you have npx installed (comes with npm on versions 5.2.0 and above):

npx -p yo -p @americanexpress/generator-one-app-module -- yo @americanexpress/one-app-module

The generator will start up and prompt you with the following questions:

Optional Flags
--setupInternationalizationByDefault

If you'd like to include internationalization in your module without being prompted, you can pass in the --setupInternationalizationByDefault flag. Your command will look as follows:

yo @americanexpress/one-app-module --setupInternationalizationByDefault

Alternatively, if you choose to compose generator-one-app-module with another generator, you can pass the setupInternationalizationByDefault value in an object as the second argument to the Yeoman ComposeWith function, like so:

const CustomExtension = require.resolve('./path-to-custom-extension');

module.exports = class extends Generator {
  initializing() {
    this.composeWith(require.resolve('@americanexpress/generator-one-app-module/generators/app'), 
    { setupInternationalizationByDefault: true });
    this.composeWith(CustomExtension);
  }
};

Doing this, you're able to extend the generator-one-app-module generator, enable internationalization by default, and add additional prompts and logic in your custom extension.

More on composing generators here.

Bundling modules

For more information about what happens after bundling your module, read Bundling modules

🏆 Contributing

After making changes to the generator, test your changes locally:

  1. Install yeoman globally: npm install --global yo
  2. Link your local generator module so it is used instead of the repo version: npm link
  3. Switch to a temp directory and run: yo @americanexpress/one-app-module
  4. When you are done, unlink the local module : npm unlink

Please see our contributing guide for more details.

Keywords

FAQs

Package last updated on 09 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc