From 51733af6cadf620377303ad46d04f57000c74b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?h=CE=B1rsh=20v=CE=B1ir=CE=B1gi?= Date: Sat, 21 Sep 2024 18:36:59 +0530 Subject: [PATCH] generator published at npmjs site. - version updating to 1.1.1 - added extra readme file for npmjs site. - updated docs. - updated package file. --- .npmignore | 5 +--- README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/readme.md | 8 ++--- package.json | 9 +++--- 4 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 README.md diff --git a/.npmignore b/.npmignore index 24cdb11..52e02d4 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,2 @@ -/README.md +/docs /.github -/docs/.vitepress -/package-lock.json -/docs/.vitepress/dist diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f1e7f9 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# Gen3 Express +A gen3 tool to generate express app boilerplate. + +## Acknowledgements +You need to know atleast basics about these things. + - [NodeJS](https://nodejs.org/docs/latest/api/) + - [ExpressJS](https://expressjs.com/en/5x/api.html) + - [Embedded JS](https://ejs.co/) + +## Installation +You can install and generate an express app using this tool in two approaches. Here I'm generating an app with name `my-app`, you can name to it anything you like. + +### 1. node package extecutor +This method is highly recommended to generate an express app. +```bash +npx gen3-express my-app +``` + +### 2. node package manager +Generation of an express app is not recommended through npm. +```bash +npm install -g gen3-express +``` +```bash +gen3-express my-app +``` + +## Documentation +To install all dev dependencies goto the folder and hit `npm install` command. +```bash +cd my-app +npm install +``` +To start a dev server to preview page use `server` word. +- Keep in mind that +- The below command does not include EJS live reloading. + +```bash +npm run server +``` +To start a dev server to live preview EJS page use `sync` word. +```bash +npm run sync +``` +If you want to run all these servers together then you should to use this below command, this command will provide you hot reloadings in every place. +```bash +npm run server & npm run sync +``` + +## File Cases +To know about the product or project structure read about files included in this code block. + +```bash +. +├── app.js # this core file handles express functions and server. +├── package.json # package file handles dependencies, and details about the product. +├── public # this folder contains public data like fonts, css and multimedia. +│   ├── fonts +│   │   └── sans.woff +│   └── style.css +├── sync.js # this file is needed to configure hot reloadings in ejs and static files. +├── utils +│   └── nets.js # this file provides functions to display available ip addresses on your network. +└── views # this folder contains ejs or html files to render contents. + └── home.ejs # this file is the landing page of the product. +``` + +## Roadmap + +- Custom name in `package.json` file ✅ +- Excellent terminal user interface ✅ +- Prompt `package.json` file's details from user. ⏩ +- Post this project to npmjs website. ✅ +- Custom local template feature ⏩ + +## Authors +- [@OurCodeBase](https://www.github.com/OurCodeBase) + +## Contributing +Contributions are always welcome! diff --git a/docs/readme.md b/docs/readme.md index 83e496a..21846ef 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -18,13 +18,13 @@ You can install and generate an express app using this tool in two approaches. H ### 1. node package extecutor This method is highly recommended to generate an express app. ```bash -npx https://www.github.com/OurCodeBase/gen3-express my-app +npx gen3-express my-app ``` ### 2. node package manager Generation of an express app is not recommended through npm. ```bash -npm install -g https://www.github.com/OurCodeBase/gen3-express.git +npm install -g gen3-express ``` ```bash gen3-express my-app @@ -75,11 +75,11 @@ To know about the product or project structure read about files included in this - Custom name in `package.json` file ✅ - Excellent terminal user interface ✅ - Prompt `package.json` file's details from user. ⏩ -- Post this project to npmjs website. ⏩ +- Post this project to npmjs website. ✅ - Custom local template feature ⏩ ## Authors - [@OurCodeBase](https://www.github.com/OurCodeBase) ## Contributing -Contributions are always welcome! \ No newline at end of file +Contributions are always welcome! diff --git a/package.json b/package.json index 86367a9..9be40eb 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { - "name": "gen3-express", - "version": "1.0.0", - "description": "A gen3 tool to generate get started express app", - "main": "index.js", + "name": "@aspandapo/gen3-express", + "version": "1.1.1", + "description": "A gen3 tool to generate express app boilerplate.", "bin": { "gen3-express": "./bin/gen3-express.js" }, @@ -26,7 +25,7 @@ "bugs": { "url": "https://github.com/OurCodeBase/gen3-express/issues" }, - "homepage": "https://github.com/OurCodeBase/gen3-express#readme", + "homepage": "https://ourcodebase.github.io/gen3-express", "dependencies": { "commander": "^12.1.0", "fs-extra": "^11.2.0",