Configuration
Pinecone uses a pine.config.json file to configure your project.
Config File Location
By default, Pinecone looks for pine.config.json in the current directory. You can specify a different path using the --config flag:
Options
entry
Required - Path to your main PineScript entry file.
The path is relative to the config file location.
output
Required - Path where the bundled output will be written.
The directory will be created if it doesn't exist.
Complete Example
Import and Export Directives
Exporting
Use // @export to mark functions for export:
Export multiple functions:
Importing
Use // @import to import functions from other files:
Import multiple functions:
Path Requirements
- Paths must be relative (start with
./or../) - Paths must include the
.pineextension - Use forward slashes
/even on Windows
Project Structure
A typical project structure:
my-project/
├── pine.config.json
├── dist/
│ └── bundle.pine # Generated output
└── src/
├── main.pine # Entry point
├── utils/
│ ├── math.pine
│ └── format.pine
└── indicators/
├── rsi.pine
└── macd.pine
You can organize your files however you like - Pinecone will resolve all imports automatically.