This repository was archived by the owner on Apr 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Hiplot plugin (self-contained Apps generated by Shiny or other techniques are no
44
55- ` plot.R ` : where the core computation implemented.
66- ` ui.json ` : UI controls for the plugin.
7- - ` data.json ` : set the default arguments to UI widgets and the backend `plot.R.
7+ - ` data.json ` : set the default arguments to UI widgets and the backend ` plot.R ` .
88- ` meta.json ` : set plugin metadata like author, emails, etc.
99- ` README.md ` : detail usage of the plugin in English.
1010- ` README.zh_cn.md ` : detail usage of the plugin Chinese.
Original file line number Diff line number Diff line change @@ -91,14 +91,21 @@ if (length(Args) == 1) {
9191 write_lines(TEMPLATE , file = " source.R" )
9292 message(" Done" )
9393 quit(" no" )
94+ } else {
95+ if (file.exists(Args [1 ])) {
96+ Args [2 ] <- getwd()
97+ } else {
98+ message(" The first argument should be 'template' or a R script file path for generating plugin." )
99+ quit(" no" , - 1 )
100+ }
94101 }
95102}
96103
97104if (length(Args ) == 0 ) {
98105 message(" No operations detected." )
99106 message(" Usage:" )
100- message(" \t [ hisub template] to generate a template." )
101- message(" \t [ hisub source.R ... outdir] to convert R script to Hiplot plugin." )
107+ message(" \t ` hisub template` to generate a template." )
108+ message(" \t ` hisub source.R [ ...] [ outdir]` to convert R script to Hiplot plugin." )
102109 message(" \n Details see <https://github.com/hiplot/hiplot-plugin-generator>" )
103110 quit(" no" , - 1 )
104111}
You can’t perform that action at this time.
0 commit comments