-
Notifications
You must be signed in to change notification settings - Fork 71
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
package.json #116
Comments
i gotta think it over a bit. I agree the current situation is bad; it's simply legacy from when the new repl got added. An alternative approach could be to manage the repl as a separate repo and include it (without devDependencies et al) at build time. |
Yep. I've been thinking along those lines too - it'd be nice to be able to reuse the repl for #95 in some way. Just off the top of my head, suppose we could do this on the Try Ramda page: import repl from `some-ramda-repl-repo`;
const tryRamdaRepl = repl(document.querySelector('.repl-target'), {
theme : 'dracula',
controls : [
'clear-input',
'clear-output',
'clipboard-input',
'clipboard-output',
'pretty',
'share'
]
}); ... and it will build the input / output, buttons etc as configured. For the docs pages, focussing an example could instantiate a repl in place with perhaps minimal controls - e.g: import repl from `some-ramda-repl-repo`;
...
document.body.addEventListener('focus', handleFocus);
...
function handleFocus(e) {
if (e.target.classname === 'code-example') {
repl(e.target, {
destroyOnBlur : true
});
}
} This should also make it easier for other people to inject ramda repls into external projects. |
Yup. Or to run just the repl locally without needing the entire ramda.github.io. I think that is probably a better way to go |
(Regarding the first comment only) I'd like to add a 👎 to merging the REPL Separating it into a package that could be included in other packages/sites would be excellent! I'm afraid I haven't touched the REPL code at all, but I'm still happy to help out if needed. |
This has grown into a pretty nice REPL, thanks to the hard work of a number of people. I think it would make sense to make it stand alone. Are people thinking of making it more configurable? I.e., right now it builds in Ramda, Ramda-Fantasy, and Sactuary -- would that list just be part of the configuration supplied to the stand-alone version? |
I've always dreamed of a CoffeeScript switch. |
I have only played around with CoffeeScript and barely that much with TypeScript, Flow, ClojureScript, PureScript, or any of the other compile-to-JS systems. While I don't specifically object, it sounds like a lot of maintenance on something that seems fairly peripheral. But if there's someone very interested in working on it, far be it from me to interfere! |
Let's go thataway |
Hello!
I've noticed that there are two
package.json
files - one at /package.json and another at /repl/package.json.I propose that this be reduced to 1 for the following reasons:
npm run *
commands can be found within one place.Furthermore I suggest that the
npm-shrinkwrap.json
(present in/repl
, not in/
) be moved to/
and updated accordingly.I'd be very happy to make these changes and update the
npm scripts
etc, if this proposal is accepted.The text was updated successfully, but these errors were encountered: