shovon / grunt-harp

A grunt task for the Harp server.
MIT License
18 stars 17 forks source link

Trying to use the Casper template converted to Harp. Seems grunt-harp doesn't support globals #14

Open jamesmortensen opened 9 years ago

jamesmortensen commented 9 years ago

I am trying to use the default template from Ghost, which has been converted to HarpJs here: https://github.com/kennethormandy/hb-casper/blob/master/harp.json

When trying to use grunt-harp, I get the following errors:

ReferenceError - blog is not defined

There is a harp.json file that defines some globals in JSON format. Grunt-harp doesn't appear to read them. I can run the harp server without grunt but I cannot run it with grunt. How can I make this work with Grunt?

Thank you, James

etoxin commented 9 years ago

+1 here. Globals should be supported.

etoxin commented 9 years ago

I resolved this by changing the source key in grunt to ./. it seemed to work after this.

    harp: {
        server: {
            server: true,
            source: './'
        },
        dist: {
            source: './',
            dest: 'www'
        }
    }

When you set source to public it looks for harp.json down in ./public/public/harp.json which is non existent.