Skip to content

The Setup Script

Ryandw11 edited this page Aug 8, 2020 · 1 revision

The setup script is a tool meant for the easy installation of PortfolioCMS and its dependencies. The entirety of the script is inside the setup.js file in the primary directory.

Running the setup tool

Running the setup tool is very simple. Just run the following command in the terminal:

node setup.js [optional arguments]

Please see below for the all of the arguments that can be put in place of the [optional arguments].

Possible Arguments

None

node setup.js
This runs the default setup process.

Remove Dependencies

node setup.js -rmvDep
Remove all dependencies from the public/ directory. (This will remove bootstrap, feather-icons, and the monaco-editor.)

Running setup

When you run the setup tool you should see the following output when it starts:
Image of console log. (Text version can be found below).

Then you should see that is installed/audited the dependencies:
Image of console log. (Text version can be found below).

If dependencies already exist

If the dependencies are already installed you will get the following message:
Image of console log. (Text version can be found below).
The prompt is asking if you would like to remove the existing dependencies and reinstall / update them.

After putting y you should see the following output (It is possible that some dependencies could be missing):
Image of console log. (Text version can be found below).

Finished setting up

This should be the final output:
Image of console log. (Text version can be found below.)
If you are setting up for the first time the program will let you know that it automatically created an environment.json file for you.

Complete Log:

First time:

[PortfolioCMS] Starting the setup of the of Portfolio CMS
[PortfolioCMS] Installing Dependencies... (This may take several minutes)
audited 211 packages in 1.653s
found 0 vulnerabilities


[PortfolioCMS] Finished Installing Dependencies.
[PortfolioCMS] Setting up dependencies...
[PortfolioCMS] All dependencies have been setup!
[PortfolioCMS] Successfuly finsihed setting up PortfolioCMS. Start PortfolioCMS by running 'node index.js'

Updating Dependencies:

[PortfolioCMS] Starting the setup of the of Portfolio CMS
[PortfolioCMS] Installing Dependencies... (This may take several minutes)
audited 211 packages in 1.6s
found 0 vulnerabilities


[PortfolioCMS] Finished Installing Dependencies.
[PortfolioCMS] Existing dependencies have been found. Would you like to replace the existing dependencies? [Y/N]y
[PortfolioCMS] Deleting bootstrap javascript.
[PortfolioCMS] Deleting bootstrap javascript map.
[PortfolioCMS] Deleting bootstrap css.
[PortfolioCMS] Deleting bootstrap css map.
[PortfolioCMS] Deleting Feather-Icons.
[PortfolioCMS] Deleting monaco-editor.
[PortfolioCMS] Setting up dependencies...
[PortfolioCMS] All dependencies have been setup!
[PortfolioCMS] Successfuly finsihed setting up PortfolioCMS. Start PortfolioCMS by running 'node index.js'