- Make sure you have
nodeinstalled with a version at least 10.0.0 andyarnwith a version of at least 1.10.0. We recommend usingnvmto manage your node versions. - Fork the
dreamonkey/responsive-image-loaderrepo on GitHub. - Clone your fork to your machine with
git clone. Recommendation: name your git remotesupstreamfor this repository andoriginor<your-username>for your fork. - From the root of the project, run
yarn.
To run unit tests, run yarn test.
NOTE: Currently some Thumbor-related tests will fail randomly due to possible race conditions or time-outs.
Run them 2-3 times and they should disappear.
When using "thumbor" transformer, you can run this command from the root directory of the project using the loader, to start the thumbor container with needed configuration:
docker run -p 8888:80 --name ril-thumbor --env-file ./node_modules/@dreamonkey/responsive-image-loader/dist/src/transformers/thumbor/.thumbor-env --mount type=bind,source="$(pwd)",target=/data/loader,readonly --rm minimalcompact/thumborThen you can access the container running docker exec -it ril-thumbor bash from another terminal instance.
To run lint, run yarn lint.