mirror of
https://github.com/status-im/re-natal.git
synced 2025-02-28 12:10:37 +00:00
add commands to enable auto-require feature
This commit is contained in:
parent
b423f76ab7
commit
d4c45e8777
@ -854,6 +854,15 @@ inferComponents = () ->
|
|||||||
else
|
else
|
||||||
log "no new component was imported, defaulting to #{Array.from(modules)}"
|
log "no new component was imported, defaulting to #{Array.from(modules)}"
|
||||||
|
|
||||||
|
autoRequire = (enabled) ->
|
||||||
|
config = readConfig()
|
||||||
|
config.autoRequire = enabled
|
||||||
|
writeConfig(config)
|
||||||
|
if (enabled)
|
||||||
|
log "Auto-Require feature is enabled in use-figwheel command"
|
||||||
|
else
|
||||||
|
log "Auto-Require feature is disabled in use-figwheel command"
|
||||||
|
|
||||||
cli._name = 're-natal'
|
cli._name = 're-natal'
|
||||||
cli.version pkgJson.version
|
cli.version pkgJson.version
|
||||||
|
|
||||||
@ -931,6 +940,16 @@ cli.command 'enable-source-maps'
|
|||||||
.action () ->
|
.action () ->
|
||||||
patchReactNativePackager()
|
patchReactNativePackager()
|
||||||
|
|
||||||
|
cli.command 'enable-auto-require'
|
||||||
|
.description 'Enables scanning for requires in cljs files and automatically add them in use-figwheel'
|
||||||
|
.action () ->
|
||||||
|
autoRequire(true)
|
||||||
|
|
||||||
|
cli.command 'disable-auto-require'
|
||||||
|
.description 'Disables auto-require feature in use-figwheel command'
|
||||||
|
.action () ->
|
||||||
|
autoRequire(false)
|
||||||
|
|
||||||
cli.command 'copy-figwheel-bridge'
|
cli.command 'copy-figwheel-bridge'
|
||||||
.description 'copy figwheel-bridge.js into project'
|
.description 'copy figwheel-bridge.js into project'
|
||||||
.action () ->
|
.action () ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user