mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-24 20:18:18 +00:00
updates dockerfile to rebuild when js/css change
This commit is contained in:
@@ -12,6 +12,7 @@ RUN ln -s /site/config.toml /run \
|
||||
&& ln -s /site/data /run \
|
||||
&& ln -s /site/layouts /run \
|
||||
&& ln -s /site/src /run \
|
||||
&& ln -s /site/static /run \
|
||||
&& ln -s /site/themes /run \
|
||||
&& ln -s /site/scripts /run
|
||||
|
||||
|
||||
+2
-14
@@ -75,9 +75,9 @@ gulp.task('init-watch', () => {
|
||||
});
|
||||
$.watch('src/sass/**/*.scss', () => gulp.start('sass'));
|
||||
$.watch('node_modules/rancher-website-theme/**/*.scss', () => gulp.start('sass'));
|
||||
$.watch('src/js/**/*.js', () => gulp.start('js'));
|
||||
$.watch('src/js/**/*.js', () => gulp.start('build:app'));
|
||||
$.watch('src/img/**/*', () => gulp.start('img'));
|
||||
$.watch(['archetypes/**/*', 'data/**/*', 'content/**/*', 'layouts/**/*', 'static/**/*', 'themes/**/*', 'node_modules/rancher-website-theme/**/*', 'config.toml'], () => gulp.start('hugo-dev'));
|
||||
$.watch(['archetypes/**/*', 'data/**/*', 'content/**/*', 'layouts/**/*', 'static/**/*.{js,css}', 'themes/**/*', 'node_modules/rancher-website-theme/**/*', 'config.toml'], () => gulp.start('hugo-dev'));
|
||||
});
|
||||
|
||||
|
||||
@@ -129,18 +129,6 @@ gulp.task('build:app', () => {
|
||||
.pipe(gulp.dest('static/js'));
|
||||
});
|
||||
|
||||
gulp.task('js', () => {
|
||||
return gulp.src([
|
||||
'src/js/**/*.js'
|
||||
])
|
||||
.pipe($.plumber({ errorHandler: onError }))
|
||||
.pipe($.babel())
|
||||
.pipe($.concat('app.js'))
|
||||
.pipe($.if(isProduction, $.uglify()))
|
||||
.pipe($.size({ gzip: true, showFiles: true }))
|
||||
.pipe(gulp.dest('static/js'));
|
||||
});
|
||||
|
||||
gulp.task('fonts', () => {
|
||||
return gulp.src('src/fonts/**/*.{woff,woff2}')
|
||||
.pipe(gulp.dest('static/fonts'));
|
||||
|
||||
Reference in New Issue
Block a user