Aspectran Assets is a utility project for building and deploying CSS, JS, Fonts, and Images commonly used in Aspectran's demo applications. It uses a SASS compiler to build minified CSS from SASS sources for various front-end frameworks and provides a runnable server to test the generated assets.
- Manages front-end assets for multiple frameworks (Bootstrap, Foundation).
- Compiles
.scsssource files into minified.cssusing Dart SASS. - Provides a runnable, self-contained Aspectran application using an embedded Undertow server to preview assets.
- Outputs a clean, versioned directory structure for easy use in other projects.
- Java 21 or higher
- Maven 3.9.4 or higher
You can build the assets for each CSS framework by activating the corresponding Maven profile. The compiled assets will be located in the app/webroot/assets/ directory.
To compile only the Bootstrap assets, run the following command:
mvn clean package -P css-bootstrapTo compile only the Foundation assets, run the following command:
mvn clean package -P css-foundationTo compile all available assets, activate all profiles:
mvn clean package -P css-bootstrap,css-foundationThis project includes a runnable server to preview the compiled assets and test pages.
-
Navigate to the
appdirectory:cd app -
Start the interactive shell:
- On Linux/macOS:
./bin/shell.sh
- On Windows:
.\bin\shell.bat
- On Linux/macOS:
-
Access the test pages: Once the server starts, you can access the test pages in your browser (the default port is usually 8080, but check the application configuration).
-
Stop the server: To shut down the application, type
quitat the prompt in the interactive shell and press Enter.> quit
src/main/scss/: Contains the SASS source files, organized by framework (e.g.,bootstrap,foundation). This is where you should modify styles.app/webroot/assets/: Contains the final, compiled CSS assets, organized by framework and version. This directory is the document root of the test server.app/: A runnable Aspectran application distribution, containing all necessary scripts, configurations, and libraries.
Aspectran Assets is licensed under the Apache License, Version 2.0.