Add new service in your docker-compose.yaml
npm:
image: miroff/npm-uglify:latest
working_dir: /app
volumes:
- .:/app
command: tail -f /dev/null
Create dc_js
#!/usr/bin/env bash
docker-compose exec -T -- npm terser "$@"
Create dc_sass
#!/usr/bin/env bash
docker-compose exec -T -- npm sass "$@"
Don't forget to make them executable
chmod +x bin/*
and in PhpStorm:
Programm:
PROJECT_ROOT_DIRECTORY/bin/dc_sass
Arguments:
--update /app/$FileRelativeDir$/$FileName$:/app/$FileRelativeDir$/$FileNameWithoutAllExtensions$.min.css --style compressed
and in PhpStorm:
Programm:
PROJECT_ROOT_DIRECTORY/bin/dc_js
Arguments:
/app/$FileRelativeDir$/$FileName$ -o /app/$FileRelativeDir$/$FileNameWithoutExtension$.min.js -c --mangle --source-map
Content type
Image
Digest
sha256:7ae488fc7…
Size
602.7 MB
Last updated
about 2 years ago
docker pull miroff/npm-uglify