The new
sub-command β
Create a new project folder with relevant files for a quick start.
Arguments β
Name | Type | Default Value | Description |
---|---|---|---|
name | string | - | Your project name |
Sample β
shell
sanpasjs new --name <PROJECT_NAME>
Description β
By running the above shell command you can create a new project folder.
- Copy the root path you need to create your project.
- Then paste it in your shell as format shown below.
(No need of<
>
)shellcd <FILE_PATH_YOU_COPIED>
- Then click
Enter
to change the directory. - Afterward, run
sanpasjs new
command to create the project folder withname
option. - Open the
sanpasjs.pas
file in your favorite text editor to edit the pascal file. - Here, I am using notepad but you can use any text editor you like to use π
If you are usingnotepad
like shown below, please select the file type toAll Files
to view the pascal file. - To transpile your code run
sanpasjs compile
subcommand. - To view your website in a web browser. Go to the project folder you created and click the HTML file which will be located in
<YOUR_PRJ_PATH>/dist/index.html
.
Project Structure β
Project structure when using sanpasjs new
command.
|- sanpasjs.pas
|- dist
|- index.html
|- index.js
Example β
shell
sanpasjs new --name sanjaiyan-website