Browse Source

try 2

i18n
Lazar Obradovic 7 years ago
parent
commit
902180db12
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      code/gulpfile.js

+ 11
- 6
code/gulpfile.js View File

@ -60,19 +60,22 @@ var toHeader = function(filename) {
var data = fs.readFileSync(source);
wstream.write('#define ' + safename + '_len ' + data.length + '\n');
wstream.write('const uint8_t ' + safename + '[] PROGMEM = {')
wstream.write('const uint8_t ' + safename + '[] PROGMEM = {');
for (i=0; i<data.length; i++) {
if (i % 20 == 0) wstream.write("\n");
for (var i=0; i<data.length; i++) {
if (i % 20 == 0) wstream.write('\n');
wstream.write('0x' + ('00' + data[i].toString(16)).slice(-2));
if (i<data.length-1) wstream.write(',');
if (i<data.length-1) {
wstream.write(',');
}
}
wstream.write('\n};')
wstream.write('\n};');
wstream.end();
}
function htmllintReporter(filepath, issues) {
if (issues.length > 0) {
issues.forEach(function (issue) {
@ -82,6 +85,7 @@ function htmllintReporter(filepath, issues) {
}
}
gulp.task('build_certs', function() {
toHeader('server.cer');
toHeader('server.key');
@ -115,6 +119,7 @@ gulp.task('buildfs_inline', function() {
}))
.pipe(gzip())
.pipe(gulp.dest(dataFolder));
})
});
gulp.task('default', ['buildfs_embeded']);

Loading…
Cancel
Save