Moved platform modules into platform section in .re-natal
This commit is contained in:
parent
b5a2865bc5
commit
ae6ef24250
|
@ -531,12 +531,10 @@ updateIosRCTWebSocketExecutor = (iosHost) ->
|
||||||
platformModulesAndImages = (config, platform) ->
|
platformModulesAndImages = (config, platform) ->
|
||||||
images = scanImages(config.imageDirs).map (fname) -> './' + fname;
|
images = scanImages(config.imageDirs).map (fname) -> './' + fname;
|
||||||
modulesAndImages = config.modules.concat images;
|
modulesAndImages = config.modules.concat images;
|
||||||
if typeof config.modulesPlatform is 'undefined'
|
if typeof config.platforms[platform].modules is 'undefined'
|
||||||
config.modulesPlatform = {};
|
|
||||||
if typeof config.modulesPlatform is 'undefined' or typeof config.modulesPlatform[platform] is 'undefined'
|
|
||||||
modulesAndImages
|
modulesAndImages
|
||||||
else
|
else
|
||||||
modulesAndImages.concat(config.modulesPlatform[platform])
|
modulesAndImages.concat(config.platforms[platform].modules)
|
||||||
|
|
||||||
generateDevScripts = () ->
|
generateDevScripts = () ->
|
||||||
try
|
try
|
||||||
|
@ -628,11 +626,9 @@ useComponent = (name, platform) ->
|
||||||
config.modules.push name
|
config.modules.push name
|
||||||
log "Component '#{name}' is now configured for figwheel, please re-run 'use-figwheel' command to take effect"
|
log "Component '#{name}' is now configured for figwheel, please re-run 'use-figwheel' command to take effect"
|
||||||
else if platforms.indexOf(platform) > -1
|
else if platforms.indexOf(platform) > -1
|
||||||
if typeof config.modulesPlatform is 'undefined'
|
if typeof config.platforms[platform].modules is 'undefined'
|
||||||
config.modulesPlatform = {}
|
config.platforms[platform].modules = []
|
||||||
if typeof config.modulesPlatform[platform] is 'undefined'
|
config.platforms[platform].modules.push name
|
||||||
config.modulesPlatform[platform] = []
|
|
||||||
config.modulesPlatform[platform].push name
|
|
||||||
log "Component '#{name}' (#{platform}-only) is now configured for figwheel, please re-run 'use-figwheel' command to take effect"
|
log "Component '#{name}' (#{platform}-only) is now configured for figwheel, please re-run 'use-figwheel' command to take effect"
|
||||||
else
|
else
|
||||||
throw new Error("unsupported platform: #{platform}")
|
throw new Error("unsupported platform: #{platform}")
|
||||||
|
|
Loading…
Reference in New Issue