Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.
This repository was archived by the owner on May 27, 2021. It is now read-only.

RFC separate template and script dependencies #77

@hutchgrant

Description

@hutchgrant

Type of Change

  • New Feature Request
  • Documentation
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

As explained in #71, there is a large problem with the way the current installer is organized which prevents adding additional features. We currently are intentionally not using any additional dependencies for the CEA install task script because we don't want those dependencies to be installed with each generated application. The solution is simple and straightforward, move the application template's src files into a separate template directory with it's own separate package.json and modify the install script accordingly. This way we can add tests to the install script and extend its use further with additional dependencies such as commander and chalk.

Details

  • add a separate package.json specifically for installer dependencies
  • instead of listing files in the generated application's package.json, we move that to the install script's package.json
  • test files installed correctly and error detection using mocha + chai
  • move src folder and application specific config files into separate template directory

Test it

The rfc-001 branch has been published to the npm registry under the name @evergreen-wc/test-cea so that you can quickly test the script does indeed work correctly with npx.

Generate a new evergreen app

npx @evergreen-wc/test-cea my-app

Generate a new evergreen app using yarn instead of npm

npx @evergreen-wc/test-cea myAppWithYarn --yarn

Check the current version

npx @evergreen-wc/test-cea --version

Display Usage and Options

npx @evergreen-wc/test-cea --help

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions