Minor lint fixes

Reviewed By: jeanlauliac

Differential Revision: D5111517

fbshipit-source-id: 5cf8884334b881fb9a2b1b490972faf45c0c569b
This commit is contained in:
Christoph Pojer
2017-05-23 06:46:37 -07:00
committed by Facebook Github Bot
parent 657ea49bd6
commit af90bab993
7 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ class Bundle extends BundleBase {
result.sections.push({
offset: {line, column: 0},
map: map,
map,
});
line += module.code.split('\n').length;
});
+2 -2
View File
@@ -198,7 +198,7 @@ class Bundler {
}
);
const getTransformCacheKey = (options) => {
const getTransformCacheKey = options => {
return transformCacheKey + getCacheKey(options);
};
@@ -810,7 +810,7 @@ class Bundler {
inlineRequires: transform.inlineRequires || false,
platform,
projectRoot: options.projectRoots[0],
}
},
},
preloadedModules: extraOptions.preloadedModules,
ramGroups: extraOptions.ramGroups,
+1 -1
View File
@@ -72,5 +72,5 @@ function filterObject(object, blacklist) {
module.exports = {
generateAssetCodeFileAst,
generateAssetTransformResult,
isAssetTypeAnImage
isAssetTypeAnImage,
};
+3 -2
View File
@@ -18,14 +18,15 @@ const {UGLIFY_JS_OUTPUT_OPTIONS} = require('./JsMinification');
import type {MappingsMap} from '../../lib/SourceMap';
function minify(filename: string, inputCode: string, sourceMap: ?MappingsMap) {
let {code, map} = uglify.minify(inputCode, {
const result = uglify.minify(inputCode, {
fromString: true,
inSourceMap: sourceMap,
outSourceMap: true,
output: UGLIFY_JS_OUTPUT_OPTIONS,
});
map = JSON.parse(map);
const code = result.code;
const map = JSON.parse(result.map);
map.sources = [filename];
return {code, map};
}
+1 -1
View File
@@ -386,7 +386,7 @@ class OptionsHasher {
hashTransformOptions(hash: crypto$Hash, options: TransformOptionsStrict): crypto$Hash {
const {
generateSourceMaps, dev, hot, inlineRequires, platform, projectRoot,
...unknowns,
...unknowns
} = options;
const unknownKeys = Object.keys(unknowns);
if (unknownKeys.length > 0) {
+1 -1
View File
@@ -61,7 +61,7 @@ function tryParse(
assetName: path.join(dirPath, `${rootName}.${extension}`),
name: rootName,
platform,
resolution: resolution,
resolution,
type: extension,
};
}
+1 -1
View File
@@ -134,7 +134,7 @@ function transform({filename, options, src}: Params) {
ast: null,
code: src,
filename,
map: null
map: null,
};
} else {
const result = generate(ast, {