Remove unused param from AssetServer

Reviewed By: jeanlauliac

Differential Revision: D6435881

fbshipit-source-id: 1d6d354e63a67f566e69d894bc22999e32b9a76f
This commit is contained in:
Rafael Oleza 2017-11-29 15:41:10 -08:00 committed by Facebook Github Bot
parent 42b7e6fcdf
commit e19f82d408
3 changed files with 1 additions and 16 deletions

View File

@ -31,7 +31,6 @@ describe('AssetServer', () => {
it('should work for the simple case', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -52,7 +51,6 @@ describe('AssetServer', () => {
it('should work for the simple case with platform ext', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -88,7 +86,6 @@ describe('AssetServer', () => {
it('should work for the simple case with jpg', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png', 'jpg'],
});
fs.__setMockFilesystem({
@ -109,7 +106,6 @@ describe('AssetServer', () => {
it('should pick the bigger one', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -131,7 +127,6 @@ describe('AssetServer', () => {
it('should pick the bigger one with platform ext', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -160,7 +155,6 @@ describe('AssetServer', () => {
it('should support multiple project roots', () => {
const server = new AssetServer({
projectRoots: ['/root', '/root2'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -188,7 +182,6 @@ describe('AssetServer', () => {
it('should get assetData', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png'],
});
fs.__setMockFilesystem({
@ -225,7 +218,6 @@ describe('AssetServer', () => {
it('should get assetData for non-png images', () => {
const server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['png', 'jpeg'],
});
fs.__setMockFilesystem({
@ -264,7 +256,6 @@ describe('AssetServer', () => {
beforeEach(() => {
server = new AssetServer({
projectRoots: ['/root'],
assetExts: ['jpg'],
});
mockFS = {

View File

@ -52,16 +52,11 @@ const readFile = denodeify(fs.readFile);
class AssetServer {
_roots: $ReadOnlyArray<string>;
_assetExts: $ReadOnlyArray<string>;
_hashes: Map<?string, string>;
_files: Map<string, string>;
constructor(options: {|
+assetExts: $ReadOnlyArray<string>,
+projectRoots: $ReadOnlyArray<string>,
|}) {
constructor(options: {|+projectRoots: $ReadOnlyArray<string>|}) {
this._roots = options.projectRoots;
this._assetExts = options.assetExts;
this._hashes = new Map();
this._files = new Map();
}

View File

@ -163,7 +163,6 @@ class Server {
this._platforms = new Set(this._opts.platforms);
this._assetServer = new AssetServer({
assetExts: this._opts.assetExts,
projectRoots: this._opts.projectRoots,
});