I'm midway through setting up automation of my jasmine tests using grunt. I have Jasmine (and Istanbul) running fine in node and also a standalone html page that runs the tests. However, I only want to maintain one list of src files to include, so I have a json file which lists these in an array. I can include it using require()
in my Gruntfile, but my plan to include it using ajax in the html page I now realise won't work as I will need to have a server running in order for ajax to work.
So my html page is at file://foo/bar/page.html
and the json is in file://foo/bar/my_data.json
.
Is there any other approach I can use to include a JSON file in a static html page which isn't on a server?