-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Migrate MO Skyrim and vs15 themes to MO2. Fix some small things. - Update gulp tasks to support generic themes - Update `gulp` to `^4.0.0`
- Loading branch information
0 parents
commit 8907558
Showing
85 changed files
with
8,117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const gulp = require('gulp') | ||
const pump = require('pump') | ||
const sass = require('gulp-sass') | ||
const replace = require('gulp-replace') | ||
const rename = require('gulp-rename') | ||
const del = require('del') | ||
|
||
const { theme, dest } = require('minimist')(process.argv.slice(3)) | ||
|
||
if (!theme) { | ||
throw new Error(`'theme' parameter is required`) | ||
} | ||
|
||
const sassGlob = `themes/${theme}/sass/**/*.scss` | ||
const imagesGlob = `themes/${theme}/images/*.png` | ||
const destPath = dest || `./dist/` | ||
const imagesDest = `${destPath}/${theme}/` | ||
|
||
function clean() { | ||
return del([`${imagesDest}/**`, `${destPath}/${theme}*.qss`], { | ||
force: true | ||
}) | ||
} | ||
|
||
function copyImages(done) { | ||
pump([gulp.src(imagesGlob), gulp.dest(imagesDest)], done) | ||
} | ||
|
||
function buildCss(done) { | ||
pump( | ||
[ | ||
gulp.src(sassGlob), | ||
sass().on('error', sass.logError), | ||
replace('/*POSTSASS ', ''), | ||
replace(' POSTSASS*/', ''), | ||
replace(/\nSTUB/g, ''), | ||
rename({ extname: '.qss' }), | ||
gulp.dest(destPath) | ||
], | ||
done | ||
) | ||
} | ||
|
||
exports.build = gulp.series(clean, gulp.parallel(buildCss, copyImages)) | ||
|
||
exports.watch = () => | ||
gulp.watch( | ||
sassGlob, | ||
{ ignoreInitial: false }, | ||
gulp.parallel(buildCss, copyImages) | ||
) |
Oops, something went wrong.