Hey, I'm wondering if DukPy can compile a file rather than a string?
Details
What I mean is that I want to be able to provide the path to a CoffeeScript or TypeScript file and the name of an output file and have DukPy do the compilation for me. Something like this:
import dukpy
dukpy.coffee_compile('file.coffee', 'file.js')
OR
import dukpy
dukpy.typescript_compile('file.ts', 'file.js')
Im currently using another package called libsass-python for compiling Sass and Scss files to CSS and it offers this functionality. Would be great if DukPy could do the same!
I know I could write this functionality myself by getting a Python script to read a file into a string variable, pass that sting variable to the DukPy compile function and then write the output to a file. I just thought I would first check to see if this functionality already exists... don't want to reinvent the wheel!
Hey, I'm wondering if DukPy can compile a file rather than a string?
Details
What I mean is that I want to be able to provide the path to a CoffeeScript or TypeScript file and the name of an output file and have DukPy do the compilation for me. Something like this:
OR
Im currently using another package called libsass-python for compiling Sass and Scss files to CSS and it offers this functionality. Would be great if DukPy could do the same!
I know I could write this functionality myself by getting a Python script to read a file into a string variable, pass that sting variable to the DukPy compile function and then write the output to a file. I just thought I would first check to see if this functionality already exists... don't want to reinvent the wheel!