A standalone toolkit for starting project.
npm i -g project-structure-generator
If you want to use PSG service, you must execute this command.
But, you can use any command with no enter this command other than PSG make <filename>
command.
psg init
This is will generate a directory(named ".projectStructures") for management your project structure file.
Note: Please enter this command at your project root directory.
You must follow these rules before writing your project structure at file.
-
If it's a directory, you must prefix it with /
ex) /src, /.logs, /configs, ... -
If it's a file, you must have an extension
ex) index.js, README.md, ... -
The file you write your project structure should have a .txt extension
ex) sample.txt, projectStructre1.txt, ... -
Make a relationship with the upper directory per 2 indentaion spaces
ex)
/src
image.js
Then, index.js is located in src directory.
PSG supports serveral commands, for your project and manage file or directory.
Note: You must execute psg init before executing this command.
psg make <filename>
If you pass filename that written at ./projectStructures, will generate for directory and file as is stated here.
If you already created file or directory stated, will be ignore.
touch <filenames>
If you pass filename, will create empty file in current working directory.
For example)
C:\PSG\src> touch app.js
Then, create "app.js" file in "PSG\src".
If you passed path with filename, then create empty file in specified path.
For example)
C:\PSG\src> psg touch ../.env
Then, create ".env" file in "PSG".
Also, you can pass multiple file names. In that case, a corresponding blank file will be created.
For example)
C:\PSG\src> psg touch .env .gitignore README.md
Then, create ".env", ".gitignore", "README.md" file in "C:\PSG\src".
cat <filenames>
If you pass filename, will show content written.
Also, you can pass multiple file names.
PSG supports serveral options. But these options must be use alone, not use together command.
<service_name> -v
<service_name> --version
Show service version
<service_name> -h
<service_name> --help
Show avvaiable options and commands
- Clone this repository
git clone https://github.com/MinJunSeo/project-structure-generator.git
cd project-structure-generator
- Install dependencis
npm i
- Install this code globally
npm i -g
Then, you can use commands.
All of code require review. You can use GitHub pull requests for this purpose. Consult GitHub Pull Request Help for more information on using pull requests.
You can use issues for this purpose. Consult GitHub Issues Help for more information on using issues.
- velog: PSG 회고록