Skip to content

Commit

Permalink
some gulp cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Jan 30, 2020
1 parent b81cdb8 commit 2ab92e7
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,38 +139,24 @@ function rtl_style_color() {
// compile rtl themes
const rtl_styles = gulp.parallel(rtl_style_uni, rtl_style_color);

// append rtl css to all style themes
// also, create list of all themes for style_list to use
// update directional file
function rtl_setup(done) {
const uni = glob.sync(config.src.styles.style_uni);
const colors = glob.sync(config.src.styles.style_color);
config.all = uni.concat(colors);

// backup and update directional file
fs.copyFile(config.src.styles.directional, config.src.styles.directional + '.temp', (err) => {
if (err) throw err;
replace({
files: config.src.styles.directional,
from: /ltr \!default/g,
to: 'rtl !default',
}).then(done());
});
replace({
files: config.src.styles.directional,
from: /ltr !default/,
to: 'rtl !default',
}).then(done());
}

// revert directional file
function rtl_teardown(done) {
replace({
files: config.src.styles.directional,
from: /rtl \!default/g,
from: /rtl !default/,
to: 'ltr !default',
}).then(function () {
fs.unlink(config.src.styles.directional + '.temp', (err) => {
if (err) throw err;
done();
});
});
}).then(done());
}


// Copies (and distills, if possible) assets from node_modules to public/assets
function install(done) {
// combine dependencies and napa sources into one object
Expand Down

0 comments on commit 2ab92e7

Please sign in to comment.