Skip to content

Astro setup

This content is for the 0.1 version. Switch to the latest version for up-to-date documentation.

Run the Create OutSystems Astro generator:

Terminal window
npx create-outsystems-astro

This will create the generated files as well as an example component.

/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚ └── components/
β”‚ └── Counter.tsx
β”‚ └── images/
β”‚ └── image.png
β”‚ └── pages/
β”‚ └── counter.astro
β”‚ └── styles/
β”‚ └── index.css
└── package.json

Each page inside of the pages file should represent an Island that will be imported into OutSystems.

The location of the component code.

Any image assets.

Stylesheets that may apply to the component.

All commands are run from the root of the project, from a terminal:

CommandAction
npm installInstalls dependencies
npm run devStarts local dev server at localhost:4321
npm run buildBuild distribution to ./dist/
npm run outputBuild OutSystems production site to ./output/
npm run previewPreview build locally, before creating output
npm run astro ...Run CLI commands like astro add, astro check
npm run astro -- --helpGet help using the Astro CLI
  • Copy the environment template file to .env.

    Terminal window
    cp .env.template .env
  • Update the .env file and modify the ASSET_PATH value to be the application/library/core widget module name in OutSystems.

  • Once development is complete, run:

    Terminal window
    npm run output

This will create a set of files that will then need to be coverted to OutSystems components.