assist with jade spell

19 views
Skip to first unread message

Anthony Kerz

unread,
Aug 12, 2014, 11:11:25 PM8/12/14
to warlock...@googlegroups.com

hey jdm,

trying to create a jade spell and running into some issues. hoping you could take a look and give me some pointers.

so here is the spell: https://github.com/tony-kerz/spell-jade

and here is the test app: https://github.com/tony-kerz/warlock-test

i used npm link to point the test app at the spell locally, and
​when i run warlock while in the test app folder, i get:

warlock-test $ warlock
​warlock] ReferenceError: jade is not defined

i ran npm install and bower install prior…

regards,

tony.

Josh David Miller

unread,
Aug 13, 2014, 12:22:23 AM8/13/14
to Anthony Kerz, warlock...@googlegroups.com

Hey Tony!

Indeed, on your import you left it as `sass = require "gulp-jade" `, so the variable "jade" is indeed undefined. :-)

Josh
(Sent from my mobile)

--
You received this message because you are subscribed to the Google Groups "Warlock Build System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to warlock-engin...@googlegroups.com.
To post to this group, send email to warlock...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/warlock-engine/12ffb4c7-50cf-4099-9296-22c2058ea1e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony Kerz

unread,
Aug 20, 2014, 2:37:58 PM8/20/14
to warlock...@googlegroups.com, anthon...@gmail.com
thanks josh,

that was a kick-me moment :)

so, that seemed to have done the trick.

now the jade is being compiled into html and being handled by the template-cache mechanism
(at first i wasn't looking for the jade results in the script folder so i panicked for a moment
until template caching dawned on me).

wow, that was kind of easy after my basic dumb mistakes.

is there anything else required to make that jade spell useable in the wild?

regards,
tony.

Anthony Kerz

unread,
Aug 30, 2014, 5:23:49 PM8/30/14
to warlock...@googlegroups.com, anthon...@gmail.com

hi jdm,

i was tinkering with trying to be able to use jade for the index file, so i made globs.source.jade look like this:

warlock-test (master) $ warlock --conf globs.source.jade

globs.source.jade = [ 'src/app/**/*.tpl.jade',
  'src/app/index.jade' ]

and i replaced index.html with a simple index.jade (i didn’t even try to handling webappStyles and webappScripts yet),
but running warlock just resulted in no index.html at the root of build.

how do-able would that be with the current code base? if moderately, do you have any hints to get there?

if it’s moderate to advanced difficulty, then i’d just as soon skip it for now as managing index in html format isn’t too bad,
but just curious as i’ve seen that trick accomplished with grunt setups.

regards,
tony.

Reply all
Reply to author
Forward
0 new messages