git.berlin/gulpfile.js

35 lines
718 B
JavaScript
Raw Permalink Normal View History

2024-02-02 19:49:04 +01:00
const gulp = require('gulp')
const rsync = require('gulp-rsync')
const browser = require('browser-sync').create()
2016-04-30 18:20:09 +02:00
// paths
2024-02-02 19:49:04 +01:00
const DIST = './custom/'
2016-10-16 00:41:56 +02:00
//
// Dev Server
//
2018-12-07 15:13:40 +01:00
gulp.task('server', () => {
2016-10-16 00:41:56 +02:00
browser.init({
server: DIST,
port: 1337,
reloadDebounce: 2000
})
})
2016-04-30 18:20:09 +02:00
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Deployment
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-02 19:49:04 +01:00
gulp.task('deploy', () =>
gulp.src(DIST + '**/*').pipe(
rsync({
2018-12-07 15:13:40 +01:00
root: DIST,
hostname: 'git',
2024-02-02 19:49:04 +01:00
destination: 'gitea/custom',
2024-02-02 17:59:28 +01:00
chown: 'git:git',
2024-02-02 19:49:04 +01:00
delete: true,
exclude: ['conf/']
})
)
)