Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
514 B
21 lines
514 B
2 years ago
|
"use strict";
|
||
|
|
||
|
var fs = require('fs');
|
||
|
|
||
|
var cacheLoader = require('../cacheLoader');
|
||
|
|
||
|
module.exports = cacheLoader(function (bundle) {
|
||
|
return new Promise(function (resolve, reject) {
|
||
|
fs.readFile(__dirname + bundle, 'utf8', function (err, data) {
|
||
|
if (err) {
|
||
|
reject(err);
|
||
|
} else {
|
||
|
// wait for the next event loop iteration, so we are sure
|
||
|
// the current module is fully loaded
|
||
|
setImmediate(function () {
|
||
|
resolve(data);
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|