Astro setup
This content is for the 0.1 version. Switch to the latest version for up-to-date documentation.
Astro setup
Section titled βAstro setupβCurrent supported frameworks
Section titled βCurrent supported frameworksβGetting started
Section titled βGetting startedβRun the Create OutSystems Astro generator:
npx create-outsystems-astroThis will create the generated files as well as an example component.
π Project Structure
Section titled βπ Project Structureβ/βββ public/βββ src/β βββ components/β βββ Counter.tsxβ βββ images/β βββ image.pngβ βββ pages/β βββ counter.astroβ βββ styles/β βββ index.cssβββ package.jsonEach page inside of the pages file should represent an Island that will be imported into OutSystems.
Components
Section titled βComponentsβThe location of the component code.
Any image assets.
Stylesheets that may apply to the component.
π§ Commands
Section titled βπ§ CommandsβAll commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install | Installs dependencies |
npm run dev | Starts local dev server at localhost:4321 |
npm run build | Build distribution to ./dist/ |
npm run output | Build OutSystems production site to ./output/ |
npm run preview | Preview build locally, before creating output |
npm run astro ... | Run CLI commands like astro add, astro check |
npm run astro -- --help | Get help using the Astro CLI |
Converting to OutSystems
Section titled βConverting to OutSystemsβ-
Copy the environment template file to
.env.Terminal window cp .env.template .env -
Update the
.envfile and modify theASSET_PATHvalue 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.