Maintenance: Moved relevant files for the gulp svg icon build process to assets image folder.
(cherry picked from commit 64f5ec1bd2e3b63651dcb5d84ba38400838c3505)
This commit is contained in:
parent
8530951154
commit
eccc9a79a9
6 changed files with 40 additions and 3 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -63,6 +63,12 @@
|
||||||
|
|
||||||
# images
|
# images
|
||||||
/public/assets/images/*
|
/public/assets/images/*
|
||||||
|
/public/assets/images/yarn.lock
|
||||||
|
/public/assets/images/node_modules
|
||||||
|
!/public/assets/images/*.sh
|
||||||
|
!/public/assets/images/Dockerfile
|
||||||
|
!/public/assets/images/package.json
|
||||||
|
!/public/assets/images/gulpfile.js
|
||||||
!/public/assets/images/icons/
|
!/public/assets/images/icons/
|
||||||
!/public/assets/images/avatar-bg.png
|
!/public/assets/images/avatar-bg.png
|
||||||
!/public/assets/images/chat-demo-avatar.png
|
!/public/assets/images/chat-demo-avatar.png
|
||||||
|
|
16
public/assets/images/Dockerfile
Normal file
16
public/assets/images/Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
FROM node:8-alpine
|
||||||
|
|
||||||
|
ENV GULP_DIR "/tmp/gulp"
|
||||||
|
|
||||||
|
RUN apk update && apk add bash
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
CMD bash # If you want to override CMD
|
||||||
|
RUN npm install -g gulp
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /
|
||||||
|
|
||||||
|
# enable volume to generate build files into the hosts FS
|
||||||
|
VOLUME ["$GULP_DIR"]
|
||||||
|
|
||||||
|
# start
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
8
public/assets/images/build.sh
Executable file
8
public/assets/images/build.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
docker build --no-cache -t zammad/svg-icons-build:latest .
|
||||||
|
|
||||||
|
docker run --rm -v "$(pwd)/:/tmp/gulp" zammad/svg-icons-build:latest
|
7
public/assets/images/docker-entrypoint.sh
Executable file
7
public/assets/images/docker-entrypoint.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "${GULP_DIR}" || exit
|
||||||
|
|
||||||
|
yarn
|
||||||
|
|
||||||
|
gulp svgstore
|
|
@ -6,7 +6,7 @@ var svgmin = require('gulp-svgmin');
|
||||||
var cheerio = require('gulp-cheerio');
|
var cheerio = require('gulp-cheerio');
|
||||||
var through2 = require('through2');
|
var through2 = require('through2');
|
||||||
|
|
||||||
var iconsource = 'public/assets/images/icons/*.svg'
|
var iconsource = 'icons/*.svg'
|
||||||
|
|
||||||
gulp.task('svgstore', function () {
|
gulp.task('svgstore', function () {
|
||||||
return gulp
|
return gulp
|
||||||
|
@ -47,7 +47,7 @@ gulp.task('svgstore', function () {
|
||||||
this.push(file);
|
this.push(file);
|
||||||
cb();
|
cb();
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('public/assets/images'));
|
.pipe(gulp.dest('./'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('watch', function () {
|
gulp.task('watch', function () {
|
Loading…
Reference in a new issue