mercredi 30 janvier 2019

Read from file into config

I have an ember project. The root folder has a file called version which just says 1.1.0

In the root folder I also have my client folder (ember project) with a config folder and then environment.js for my app variables.

Im trying to read from the version file and add its contents in the environment.js file as a varaible.

Im currently trying like this: version: $.getJSON("../../VERSION")

but im getting the unexpected identifier error. With Node I would use: version: fs.readFileSync(__dirname + '/../VERSION').toString().trim(),

How would I do this with ember? thanks




Aucun commentaire:

Enregistrer un commentaire