Added support for WPF app
This commit is contained in:
parent
5278dadd49
commit
7b414c666c
|
@ -43,6 +43,7 @@ interfaceConf =
|
|||
ios: ["core.cljs"]
|
||||
android: ["core.cljs"]
|
||||
windows: ["core.cljs"]
|
||||
wpf: ["core.cljs"]
|
||||
common: ["handlers.cljs", "subs.cljs", "db.cljs"]
|
||||
other: []
|
||||
deps: ['[reagent "0.5.1" :exclusions [cljsjs/react]]'
|
||||
|
@ -56,6 +57,7 @@ interfaceConf =
|
|||
ios: ["core.cljs"]
|
||||
android: ["core.cljs"]
|
||||
windows: ["core.cljs"]
|
||||
wpf: ["core.cljs"]
|
||||
common: ["events.cljs", "subs.cljs", "db.cljs"]
|
||||
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
|
||||
deps: ['[reagent "0.6.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
|
||||
|
@ -69,6 +71,7 @@ interfaceConf =
|
|||
ios: ["core.cljs"]
|
||||
android: ["core.cljs"]
|
||||
windows: ["core.cljs"]
|
||||
wpf: ["core.cljs"]
|
||||
common: ["state.cljs"]
|
||||
other: [["support.cljs","re_natal/support.cljs"]]
|
||||
deps: ['[org.omcljs/om "1.0.0-alpha48" :exclusions [cljsjs/react cljsjs/react-dom]]']
|
||||
|
@ -81,6 +84,7 @@ interfaceConf =
|
|||
ios: ["core.cljs"]
|
||||
android: ["core.cljs"]
|
||||
windows: ["core.cljs"]
|
||||
wpf: ["core.cljs"]
|
||||
common: []
|
||||
other: [["sablono_compiler.clj","sablono/compiler.clj"],["support.cljs","re_natal/support.cljs"]]
|
||||
deps: ['[rum "0.10.8" :exclusions [cljsjs/react cljsjs/react-dom sablono]]']
|
||||
|
@ -432,7 +436,7 @@ init = (interfaceName, projName) ->
|
|||
# Fixes issue with packager 'TimeoutError: transforming ... took longer than 301 seconds.'
|
||||
'babel-plugin-transform-es2015-block-scoping': '6.15.0'
|
||||
|
||||
if 'windows' in platforms
|
||||
if 'windows' in platforms || 'wpf' in platforms
|
||||
pkg.dependencies['react-native-windows'] = rnVersion
|
||||
|
||||
fs.writeFileSync 'package.json', JSON.stringify pkg, null, 2
|
||||
|
@ -450,6 +454,12 @@ init = (interfaceName, projName) ->
|
|||
\"require('react-native-windows/local-cli/generate-windows')('.', '#{projName}', '#{projName}')\"
|
||||
"
|
||||
|
||||
if 'wpf' in platforms
|
||||
log 'Creating React Native WPF skeleton.'
|
||||
exec "node -e
|
||||
\"require('react-native-windows/local-cli/generate-wpf')('.', '#{projName}', '#{projName}')\"
|
||||
"
|
||||
|
||||
updateGitIgnore()
|
||||
|
||||
generateConfig(interfaceName, projName)
|
||||
|
@ -636,6 +646,7 @@ cli.command 'init <name>'
|
|||
.description 'create a new ClojureScript React Native project'
|
||||
.option "-i, --interface [#{interfaceNames.join ' '}]", 'specify React interface', defaultInterface
|
||||
.option '-u, --uwp', 'create skeleton for UWP'
|
||||
.option '-w, --wpf', 'create skeleton for WPF'
|
||||
.action (name, cmd) ->
|
||||
if typeof name isnt 'string'
|
||||
logErr '''
|
||||
|
@ -647,6 +658,8 @@ cli.command 'init <name>'
|
|||
logErr "Unsupported React interface: #{cmd.interface}, one of [#{interfaceNames}] was expected."
|
||||
if cmd.uwp?
|
||||
platforms.push 'windows'
|
||||
if cmd.wpf?
|
||||
platforms.push 'wpf'
|
||||
ensureFreePort -> init(cmd.interface, name)
|
||||
|
||||
cli.command 'upgrade'
|
||||
|
|
Loading…
Reference in New Issue