user3873396
user3873396

Reputation:

How do I set a basedir in Jade using command line

Is there a way to set 'basedir' option in jade command line? Or, maybe, another way to use absolute pathing there. Thanks.

Upvotes: 1

Views: 626

Answers (1)

ccalvert
ccalvert

Reputation: 4476

Jade has, among other options, the following

-O, --obj <str|path> JavaScript options object or JSON file containing it

So you could write something like this:

jade -O "{basedir:'/home/charlie/Git/ElfSite/Code'}" temp.jade

Or you could create a file called options.json that looked something like this:

{ "basedir": "/home/charlie/Git/ElfSite/Code", "title": "My Title" }

And then call jade like this:

jade -O options.json temp.jade

Or like this:

jade --obj options.json temp.jade

Upvotes: 1

Related Questions