Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voxa 3 Project Generator #68

Merged
merged 47 commits into from
May 16, 2019
Merged

Voxa 3 Project Generator #68

merged 47 commits into from
May 16, 2019

Conversation

wuelcas
Copy link
Contributor

@wuelcas wuelcas commented May 15, 2019

This add the functionality to the voxa-cli to scaffold a Voxa app project to just start coding your app instead of boilerplate code. This deprecate the Yeoman voxa generator which can only generate Voxa 2 projects.

Having this PR you'll be able to run npx voxa create and can generate a Voxa 3 project that:

  • Can be build using Typescript or Javascript.
  • Can support platforms like Alexa, Google Assistant, Telegram, Facebook Messenger, or all of the platforms.
  • Add voxa cli to generate the interaction model and publishing information.
  • Retrieve and save user's information in a DynamoDB table.
  • Add Google analytics, Dashbot, Chatbase, or all of those analytics, or no analytics at all.
  • Use serverless to deploy AWS lambdas for all platforms.
  • Have all the linting configurations ready to go (tslint or eslint depending on the language of choice).

The best way to review this PR:

  • Clone my fork and go to the generator branch.
  • Run yarn run create.
  • Go through the prompts and generate as many project as you want.
  • Review the generated code.

By doing that it you can skip reviewing in here all files inside the templates directory (which takes like 98% of this PR) and just review the create.ts and VoxaGenerator.ts file which are the command and class that will generate the Voxa project. You can also review the test files in case you'll like to know more about what the generator should generate based on the prompt answers.

@wuelcas wuelcas marked this pull request as ready for review May 16, 2019 20:14
Copy link
Contributor

@rmberrios rmberrios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to add this to the changelog.md
and add this command to help

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 22336 lines exceeds the maximum allowed for the inline comments feature.

@codeclimate
Copy link

codeclimate bot commented May 16, 2019

Code Climate has analyzed commit 7871bcd and detected 0 issues on this pull request.

View more on Code Climate.

@rmberrios rmberrios merged commit c7c37aa into VoxaAI:staging May 16, 2019
@wuelcas wuelcas deleted the generator branch May 16, 2019 22:03
rmberrios pushed a commit that referenced this pull request Jun 11, 2019
* Create command to scaffold a basic TS Voxa app

* Exclude templates folder

* Exclude templates from lint

* Add prettier ignore

* Add initial template

* Make JS and TS templates

* Fix all errors in javascript template

* Fix errors in typescript template

* Add author prompt and format file

* Create initial tests for file generation

* Exclude generated tests from templates in npm test script

* Exclude generated tests from templates in npm test-ci script

* Set condition to get template files

* Fix bugs and separate tests

* Add analytics packages to templates

* Generate code in the create command for analytics packages

* Add test for analytics packages integration

* Add message to prompt

* Add Voxa CLI references to templates

* Replace serverless prompt with voxa-cli

* Create tests for voxa-cli integration

* Exclude template views and interaction files from gitignore

* Separate JS and TS project generation tests

* Create store user info test cases

* Add support to store user info in DynamoDB

* Add save user info prompt

* Add references to DynamoDB and users table in serverless file

* Replicate dynamo config in serverless in JS project

* Add support for Voxa platforms in templates

* Create test cases for platform specifics

* Set default value to Alexa when choosing a platform

* Fix error in test cases in templates

* Add yarn lock file in templates

* Add missing space in README

* Set instructions when the generator is done

* Fix dashbot version

* Remove analytics option and add suffix

* Change final message to copy and paste commands more easily

* Update dashbot and ga packages

* Fix compilation errors for TS generated project

* Refactor generator logic to its own class

* Change handlebar variable names to match data

* Set validation for prompts

* Remove one empty line

* Extract instructions messages to its own function

* Add new generator feature to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants