~lthms/ogmios

921f4a092744c0e06dd4a2ed4ee07db22f3a58bd — Thomas Letan 1 year, 8 months ago 0012488
front: Install build products with makefile and cp rather than gulp
2 files changed, 14 insertions(+), 39 deletions(-)

M Makefile
M gulpfile.js
M Makefile => Makefile +13 -19
@@ 1,19 1,13 @@
MIGRATION_USER := ogmios_migration
DB_OPTS        := options=-c search_path%3Ddev
DB_URL         := postgres://${MIGRATION_USER}@localhost/ogmios?${DB_OPTS}

migrate:
	@diesel migration run --database-url="${DB_URL}"

setup:
	@diesel setup --database-url="${DB_URL}"

schema:
	diesel print-schema --database-url="${DB_URL}"

revert:
	@diesel migration revert --database-url="${DB_URL}"

test_migration:
	@diesel migration run --database-url="${DB_URL}"
	@diesel migration redo --database-url="${DB_URL}"
.npm: package.json
	npm install
	touch $@

front: .npm
	gulp build
	rm -r static/semantic/
	mkdir -p static/semantic
	cp semantic/dist/semantic.min.css static/semantic
	cp semantic/dist/semantic.min.js static/semantic
	cp -r semantic/dist/themes static/semantic
	cp node_modules/croppie/croppie.min.js static/
	cp node_modules/croppie/croppie.css static/

M gulpfile.js => gulpfile.js +1 -20
@@ 4,23 4,4 @@ var
  build = require('./semantic/tasks/build')
;

gulp.task('build-front', build);

gulp.task('install-front', function() {
  gulp.src('semantic/dist/semantic.min.css')
    .pipe(gulp.dest('static/semantic/'));

  gulp.src('semantic/dist/semantic.min.js')
    .pipe(gulp.dest('static/semantic/'));

  gulp.src('semantic/dist/themes/**/*')
    .pipe(gulp.dest('static/semantic/themes'));

  gulp.src('node_modules/croppie/croppie.min.js')
    .pipe(gulp.dest('static/'));

  gulp.src('node_modules/croppie/croppie.css')
    .pipe(gulp.dest('static/'));
});

gulp.task('build', ['build-front', 'install-front']);
gulp.task('build', build);