1. Summary
I don't find, how I can get Python variable, use Grunt.
What I need to learn, that solve this task?
2. Details
I build site use Pelican and Grunt. I use the same variables:
- In Python format in
pelicanconf.py
for Pelican - In JavaScript format in
Gruntfile.coffee
for Grunt
I want that variables not to be duplicated and contains only in pelicanconf.py
.
3. Example
Part of pelicanconf.py
:
SASHAVARIABLE = 'sashavalue'
Part of Gruntfile.coffee
(I use template mechanism):
variables:
sashavariable: "sashavalue"
exampleplugin:
exampletask: "<%= variables.sashavariable %>"
I want to get value of SASHAVARIABLE
variable in pelicanconf.py
via Grunt.
At the time, if I change value of SASHAVARIABLE
, I need to change value in Gruntfile.coffee
too. This is a duplicate work.
4. Not helped
- I try search queries in Google as
(grunt OR javascript) (get OR parse OR scrape) python variable
→ I don't find answer to my question.
Thanks.