Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved sb-admin-2 assets to dependencies #370

Merged
merged 5 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Added

- Custom CSS now processed with Sass: Bootstrap and sb-admin-2 theme are compiled into a single stylesheet [#370](https://github.com/askap-vast/vast-pipeline/pull/370).
- Added `vast_pipeline/pipeline/generators.py` which contains generator functions [#382](https://github.com/askap-vast/vast-pipeline/pull/382).
- Range and NaN check on new source analysis to match forced extraction [#374](https://github.com/askap-vast/vast-pipeline/pull/374).
- Added the ability for the pipeline to read in groups of images which are defined as a single `epoch` [#277](https://github.com/askap-vast/vast-pipeline/pull/277).
Expand Down Expand Up @@ -39,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Changed

- Moved sb-admin-2 Bootstrap theme static assets to NPM package dependency [#370](https://github.com/askap-vast/vast-pipeline/pull/370).
- Refactored bulk uploading to use iterable generator objects [#382](https://github.com/askap-vast/vast-pipeline/pull/382).
- Updated validation of config file to check that all options are present and valid [#373](https://github.com/askap-vast/vast-pipeline/pull/373).
- Rewritten relation functions to improve speed [#307](https://github.com/askap-vast/vast-pipeline/pull/307).
Expand Down Expand Up @@ -66,11 +68,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

#### Removed

- Removed `static/css/pipeline.css`, this file is now produced by compiling the Sass (`scss/**/*.scss`) files with Gulp [#370](https://github.com/askap-vast/vast-pipeline/pull/370).
- Removed any storage of `meas_dj_obj` or `src_dj_obj` in the pipeline [#382](https://github.com/askap-vast/vast-pipeline/pull/382).
- Removed `static/css/collapse-box.css`, content moved to `pipeline.css` [#345](https://github.com/askap-vast/vast-pipeline/pull/345).

#### List of PRs

- [#370](https://github.com/askap-vast/vast-pipeline/pull/370) feat: moved sb-admin-2 assets to dependencies.
- [#382](https://github.com/askap-vast/vast-pipeline/pull/380) feat: Refactored bulk uploading of objects.
- [#374](https://github.com/askap-vast/vast-pipeline/pull/374) feat, fix: Bring new source checks inline with forced extraction.
- [#373](https://github.com/askap-vast/vast-pipeline/pull/373) fix: Check all options are valid and present in validate_cfg.
Expand Down
32 changes: 29 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const gulp = require('gulp'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
babel = require('gulp-babel'),
sass = require("gulp-sass"),
autoprefixer = require("gulp-autoprefixer"),
// exec = require('child_process').exec,
// spawn = require('child_process').spawn,
run = require('gulp-run-command').default,
Expand All @@ -28,6 +30,7 @@ const pathsConfig = function () {
let root = __dirname;
let dist = root + '/static';
let cssFolder = dist + '/css';
let scssFolder = root + '/scss';
let jsFolder = dist + '/js';

return {
Expand All @@ -36,6 +39,8 @@ const pathsConfig = function () {
cssDir: cssFolder,
css: cssFolder + '/**/*.css',
cssMin: cssFolder + '/**/*.min.css',
scssDir: scssFolder,
scss: scssFolder + '/**/*.scss',
jsDir: jsFolder,
js: jsFolder + '/**/*.js',
jsMin: jsFolder + '/**/*.min.js',
Expand Down Expand Up @@ -173,7 +178,13 @@ function modules() {
var bootstrapSelectCSS = gulp.src('./node_modules/bootstrap-select/dist/css/*')
.pipe(gulp.dest(paths.vendor + '/bootstrap-select/css'));

// ChartJS
// SB Admin 2 Bootstrap template
var bootstrapSbAdmin2 = gulp.src([
'./node_modules/startbootstrap-sb-admin-2/js/*.js',
'./node_modules/startbootstrap-sb-admin-2/css/*.css'
]).pipe(gulp.dest(paths.vendor + '/startbootstrap-sb-admin-2'));

// ChartJS
var chartJS = gulp.src([
'./node_modules/chart.js/dist/*.js',
'./node_modules/chartjs-plugin-error-bars/build/*.js'
Expand Down Expand Up @@ -244,7 +255,21 @@ function modules() {
var prismJsLineNumCss = gulp.src('./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css')
.pipe(gulp.dest(paths.vendor + '/prismjs/line-numbers'));

return merge(bootstrapJS, chartJS, dataTables, dataTablesButtons, fontAwesome, jquery, jqueryEasing, jszip, d3Celestial, d3CelestialData, d3CelestialImage, particlesJs, prismJs, prismJsPy, prismJsLineNum, prismJsCss, prismJsLineNumCss);
return merge(bootstrapJS, bootstrapSbAdmin2, chartJS, dataTables, dataTablesButtons, fontAwesome, jquery, jqueryEasing, jszip, d3Celestial, d3CelestialData, d3CelestialImage, particlesJs, prismJs, prismJsPy, prismJsLineNum, prismJsCss, prismJsLineNumCss);
}

// SCSS task
function scssTask() {
return gulp
.src(paths.scss)
.pipe(sass({
outputStyle: "expanded",
}))
.on("error", sass.logError)
.pipe(autoprefixer({
cascade: false
}))
.pipe(gulp.dest(paths.cssDir));
}

// CSS task
Expand Down Expand Up @@ -289,14 +314,15 @@ function jsTask() {

// Watch files
function watchFiles() {
gulp.watch(paths.scss, scssTask);
gulp.watch([paths.css, '!' + paths.cssMin], cssTask);
gulp.watch([paths.js, '!' + paths.jsMin], jsTask);
gulp.watch(paths.html, browserSyncReload);
}

// Define complex tasks
const js9 = gulp.series(js9Dir, js9MakeConfig, js9Make, js9MakeInst, js9Config)
const assets = gulp.parallel(cssTask, jsTask)
const assets = gulp.parallel(gulp.series(scssTask, cssTask), jsTask)
const vendor = gulp.series(clean, gulp.parallel(modules, js9))
const build = gulp.series(vendor, assets);
const watch = gulp.series(assets, gulp.parallel(watchFiles, browserSync));
Expand Down
Loading