diff --git a/.all-contributorsrc b/.all-contributorsrc index 4aaa7eb..8a22cc2 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -12,30 +12,25 @@ "profile": "https://github.com/Ifycode", "contributions": [ "code", - "doc", - "infra", - "maintenance", - "review", - "projectManagement", - "ideas" + "doc" ] }, { - "login": "IsraelObiagba", - "name": "Israel Obiagba", - "avatar_url": "https://avatars.githubusercontent.com/u/14045379?v=4", - "profile": "https://github.com/IsraelObiagba", + "login": "chuddyjoachim", + "name": "Chikezie Joachim", + "avatar_url": "https://avatars.githubusercontent.com/u/56943504?v=4", + "profile": "http://chuddyjoachim.com", "contributions": [ - "mentoring" + "code" ] }, { - "login": "jiobiagba", - "name": "Joseph Obiagba", - "avatar_url": "https://avatars.githubusercontent.com/u/42423547?v=4", - "profile": "https://github.com/jiobiagba", + "login": "all-contributors", + "name": "All Contributors", + "avatar_url": "https://avatars.githubusercontent.com/u/46410174?v=4", + "profile": "https://allcontributors.org", "contributions": [ - "mentoring" + "infra" ] } ], diff --git a/.editorconfig b/.editorconfig index 1c8f4c8..a77cada 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true -[*.ts] +[.{js,ts}] quote_type = single [*.md] diff --git a/.gitbook/.gitbook.yaml b/.gitbook/.gitbook.yaml new file mode 100644 index 0000000..ff3e7d9 --- /dev/null +++ b/.gitbook/.gitbook.yaml @@ -0,0 +1 @@ +root: ./doc diff --git a/.github/ISSUE_TEMPLATE/create-a-task.md b/.github/ISSUE_TEMPLATE/create-a-task.md new file mode 100644 index 0000000..42a20d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/create-a-task.md @@ -0,0 +1,19 @@ +--- +name: Create a task +about: Pattern to follow while creating a task to be solved +title: '' +labels: task +assignees: '' + +--- + +Pattern to follow when creating a new task. Note: This is not for bug report. A separate template exists for reporting bugs. + +#### Task description +Give brief intro and describe what the task entails. + +#### Test cases and expected output +Include test cases e.g. commands to run and expected output. Add screenshots if/where possible. + +#### Examples +You can include examples of files, repos, issues or pull requests where something similar to the task you're describing has been done, if any. diff --git a/.github/ISSUE_TEMPLATE/report-a-bug.md b/.github/ISSUE_TEMPLATE/report-a-bug.md new file mode 100644 index 0000000..de41e30 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/report-a-bug.md @@ -0,0 +1,26 @@ +--- +name: Report a bug +about: Found a bug? Create a report to help us improve +title: '' +labels: 'bug' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Run this command '....' +3. See error etc. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..27ae2ed --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,14 @@ +**This pull request makes the following changes:** +* Fixes issue code-collabo/node-mongo-cli#issueNumberHere + +**Details:** +* Setup for '...' +* Adds '...' etc. + +**Testing checklist:** +- [ ] Run '...' +- [ ] Check that '...' +- [ ] Check that '...' etc. +- [ ] I certify that I ran my checklist. + +Ping @code-collabo/node-mongo-cli diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 808be5f..73ff776 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [12.x, 13.x, 14.x, 15.x, 16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/.gitignore b/.gitignore index c7e9dcf..60bb18c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. +# testing and rough work +test.js + # dependencies /node_modules diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 8b8b608..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1 +0,0 @@ -Moved to [docs: CODE_OF_CONDUCT](https://github.com/code-collabo/docs/blob/main/CODE_OF_CONDUCT.md) diff --git a/LICENSE b/LICENSE index 5f4a718..4a1839f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ ISC License (ISC) -Copyright 2021 Code Collabo +Copyright 2021 Obiagba Mary | Code Collabo Community Permission to use, copy, modify, and/or distribute this software for any purpose @@ -18,3 +18,9 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +@dkundel's create-project LICENCE file: +https://github.com/dkundel/create-project/blob/master/LICENSE + +List of project resources: +https://code-collabo.gitbook.io/node-mongo/contribution-guide/development-mode#project-resources diff --git a/README.md b/README.md index 0bf7e01..cfa6e66 100644 --- a/README.md +++ b/README.md @@ -5,33 +5,111 @@ ![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat) ![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg) ![GitHub issues](https://img.shields.io/github/issues/code-collabo/node-mongo-cli?color=red) ![GitHub pull requests](https://img.shields.io/github/issues-pr/code-collabo/node-mongo-cli?color=goldenrod) -`node-mongo-cli` is a command-line interface tool useful to initialize, scaffold and make mongoDB development easier in nodejs environment. With the CLI, you can install any of the starter kit templates - [es6](https://github.com/code-collabo/node-mongo-starter-kit) and [cjs](https://github.com/code-collabo/node-mongo-starter-cjs). It not only helps install the starter-kit, but also allows you to add new model and controller files with content using simple commands. +**Supported node versions:** node v12.x to v16.x -The [cli](https://github.com/code-collabo/node-mongo-cli) is built to help provide better experience when using the starter-kit in MongoDB, MERN or MEAN projects. +The **node-mongo-cli** is a command-line interface made with nodejs. It bootstraps any of these 3 boilerplate templates for your nodejs and/or mongoDB development: +- [ES module template](https://github.com/code-collabo/node-mongo-esm-kit) +- [Commonjs template](https://github.com/code-collabo/node-mongo-cjs-kit) +- Typescript (coming soon) + +## Features +### CLI +- CLI bootstraps the esm, cjs or ts templates for nodejs and/or mongoDB development. +- Install dependencies and intialize git for the template bootstrapped or choose to skip them. +- Folders are automatically created based on user entry in prompt or command-line. +- Default folder name is provided and incremented if name already exists. +### Templates +- [Two mongoDB connection options](https://code-collabo.gitbook.io/node-mongo/boilerplate-templates#mongodb-connection-options) to pick from in the templates: your installed mongoDB and mongoDBatlas. +- [Demo CRUD app](https://github.com/code-collabo/node-mongo-demo-app) you can go and download to test that your connection is setup and show example usage of the templates. + +## Installation +Install CLI globally with this command: +```` +npm install -g @code-collabo/node-mongo-cli +```` + +## Command +After installing globally, use the node-mongo command. +```` +node-mongo +```` + +### Usage +```` +node-mongo