1.0.14 • Published 3 years ago

modern-project-generator v1.0.14

Weekly downloads
15
License
UNLICENSED
Repository
github
Last release
3 years ago

modern-project-generator

Project Generator - Micro-generator framework that makes it easy for an entire team to create web project files with a level of uniformity.

Prerequisites

  • NodeJS LTS

Getting Started

Install modern-project-generator

npm i -g modern-project-generator

Create a sym link so you can use the cli command:

npm link modern-project-generator

Usage with custom cli command

plop-project - For example:

➜  modern-project-generator git:(master) ✗ plop-project
? workspace: (Use arrow keys)
  component-lib
❯ create-react-app
  cypress-e2e
  gatsby
  gatsby-contentful
  next
  node-backend-service
(Move up and down to reveal more choices)

Usage without custom cli command

// package.json
{
  "scripts": {
    "plop": "./node_modules/modern-project-generator/bin/cli.js"
  },
  ...
}

NPM Example: npm run plop

This command will scaffold/bootstrap the selected project using the template files in the plop generator repo.

Generators

NAMEDescriptionStatus
CREATE-REACT-APPNPX CRA with some flavor(structure), CI/CD Build PipelinesNOT STARTED
COMPONENT-LIBReact Component Library with Storybook and CI/CD Build PipelinesIN PROGRESS
CYPRESS E2ECypress Headless Browser Functional/Integration/E2E Test SuiteREADY
GATSBYReact-based open source framework for creating websites and apps. CI/CD Build PipelinesIN REVIEW
GATSBY-CONTENTFULGatsby/Contentful CMS Project Template with CI/CD Build PipelinesREADY
NEXTReact framework with Storybook, CI/CD Build Pipelines and some flavorNOT STARTED
NODE-BACKEND-SERVICENon-REST Internal NodeJS/Typescript Service with CI/CD PipelinesREADY
NODE-EXPRESSNodesJS/Express HTTP REST Server with middleware, utils, and CI/CD pipelinesREADY
NODE-FASTIFYNodesJS/Fastify HTTP REST API Server with middleware, utils, and CI/CD pipelinesIN PROGRESS
NODE-GQLNodesJS Apollo GraphQL Server with middleware, utils, and CI/CD pipelinesREADY
SERVERLESS-CLOUD-FUNCTIONSGoogle/Firebase Cloud Functions with CI/CD pipelinesREADY
SERVERLESS-AZURE-FUNCTIONSAzure SAM Functions with CI/CD pipelinesNOT STARTED
SERVERLESS-LAMBDA-FUNCTIONSAWS SAM Lambda Functions with CI/CD pipelinesNOT STARTED
SHARED-LIBShared/Common Util WorkspaceIN PROGRESS

Full Example

> plop

? workspace: (Use arrow keys)
❯ create-react-app
  gatsby
  next
  node-backend-service
  node-express
  node-fastify
  node-gql
(Move up and down to reveal more choices)
? organization name test-org
? workspace name test-app
⠋ Install Dependencies
✔  ++ /test-app/.env
✔  ++ /test-app/Dockerfile
✔  ++ /test-app/codegen.yml
✔  ++ /test-app/docker-compose.yaml
✔  ++ /test-app/package.json
✔  ++ /test-app/src/app.ts
-  --SKIPPED /test-app/src/middleware/limiter.middleware.ts
✔  ++ /test-app/src/middleware/token.middleware.ts
✔  ++ /test-app/src/server.ts
...
... npm install
...

Development

TODO: Add docs on how to add/extend generators

Contributions

Read the contribution documentation.