Skip to content
On this page

The new sub-command ​

Create a new project folder with relevant files for a quick start.

Arguments ​

NameTypeDefault ValueDescription
namestring-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. File Explorer
  • Then paste it in your shell as format shown below.
    (No need of < >)
    shell
    cd <FILE_PATH_YOU_COPIED>
    Command Prompt
  • Then click Enter to change the directory.
  • Afterward, run sanpasjs new command to create the project folder with name 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 using notepad like shown below, please select the file type to All Files to view the pascal file. Notepad file explorerPascal File Notepad
  • 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. Open HTML File

Project Structure ​

Project structure when using sanpasjs new command.

|- sanpasjs.pas
|- dist
    |- index.html
    |- index.js

Example ​

shell
sanpasjs new --name sanjaiyan-website