lapis icon indicating copy to clipboard operation
lapis copied to clipboard

add a --config option

Open DarkWiiPlayer opened this issue 7 years ago • 4 comments

~~This is my last issue for today. I promise.~~ I am so, so sorry!

One of the first things I tend to do when creating a new project is making a config.lua file, which requires me to open the lapis reference and copy the template file. Since this is such a common task, why not add a --config option to lapis to automatically generate an empty config file (pretty much like --git and --tup work)

-- I don't do moonscript, but by the magic of Ctrl+C Ctrl+V this code should™ be OK
if flags.config
    if flags.lua
        @write_file_safe "config.lua", require("lapis.cmd.templates.config_lua") flags
    else
        @write_file_safe "config.moon", require("lapis.cmd.templates.config_moon") flags

DarkWiiPlayer avatar Jan 05 '17 08:01 DarkWiiPlayer

Something like this? https://github.com/CriztianiX/lapis/commit/b9667ee49e54301bb73b909f12541630801035bd

CriztianiX avatar Jan 05 '17 20:01 CriztianiX

I agree we should have new create a config file. I'm fine with it being on by default too

leafo avatar Jan 05 '17 20:01 leafo

https://github.com/leafo/lapis/pull/505

CriztianiX avatar Jan 05 '17 20:01 CriztianiX

Any thoughts / progress on this?

TangentFoxy avatar Mar 04 '18 23:03 TangentFoxy