提交 12174193 编写于 作者: J Joao Moreno

missing build compilation

上级 4dd25bb3
......@@ -462,7 +462,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) {
contents.push(index < modules.length - 1 ? '\t],' : '\t]');
});
contents.push('});');
emitter.queue(new File({ path: bundle + '.nls.' + language.id + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') }));
emitter.queue(new File({ path: bundle + '.nls.' + language.id + '.js', contents: Buffer.from(contents.join('\n'), 'utf-8') }));
});
});
Object.keys(statistics).forEach(function (key) {
......@@ -559,7 +559,7 @@ function createXlfFilesForCoreBundle() {
var filePath = xlf.project + "/" + resource.replace(/\//g, '_') + ".xlf";
var xlfFile = new File({
path: filePath,
contents: new Buffer(xlf.toString(), 'utf8')
contents: Buffer.from(xlf.toString(), 'utf8')
});
this.queue(xlfFile);
}
......@@ -636,7 +636,7 @@ function createXlfFilesForExtensions() {
if (_xlf) {
var xlfFile = new File({
path: path.join(extensionsProject, extensionName + '.xlf'),
contents: new Buffer(_xlf.toString(), 'utf8')
contents: Buffer.from(_xlf.toString(), 'utf8')
});
folderStream.queue(xlfFile);
}
......@@ -703,7 +703,7 @@ function createXlfFilesForIsl() {
xlf.addFile(originalPath, keys, messages);
// Emit only upon all ISL files combined into single XLF instance
var newFilePath = path.join(projectName, resourceFile);
var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') });
var xlfFile = new File({ path: newFilePath, contents: Buffer.from(xlf.toString(), 'utf-8') });
this.queue(xlfFile);
});
}
......@@ -1049,7 +1049,7 @@ function createI18nFile(originalFilePath, messages) {
var content = JSON.stringify(result, null, '\t').replace(/\r\n/g, '\n');
return new File({
path: path.join(originalFilePath + '.i18n.json'),
contents: new Buffer(content, 'utf8')
contents: Buffer.from(content, 'utf8')
});
}
var i18nPackVersion = "1.0.0";
......@@ -1189,7 +1189,7 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
var filePath = basename + "." + language.id + ".isl";
return new File({
path: filePath,
contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), innoSetup.codePage)
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8'), innoSetup.codePage)
});
}
function encodeEntities(value) {
......
......@@ -79,7 +79,7 @@ function isImportNode(node) {
function fileFrom(file, contents, path) {
if (path === void 0) { path = file.path; }
return new File({
contents: new Buffer(contents),
contents: Buffer.from(contents),
base: file.base,
cwd: file.cwd,
path: path
......
......@@ -57,7 +57,7 @@ function loader(bundledFileHeader, bundleLoader) {
this.emit('data', new VinylFile({
path: 'fake',
base: '',
contents: new Buffer(bundledFileHeader)
contents: Buffer.from(bundledFileHeader)
}));
this.emit('data', data);
}
......@@ -96,7 +96,7 @@ function toConcatStream(bundledFileHeader, sources, dest) {
return new VinylFile({
path: source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake',
base: base,
contents: new Buffer(source.contents)
contents: Buffer.from(source.contents)
});
});
return es.readArray(treatedSources)
......@@ -139,7 +139,7 @@ function optimizeTask(opts) {
bundleInfoArray.push(new VinylFile({
path: 'bundleInfo.json',
base: '.',
contents: new Buffer(JSON.stringify(result.bundleData, null, '\t'))
contents: Buffer.from(JSON.stringify(result.bundleData, null, '\t'))
}));
}
es.readArray(bundleInfoArray).pipe(bundleInfoStream);
......
......@@ -143,7 +143,7 @@ function loadSourcemaps() {
cb(null, f);
return;
}
f.contents = new Buffer(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8');
f.contents = Buffer.from(contents.replace(/\/\/# sourceMappingURL=(.*)$/g, ''), 'utf8');
fs.readFile(path.join(path.dirname(f.path), lastMatch[1]), 'utf8', function (err, contents) {
if (err) {
return cb(err);
......@@ -160,7 +160,7 @@ function stripSourceMappingURL() {
var output = input
.pipe(es.mapSync(function (f) {
var contents = f.contents.toString('utf8');
f.contents = new Buffer(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8');
f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, ''), 'utf8');
return f;
}));
return es.duplex(input, output);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册