ProjectEvergreen / create-evergreen-app

Get up and running with an evergreen web application development stack designed by, and for, today's modern web.
https://projectevergreen.github.io/
16 stars 5 forks source link

RFC separate template and script dependencies #77

Closed hutchgrant closed 5 years ago

hutchgrant commented 5 years ago

Type of Change

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

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
thescientist13 commented 5 years ago

Thanks so much for putting this together and setting up the testing environment, that will be a huge for reviewing this! 👏

Will test this out this weekend since I definitely want to make sure we can get this work in ASAP.

Could you open a PR just to get an idea of what the diff looks like? I think that would be helpful as well since this is going to be a lot of changes.