mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
move woff to fonts folder for clarity
This commit is contained in:
@@ -38,11 +38,18 @@ var buildHeader = function (name) {
|
|||||||
var filename = parts[parts.length - 1];
|
var filename = parts[parts.length - 1];
|
||||||
var extension = filename.split('.')[1];
|
var extension = filename.split('.')[1];
|
||||||
|
|
||||||
|
console.info('Creating file: ' + filename);
|
||||||
|
|
||||||
// var safename = name.split('.').join('_');
|
// var safename = name.split('.').join('_');
|
||||||
var safename = name.replace(/\.|-/g, "_");
|
var safename = name.replace(/\.|-/g, "_");
|
||||||
|
|
||||||
var destination = "../../src/webh/" + filename + ".h";
|
var destination = "../../src/webh/" + filename + ".h";
|
||||||
|
|
||||||
|
// check for woff files which should be fonts
|
||||||
|
if (extension === "woff") {
|
||||||
|
extension = "fonts";
|
||||||
|
}
|
||||||
|
|
||||||
// html files go into root
|
// html files go into root
|
||||||
if (extension === "html") {
|
if (extension === "html") {
|
||||||
var source = "../../src/websrc/temp/gzipped/" + name + ".gz";
|
var source = "../../src/websrc/temp/gzipped/" + name + ".gz";
|
||||||
@@ -50,8 +57,6 @@ var buildHeader = function (name) {
|
|||||||
var source = "../../src/websrc/temp/gzipped/" + extension + "/" + name + ".gz";
|
var source = "../../src/websrc/temp/gzipped/" + extension + "/" + name + ".gz";
|
||||||
}
|
}
|
||||||
|
|
||||||
console.info('Creating file: ' + filename + ' Extension: ' + extension);
|
|
||||||
|
|
||||||
var wstream = fs.createWriteStream(destination);
|
var wstream = fs.createWriteStream(destination);
|
||||||
wstream.on('error', function (err) {
|
wstream.on('error', function (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -128,12 +133,12 @@ gulp.task('requiredcss', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("fontwoff", function () {
|
gulp.task("fontwoff", function () {
|
||||||
return gulp.src("../../src/websrc/3rdparty/woff/*.*")
|
return gulp.src("../../src/websrc/3rdparty/fonts/*.*")
|
||||||
.pipe(gulp.dest("../../src/websrc/temp/woff/"))
|
.pipe(gulp.dest("../../src/websrc/temp/fonts/"))
|
||||||
.pipe(gzip({
|
.pipe(gzip({
|
||||||
append: true
|
append: true
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('../../src/websrc/temp/gzipped/woff/'))
|
.pipe(gulp.dest('../../src/websrc/temp/gzipped/fonts/'))
|
||||||
.pipe(buildHeader('glyphicons-halflings-regular.woff'));
|
.pipe(buildHeader('glyphicons-halflings-regular.woff'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user