atuin-tools Docker container¶
Version: 2.0.0
Features¶
- Python modules update
- SASS to CSS compilation
- CSS concatenation and minification
- JS concatenation, minification and obfuscation
- Images optimization without quality loss
- Translations management (translations defined through Babel)
- Pre-deploy preparation task (CSS, JS, images fine optimizations)
Container purpose¶
In modern days we use lots of different tools to build assets, compile js, minification and such. This container simplifies it by creating an environment which runs gulp and all the tools needed to build the app/static/min
folder of Atuin Web Framework.
Run the tasks¶
You can run any of the tasks from outside the container
docker-compose run --rm tools gulp prepare-deploy
or by entering the container
docker-compose run --rm tools bash
root@7dd8dbadea38:/workspace# gulp prepare-deploy
The above commands do assume you’re using this container through a docker-compose.yaml file defined by one of the Atuin Web Framework projects.
Tasks¶
gulp update¶
This task looks for the files
app/atuin/requirements.txt
app/atuincms/requirements.txt
app/requirements.txt
and install/update the modules from all the requirement’s files into app/libs
.
gulp monitor¶
This task keeps on watching the app/static/src
looking for changes into SASS, JS and images files. Each time a file is changed, it triggers the recompilation and minification process in order to keep up to date the corresponding files in the app/static/min
directory.
This task is executed by default when the atuin-tools container is run.
gulp prepare-deploy¶
It prepares all the CSS, JS and images files to be deployed by minifying as much as possible the CSS and JS files (white spaces and break lines removed).
It should be run before each application deployment.
Clashes with the gulp monitor
task may happen because they both edit the same files.
Be sure to stop the gulp monitor
task before run the gulp prepare-deploy
.
gulp clean¶
Remove files matching *.pyc, *.pyo, *.~ from all the project.
gulp clean[:min|:css|:js|:img]¶
Delete directories of minified files.
command | deleted directory |
---|---|
gulp clean:min | app/static/min |
gulp clean:css | app/static/min/css |
gulp clean:js | app/static/min/js |
gulp clean:img | app/static/min/img |
gulp translations:init -lang <code>¶
Initialize a new translation language.
gulp translations:extract¶
Extracts translations from the whole project according to the configurations found at config/Babel.cfg
. This file should be created according to the Extraction Method Mapping and Configuration.
gulp translations:update¶
Update the extracted translations to the *.po files for the initialized languages.
gulp translations:compile¶
Compile the translation messages into *.mo corresponding files for the initialized languages.
Suggested use of the container¶
This container is not meant to be used as is but part of the docker-compose environment started for development in Atuin Web Framework.
services:
tools:
image: atuinframework/atuin-tools:2.0.0
volumes:
- ./app:/workspace/app
- ./config:/workspace/config
Automatic container build¶
This container is automatically built on Docker Hub.
Documentation¶
To work on the project documentation and checkout the compiled result run
docker-compose -f docker-compose.docs.yaml up
and visit http://localhost:9999/.
Contributions¶
Do you want to take part to this project? Just send a pull request to the official repository.