1
0
Fork 0
mirror of https://github.com/rsheldiii/KeyV2.git synced 2025-06-26 00:39:53 +00:00

add gulp files and an explanation of build process options

This commit is contained in:
Robert Sheldon 2018-06-03 16:14:17 -04:00
parent 4f56815cc6
commit 5247b4bcdd
6 changed files with 4482 additions and 2 deletions

23
gulpfile.js Executable file
View file

@ -0,0 +1,23 @@
var gulp = require('gulp');
const shell = require('gulp-shell');
const changedInPlace = require('gulp-changed-in-place');
const changed = require('gulp-changed');
// var del = require('del');
var paths = {
compile: ['*.scad'], // '**/*.scad',
};
gulp.task('compile', function() {
// recompile any changed openscad files
return gulp.src(paths.compile)
.pipe(changedInPlace({howToDetermineDifference: "modification-time"})) // TODO doesnt work for literally no reason
.pipe(shell([
// 'openscad compile/compile.scad -o compile/out.stl > 1'
'openscad <%= file.relative %> -o <%= file.relative %>.stl'
], { verbose: true, shell: '/bin/bash'}))
});
gulp.task('default', function() {
gulp.watch(paths.compile, gulp.series('compile'));
});