This project contains the sourcecode of the LITTIL website.
For more information about setting up your local development environment, please read set up your development environment.
The project files are split into two main folders: 'components' and 'pages'.
We are using TailwindCSS to style our application. Keep these few rules in mind when styling:
.scss
.@apply
: if styling in the .scss
is nesseccary, add ALL classes to the .scss
. Tailwind classes can be added by using @apply:body {
@apply w-10;
}
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
Run npm run openapi
to generate API servicees and models
Note that production-grade deployments should happen from a pipeline so that one single build (artifact) can be tested on staging, then deployed production, and persisted in the pipeline (for at least some time).
To do a manual deployment to staging though, run npm run build
to produce the compiled application in ./dist
. Deploy this application by copying all files in ./dist/littil-org-website/
to a static web server file-system (such as the S3 bucket used in AWS). Finally, copy the local config.staging.js
to config.js
in the target.
To enable environment-specific configuration without having to create a separate artifact per environment or resort to running a dedicated node server or container, a config.js file is used.
This config.js is loaded in index.html using a regular Githubissues.