Skip to content

Commit

Permalink
Merge pull request #9 from vgeruso/develop
Browse files Browse the repository at this point in the history
[ADD] New Flag and Doc Adjustment
  • Loading branch information
vgeruso authored Nov 27, 2021
2 parents 3f93aac + 2874357 commit d739111
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 30 deletions.
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ basic Node ES6 API project creator

## Get Started

### Required programs

The cpn requires the following systems installed:

- [Node.JS LTS](https://nodejs.org/en/)
- [Yarn](https://yarnpkg.com/getting-started)

### Install

In the root directory `~/` execute:

```bash
$ wget https://raw.githubusercontent.com/vgeruso/cpn/1.2.0/install.sh
$ wget https://raw.githubusercontent.com/vgeruso/cpn/1.2.1/install.sh
```

```bash
Expand All @@ -31,17 +38,17 @@ $ bash install.sh
Run in a required folder:

```bash
$ cpn my-project
$ cpn init my-project
```

In 'my-project' means the name of your project

grant during the process a series of questions will be asked for the configuration of eslint, follow the recommended answers for an API, however this varies depending on the project and the time it is developing:
Grant during the process a series of questions will be asked for the configuration of eslint, follow the recommended answers for an API, however this varies depending on the project and the time it is developing:

1. To check the syntax, find problems and apply the code style
2. JavaScript modules (import / export)
3. None of these
4. Node
4. Node => Use space to unmark browser and mark node then press enter
5. Use a popular style guide
6. Airbnb
7. JavaScript
Expand All @@ -68,4 +75,17 @@ $ yarn start

will be running on: http://localhost:3333/api/

### Others commands

Usage: cpn [ flag ] command [ arg ]

These are common cpn commands:

Perform maintenance on your cpn:
- update => Update cpn on your machine
- uninstall => Uninstal cpn from your machine

These are common cpn flags:
- -h or --help => Show this help list

Created by Victor Geruso
14 changes: 1 addition & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,7 @@ then
echo -e 'export CPN_DIR="${HOME}/.cpn"' >> .bashrc
fi

echo "Installation successfully!"
echo
echo "cpn version 1.2.0"
echo
echo "Usage: cpn <command> [<arg>]"
echo
echo "These are common cpn commands:"
echo
echo "Start a working area:"
echo " init <name project> Create you project api node"
echo
echo "Perform maintenance on your cpn"
echo " update Update cpn on your machine"
echo " uninstall Uninstal cpn from your machine"
$CPN_DIR/src/help.sh

rm install.sh
15 changes: 15 additions & 0 deletions src/help.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
echo "cpn version 1.2.1"
echo
echo "Usage: cpn [<flag>] <command> [<arg>]"
echo
echo "These are common cpn commands:"
echo
echo "Start a working area:"
echo " init <name project> Create you project api node"
echo
echo "Perform maintenance on your cpn:"
echo " update Update cpn on your machine"
echo " uninstall Uninstal cpn from your machine"
echo
echo "These are common cpn flags:"
echo " -h or --help Show this help list"
23 changes: 10 additions & 13 deletions src/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ if test $1 == "update"
then
# bash $CPN_DIR/src/update.sh
echo "Update => $1 => In development"
else
echo "cpn version 1.2.0"
echo
echo "Usage: cpn <command> [<arg>]"
echo
echo "These are common cpn commands:"
echo
echo "Start a working area:"
echo " init <name project> Create you project api node"
echo
echo "Perform maintenance on your cpn"
echo " update Update cpn on your machine"
echo " uninstall Uninstal cpn from your machine"
fi

if test $1 == "-h"
then
bash $CPN_DIR/src/help.sh
fi

if test $1 == "--help"
then
bash $CPN_DIR/src/help.sh
fi
1 change: 1 addition & 0 deletions src/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ else

echo "Update successfully!"
echo
$CPN_DIR/src/help.sh
fi

0 comments on commit d739111

Please sign in to comment.