Browse Source

gulp

master
rdrew 1 year ago
parent
commit
67c3ad8e94
  1. 13
      config.yml
  2. 40
      gulpfile.js

13
config.yml

@ -1,17 +1,18 @@
SITE: SITE:
Local: 'https://roblib2023.lndo.site/' Local:
Url: 'https://d10_dev.lndo.site/'
Remote: Remote:
Url: 'https://rdm2.researchspaces.ca/' Url: 'https://library-d10.researchspaces.ca/'
Path: user Path: user
PORT: 8000 PORT: 8000
BSREWRITE: BSREWRITE:
Css: Css:
Match: '/themes/contrib/rdm/css/style.css' Match: '/themes/custom/roblib_2023/css/global-style.css'
Replace: '/css/style.css' Replace: '/css/global-style.css'
Js: Js:
Match: "/themes/contrib/RDM/js/" Match: "/themes/custom/roblib_2023/js/custom_js.js"
Replace: "/js/" Replace: "/js/custom_js.js"
PATHS: PATHS:
Watch: Watch:
#changes in these compiled files trigged reload #changes in these compiled files trigged reload

40
gulpfile.js

@ -20,15 +20,15 @@ function loadConfig() {
function bsInit__local(done) { function bsInit__local(done) {
browsersync.init({ browsersync.init({
logLevel: 'debug', logLevel: 'debug',
//proxy: SITE.Local.Url, proxy: SITE.Local.Url,
proxy: 'https://roblib2023.lndo.site/' //proxy: 'https://d10_dev.lndo.site/',
}); });
done(); done();
} }
function bsInit__remote(done) { function bsInit__remote(done) {
browsersync.init({ browsersync.init({
//logLevel: 'debug', logLevel: 'debug',
proxy: SITE.Remote.Url, proxy: SITE.Remote.Url,
serveStatic: ['.'], serveStatic: ['.'],
files: PATHS.Watch, files: PATHS.Watch,
@ -61,24 +61,22 @@ function drush() {
// Compile CSS // Compile CSS
function styles() { function styles() {
'use strict'; 'use strict';
return ( return gulp
gulp //.src(PATHS.Scss.Dir + '/**/*.scss')
//.src(PATHS.Scss.Dir + '/**/*.scss') .src('./css/sass/**/*.scss')
.src('./css/sass/**/*.scss') .pipe(plumber())
.pipe(plumber()) .pipe(sourcemaps.init())
.pipe(sourcemaps.init()) .pipe(
.pipe( sass
sass .sync({
.sync({ includePaths: PATHS.Scss.Libraries
includePaths: PATHS.Scss.Libraries })
}) .on('error', sass.logError)
.on('error', sass.logError) )
) .pipe(sourcemaps.write('.'))
.pipe(sourcemaps.write('.')) //.pipe(gulp.dest(PATHS.Css.Dir))
//.pipe(gulp.dest(PATHS.Css.Dir)) .pipe(gulp.dest('./css'))
.pipe(gulp.dest('./css')) .pipe(browsersync.stream());
.pipe(browsersync.stream())
);
} }
// Watch Files // Watch Files

Loading…
Cancel
Save