-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to run r.js outside of a django project #28
Comments
To be honest, the whole point of django-require is that it's an integration Also, the TemporaryCompileEnvironment isn't a nice way to do things. It's a That being said, if there are bits of django-require that you find useful, On 21 November 2013 05:03, S. Andrew Sheppard notifications@github.comwrote:
|
Not a problem, it certainly makes sense to avoid overcomplicating django-require for this purpose. I'm glad I checked with you before getting too carried away... I'll think a bit more about what a separate PyPI tool for executing r.js would look like and let you know what I come up with. |
I'd actually love to see it. Not all of my wbe projects use Django, but Keep me in the loop! On 21 November 2013 15:31, S. Andrew Sheppard notifications@github.comwrote:
|
Just following up on this - I've come up with a (relatively) pythonic solution for running RequireJS, based on PyMiniRacer. I just published an alpha version to PyPI. Have a look here: |
Interesting! Thanks for sharing! I did not know about PyMiniRacer!
…On 14 November 2017 at 16:25, S. Andrew Sheppard ***@***.***> wrote:
Just following up on this - I've come up with a (relatively) pythonic
solution for running RequireJS, based on PyMiniRacer. I just published an
alpha version to PyPI.
Have a look here:
https://github.com/wq/python-requirejs
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJFCCW6-06s9BbSA4CL47UrFsYdUYsjks5s2b8BgaJpZM4BO6OP>
.
|
Just found this project, it looks pretty useful! What do you think about factoring out the Django dependency in a couple places so that one could
run_optimizer()
outside of a Django project? While I use Django pretty extensively, I have gotten in the habit of maintaining a strict modular separation between my client and server libraries, in part because there are a few projects where I can only use one or the other.My build process already includes a call to execute r.js via
subprocess
but I'm interested in replacing it with yours (mostly so I can get some of yourAutoEnvironment
magic). To accomplish this without a major refactoring, I'm thinking of something like the following API:Then
LazySettings
might get a bit lazier:TemporaryCompileEnvironment
would probably need to move out ofstorage
, and maybe have a non-temporary version that used whatever was in the build profile as directory paths.optimize()
would just be a thin convenience wrapper to initialize and run a compile environment.What do you think? I'm happy to submit a PR for this change, but I thought I'd run it by you first to see a.) if this feature would be useful to others and b.) if the above would be the right way to do it.
The text was updated successfully, but these errors were encountered: