Setup

You’re browsing the documentation for v5. View the docs for the latest version →

Prerequisites

Create a new project

The following commands create a project in a new folder called project-name. To create a new project in the current directory use a . (dot) instead of a project name.

Choose one of the following methods:

CLI with npx

npx @pangolinjs/cli create project-name

Globally installed CLI

npm install --global @pangolinjs/cli
pangolin create project-name

Project structure

.
├── src
│   ├── components
│   │   └── …
│   ├── functions
│   │   └── …
│   ├── public
│   │   └── …
│   ├── setup
│   │   └── …
│   ├── templates
│   │   └── …
│   ├── main.js
│   └── main.scss
├── .browserslistrc
├── .eslintrc.js
├── babel.config.js
├── [pangolin.config.js]
├── postcss.config.js
└── stylelint.config.js

Config files

FilePurpose
.browserslistrcBrowserslist configuration
.eslintrc.jsESLint configuration
babel.config.jsBabel configuration
pangolin.config.js(optional) Pangolin configuration
postcss.config.jsPostCSS configuration
stylelint.config.jsstylelint configuration

src folder

FolderPurpose
componentsEverything is a component: the smallest button and the most complex page.
functions(changeable) General purpose Sass or JavaScript functions.
publicStatic files that will be copied 1:1 to the output directory.
setup(changeable) Base files for global setup, e.g. variables or body styles.
templatesNunjucks page templates. Must contain at least a default.njk template.