diff --git a/README.md b/README.md index 4c775617..59720cfa 100644 --- a/README.md +++ b/README.md @@ -14,20 +14,14 @@ Auro's Design System web component generator is a project tool intended to assis [![License](https://img.shields.io/npm/l/@aurodesignsystem/wc-generator.svg?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0) [![issues](https://img.shields.io/github/issues-raw/AlaskaAirlines/WC-Generator?style=for-the-badge)](https://github.com/AlaskaAirlines/WC-Generator/issues) -It is recommended that the package be installed globally as to ensure quick and easy access to initializing new projects. - -```shell -$ npm i @aurodesignsystem/wc-generator -g -``` - -The Auro custom element generator is configured to ensure that you have the latest version of the generator and all it's dependencies prior to starting a new build project. +It is recommended that the package be executed via a `npx` command. ## Execute WC-Generator example use: ``` -wc-generate --name [wc-name] +$ npx @aurodesignsystem/wc-generator --name [wc-name] ``` ### Minimum Node version @@ -45,7 +39,7 @@ For the most up to date information on UI development browser support, see [Auro When generating a new custom element using the Auro WC-Generator, you are not restricted to using the Auro namespace for your new element. The following example will crate the project, `@aurodesignsystem/auro-ticker` ```shell -$ wc-generate --name Auro-Ticker +$ npx @aurodesignsystem/wc-generator --name Auro-Ticker ``` ## Custom npm namespace support @@ -53,7 +47,7 @@ $ wc-generate --name Auro-Ticker By default, the WC-Generator will output a project that the custom element is for the `@aurodesignsystem` npm namespace. The following example illustrates how you can customize this to `@mynamespace/auro-ticker` for example. ```shell -$ wc-generate --name Auro-Ticker --npm @mynamespace +$ npx @aurodesignsystem/wc-generator --name Auro-Ticker --npm @mynamespace ``` ## WC-Generator development API @@ -67,7 +61,7 @@ $ wc-generate --name Auro-Ticker --npm @mynamespace ## Help and version management -For help with the WC-Generator API and to see what version you have installed, run `$ wc-generate --help`. +For help with the WC-Generator API and to see what version you have installed, run `$ npx @aurodesignsystem/wc-generator --help`. With each new repo created, the version of the generator will be added to the bottom of the `./README.md` file. As versions of the WC-Generator progress this will help authors to understand where the feature gap is. diff --git a/docs/auroLabsMinors.md b/docs/auroLabsMinors.md index f3e726dd..51089c32 100644 --- a/docs/auroLabsMinors.md +++ b/docs/auroLabsMinors.md @@ -26,7 +26,7 @@ When building a new custom element in auroLabs it is highly recommended that yo Once the generator is installed, please use the following execution template fo your new project. ``` -$ wc-generate --name auro-[element name] +$ npx @aurodesignsystem/wc-generator --name auro-[element name] ``` ## Getting started @@ -45,7 +45,7 @@ From installing the generator all the way to setting up a Github repo. Follow th 2. Create your new custom element repository locally

Once the generator is installed, run the generator command to create a new custom element repository.

-
  $ wc-generate --name auro-[element name]
+
  $ npx @aurodesignsystem/wc-generator --name auro-[element name]
diff --git a/package.json b/package.json index 915209ad..8738ec60 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "util" ], "bin": { - "wc-generate": "./bin/generate.js" + "wc-generator": "./bin/generate.js" }, "repository": { "type": "git", diff --git a/util/auroMigrate.sh b/util/auroMigrate.sh index 51f1f598..9bd8b6cc 100644 --- a/util/auroMigrate.sh +++ b/util/auroMigrate.sh @@ -2,7 +2,7 @@ ## Generate a new baseline install of an auro component # Argument expected: name of new repo function generateRepo { - command wc-generate --test --name "$1" --npm "${2//\/}" + command npx @aurodesignsystem/wc-generator --test --name "$1" --npm "${2//\/}" } ## Migrade files from legacy repo to new build diff --git a/util/help-outputs.js b/util/help-outputs.js index c84b68bd..a5f5a46c 100644 --- a/util/help-outputs.js +++ b/util/help-outputs.js @@ -3,10 +3,10 @@ const pjson = require('../package.json'); const generate = ` ${chalk.gray('Usage:')} - ${chalk.bold('wc-generator [options]')} + ${chalk.bold('npx @aurodesignsystem/wc-generator [options]')} ${chalk.gray('Example:')} - ${chalk.bold('wc-generator --name auro-dialog')} + ${chalk.bold('npx @aurodesignsystem/wc-generator --name auro-dialog')} ${chalk.gray('Description:')} Generate a new Auro Web Component from template. @@ -18,7 +18,7 @@ const generate = ` ${chalk.gray('Installed version:')} v${pjson.version} - ${chalk.gray('Upgrade to latest version:')} + ${chalk.gray('Install locally if needed (not recommended):')} $ ${chalk.green('npm i @aurodesignsystem/wc-generator@latest -g')} ${chalk.gray('Options:')} diff --git a/util/migrate-outputs.js b/util/migrate-outputs.js index d92d0d3f..ad11ce1e 100644 --- a/util/migrate-outputs.js +++ b/util/migrate-outputs.js @@ -5,9 +5,6 @@ const generate = ` ${chalk.gray('Installed version:')} v${pjson.version} - ${chalk.gray('Upgrade to latest version:')} - $ npm i @aurodesignsystem/wc-generator@latest -g - ${chalk.gray('More help:')} For more help with migrating an Auro Web Component, be sure to see ${chalk.blue('https://auro.alaskaair.com/getting-started/developers/generator/upgrade')}