Skip to content

Commit

Permalink
CLI and copy script
Browse files Browse the repository at this point in the history
  • Loading branch information
endormi authored Jul 15, 2022
2 parents aeefc76 + 9c1d2ba commit 8168fd6
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 127 deletions.
118 changes: 66 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
```
_ _ _ _ ____ _ ____ _ ___
/ \ __| |__ __ __ _ _ __ __| | ___ __| | | _ \ ___ __ _ ___ | |_ / ___|| | |_ _|
/ _ \ / _` |\ \ / // _` || '_ \ / _` | / _ \ / _` | | |_) |/ _ \ / _` | / __|| __| | | | | | |
/ ___ \| (_| | \ V /| (_| || | | || (_| || __/| (_| | | _ <| __/| (_| || (__ | |_ | |___ | |___ | |
/_/ \_\\__,_| \_/ \__,_||_| |_| \__,_| \___| \__,_| |_| \_\\___| \__,_| \___| \__| \____||_____||___|
<div class="highlight">
<pre tabindex="0" class="chroma">
<code class="language-fallback" data-lang="fallback">
_ _ ____ _ ____ _ ___
/ \ __| |__ __ | _ \ ___ __ _ ___ | |_ / ___|| | |_ _|
/ _ \ / _` |\ \ / / | |_) |/ _ \ / _` | / __|| __| | | | | | |
/ ___ \| (_| | \ V /_ | _ <| __/| (_| || (__ | |_ | |___ | |___ | |
/_/ \_\\__,_| \_/(_) |_| \_\\___| \__,_| \___| \__| \____||_____||___|

</code>
</pre>
</div>

<div>
<h2>
<span>
Table of Contents
</span>
</h2>
</div>

<div>
<ul>
<li><a href="#About">About</a></li>
<li><a href="#projects-purpose">Project's purpose</a></li>
<li><a href="#credits">Credits</a></li>
<li><a href="#run-the-cli">Run the CLI</a></li>
<li><a href="#installing-the-cli-globally">Installing the CLI globally</a></li>
<li><a href="#packages">Packages</a></li>
<li><a href="#running-tests">Running tests</a></li>
<li><a href="https://github.com/devisle/advanced-react-cli/blob/master/CONTRIBUTING.md">Contributing</a></li>
<li><a href="https://github.com/devisle/advanced-react-cli/blob/master/CHECKLIST.md">Development Checklist</a></li>
<li><a href="#what-does-this-do">What does this do?</a></li>
<li><a href="#faqs">FAQs</a></li>
<li><a href="#dev-isle-community">Dev Isle community</a></li>
<li><a href="https://github.com/devisle/advanced-react-cli/blob/master/LICENSE">License</a></li>
</ul>
</div>

```
## About

[![version](https://img.shields.io/npm/v/advanced-react-cli.svg?color=blue)](https://www.npmjs.com/package/advanced-react-cli) [![downloads](https://img.shields.io/npm/dw/advanced-react-cli.svg)](https://www.npmjs.com/package/advanced-react-cli) ![Test](https://github.com/devisle/advanced-react-cli/workflows/Test/badge.svg) ![CodeQL](https://github.com/devisle/advanced-react-cli/actions/workflows/codeql.yml/badge.svg)

## Table of Contents

- [About](#about)
- [Project's purpose](#projects-purpose)
- [Credits](#credits)
- [Run the CLI](#run-the-cli)
- [Installing the CLI globally](#installing-the-cli-globally)
- [Packages](#packages)
- [Running tests](#running-tests)
- [Contributing](CONTRIBUTING.md)
- [Development Checklist](CHECKLIST.md)
- [What does this do?](#what-does-this-do)
- [FAQs](#faqs)
- [Dev Isle community](#dev-isle-community)
- [License](https://github.com/devisle/advanced-react-cli/blob/master/LICENSE)

## About

This is an **NPM package** which aims to provide a better way to install a React-starter application and third-party packages for your application through an intuitive CLI.

## Project's Purpose
Expand All @@ -35,18 +49,7 @@ We at Dev Isle, felt that the community has been longing for a good, functional

**Note**: We do not discourage or refrain the community from using terminal commands instructions. In fact, we highly recommend our users to read and understand the docs so that you will know what to expect. This CLI is merely an alternative!

## Credits

This CLI uses some of the best repos' terminal commands under the hood, to execute it's functionality. We would like to credit the following GitHub repos by making this CLI possible:

- [Brandon Nozaki Miller - Node-CMD](https://github.com/RIAEvangelist/node-cmd)
- [Simon Boudrias - Inquirer JS](https://github.com/SBoudrias/Inquirer.js/)
- [Nathan Peck - CLUI](https://www.npmjs.com/package/clui)
- [Dave Eddy - Clear](https://github.com/bahamas10/node-clear)
- [Patorjk - Figlet](https://github.com/patorjk/figlet.js)
- [Chalk](https://www.npmjs.com/package/chalk)

**Be sure to check the above repos out if you're facing any issues! We are of course, always open to improvements.**
**Be sure to check the repos in [credits](#credits) if you're facing any issues! We are of course, always open to improvements.**

## Run the CLI

Expand Down Expand Up @@ -87,6 +90,21 @@ The CLI currently has these packages available for installation:
- [@types/react-router](https://www.npmjs.com/package/@types/react-router) & [@types/react-router-dom](https://www.npmjs.com/package/@types/react-router-dom)
- [@types/jest](https://www.npmjs.com/package/@types/jest)

## What does this do?

We are continuously working on improving the CLI. But, as of this current stable version, we have enabled a few options such as:

- Yarn/NPM option for installation packages
- Installing React using `create-react-app`, with optional packages React-Router and Redux as a single bundle.
- React Component generator lets you make a class/function component with optional package imports such as prop-types, react-router and redux!
- Installing Individual packages such as Node-Sass, Styled-Components, React-Router, Prop-Types, and State Management.
- Redux, Unstated, Unstated-Next and Redux-Thunk have been added in the State Management.
- Installing Redux automatically generates a store folder containing boilerplate Redux code with instructions to get you started!
- Installing Prop-Types automatically generates a file containing a sample code to get started!
- Node-Sass and Styled-Components feature under StyledPackages section of the CLI
- Installing packages used for accessibility such as React-A11y and React-Axe.
- TypeScript and `@types` definitions for Node, React, React-Router, React-Redux and Jest

## Running tests

Test:
Expand All @@ -101,27 +119,23 @@ Test coverage:
npm run test:coverage or yarn test:coverage
```

## What does this do?
## Credits

We are continuously working on improving the CLI. But, as of this current stable version, we have enabled a few options such as:
This CLI uses some of the best repos' terminal commands under the hood, to execute it's functionality. We would like to credit the following GitHub repos by making this CLI possible:

- Yarn/NPM option for installation packages
- Installing React using `create-react-app`, with optional packages React-Router and Redux as a single bundle.
- React Component generator lets you make a class/function component with optional package imports such as prop-types, react-router and redux!
- Installing Individual packages such as Node-Sass, Styled-Components, React-Router, Prop-Types, and State Management.
- Redux, Unstated, Unstated-Next and Redux-Thunk have been added in the State Management.
- Installing Redux automatically generates a store folder containing boilerplate Redux code with instructions to get you started!
- Installing Prop-Types automatically generates a file containing a sample code to get started!
- Node-Sass and Styled-Components feature under StyledPackages section of the CLI
- Installing packages used for accessibility such as React-A11y and React-Axe.
- TypeScript and `@types` definitions for Node, React, React-Router, React-Redux and Jest
- [Brandon Nozaki Miller - Node-CMD](https://github.com/RIAEvangelist/node-cmd)
- [Simon Boudrias - Inquirer JS](https://github.com/SBoudrias/Inquirer.js/)
- [Nathan Peck - CLUI](https://www.npmjs.com/package/clui)
- [Dave Eddy - Clear](https://github.com/bahamas10/node-clear)
- [Patorjk - Figlet](https://github.com/patorjk/figlet.js)
- [Chalk](https://www.npmjs.com/package/chalk)

# FAQs
## FAQs

1. How can I test this out?

- If you'd like to try it out , Run the following command `npx advanced-react-cli` in your terminal.
- We are still continuing to work on our [Development Checklist](CHECKLIST.md).
- We are still continuing to work on our [Development Checklist](https://github.com/devisle/advanced-react-cli/blob/master/CHECKLIST.md).

- Ensure you have git version control, and package manager - either npm (node package manager) or Yarn Installed. You may check if your system has them installed by running the following commands `git --version` and depending on your package manager of choice, run `npm --version` or `yarn --version`. If you don't have it installed, please visit:

Expand Down Expand Up @@ -152,7 +166,7 @@ We are continuously working on improving the CLI. But, as of this current stable

- The documentation site is built using [docsify](https://docsify.js.org/#/).
- Install `docsify` if you haven't done that already `npm i docsify-cli -g`.
- Run the site `docsify serve docs`.
- Run the site `npm run docs`.

## Dev Isle Community

Expand Down
8 changes: 0 additions & 8 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@

const [...args] = process.argv

// console.log(`folder name ${args[2]}`);
// console.log(`folder location ${args[3]}`);

// Current working directory
const cwd = process.cwd()
console.log(cwd)

const inquirer = require('inquirer')

const chalk = require('chalk')
const clear = require('clear')
const figlet = require('figlet')
Expand Down
Loading

0 comments on commit 8168fd6

Please sign in to comment.