Skip to content
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

Port to browser #51

Open
creationix opened this issue May 15, 2014 · 18 comments
Open

Port to browser #51

creationix opened this issue May 15, 2014 · 18 comments
Milestone

Comments

@creationix
Copy link
Owner

No description provided.

@creationix creationix added this to the new platform milestone May 15, 2014
@creationix
Copy link
Owner Author

This task is just to get tedit basic functionality working in the latest stable browsers.

This means for sure, stable Chrome and stable Firefox. Also if it's not too hard, support for IE 11 and latest mobile Safari. (as well as android firefox and chrome).

@gbraad
Copy link
Contributor

gbraad commented Apr 22, 2015

I tried to use the Live Export to Disk for the firefox version, but I guess this doesn't work at the moment... ?

@creationix
Copy link
Owner Author

https://tedit.creationix.com/ is a deployment of the web version. There shouldn't be an export to disk option since browsers don't have that API.

What are you trying to do exactly?

@gbraad
Copy link
Contributor

gbraad commented Apr 23, 2015 via email

@creationix
Copy link
Owner Author

Ahh, the FxOS version wasn't finished if I remember correctly. Also I think the APIs may have changed since I worked on this.

@ghost
Copy link

ghost commented May 21, 2015

First thing: Absolutely incredible work with Tedit. I wholeheartedly agree that programming should be much easier to dive into than it is. I've also been trying to build tools to make it easier.

There shouldn't be an export to disk option since browsers don't have that API.

Shouldn't it be possible to somehow form a tarball or something and offer that as a download (all client-side)?

Also, I'm a bit confused as to how to hack onto Tedit and export it to the browser. What is the process there?

@creationix
Copy link
Owner Author

The easiest path is to install the chrome app version and then export to disk the version you want to build.

To do this, mount the tedit repo in tedit and right click on this folder and export to disk https://github.com/creationix/tedit/tree/master/build/app/fxos

@ghost
Copy link

ghost commented May 21, 2015

Cool, thanks!!

@ghost
Copy link

ghost commented May 21, 2015

What is the fxos version exactly? When I try to export that version I get the error, "Can't find tedit/build/app/fxos/src/prefs.js". If I want to run this in the browser similarly to https://tedit.creationix.com/, shouldn't I export the web folder? Or am I misunderstanding something? When I try to export the web folder and run it in my browser, I get the error, "Application Cache Error event: Failed to parse manifest".

@creationix
Copy link
Owner Author

The web version needs to be hosted from a web server. You can run it as a
webserver directly from the tedit chrome app. The production
tedit.creationix.com site is deployed using wheaty.

https://github.com/creationix/wheaty

On Thu, May 21, 2015 at 2:47 PM, Tim Burgess [email protected]
wrote:

What is the fxos version exactly? When I try to export that version I get
the error, "Can't find tedit/build/app/fxos/src/prefs.js". If I want to run
this in the browser similarly to https://tedit.creationix.com/, shouldn't
I export the web folder? Or am I misunderstanding something? When I try
to export the web folder and run it in my browser, I get the error,
"Application Cache Error event: Failed to parse manifest".


Reply to this email directly or view it on GitHub
#51 (comment).

@ghost
Copy link

ghost commented May 21, 2015

What would be the easiest way to run this within an existing express app? Maybe I could run wheaty on a different port, and then within my main app, use something like node-http-proxy and reroute traffic along these lines?

var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer({});
app.use('/tedit/*', function (req, res, next) {
  proxy.web(req, res, {target: 'http://127.0.0.1:8002'});
});

@creationix
Copy link
Owner Author

Since wheaty is essentially a glorified static site generator, you could just use the export feature and then serve it as a static asset I think. But yes, running wheaty behind a reverse proxy works too. That's how I have it deployed behind nginx currently.

@ghost
Copy link

ghost commented May 21, 2015

use the export feature and then serve it as a static asset

That's what I figured, but I get this error (in clientside console) when trying to load it:
Application Cache Error event: Failed to parse manifest

I'm guessing I'm missing some step along the way that properly generates the manifest.appcache file? Right now that file appears to be JavaScript.

@creationix
Copy link
Owner Author

Hmm, maybe tedit was never updated to the new wheaty style of file generation. You can try running a local wheaty server and then capturing all the generated files? There should be a list of everytginh needed in the output of the dynamic appcache.

@ghost
Copy link

ghost commented May 21, 2015

How difficult do you think it would be to make tedit use systemjs instead of wheaty? I'm asking because I'm already using SystemJS, plus it follows the ES6 module loader spec which will help out in the future. I should be able to load most modules as usual using SystemJS, right? I have a feeling I'll either need to update the references to any symlinked package (or specify them using System.config or something), but off the top of your head, what else might need to be done?

@ghost
Copy link

ghost commented May 21, 2015

Also, what is the difference between src, src-minimal, and src-ui exactly?

Sorry for all the questions! As soon as I get a handle on how everything works I should be out of your hair. I think tedit has tremendous potential, and it's a shame you had to move onto other things but I completely understand that (and will probably be in the same boat soon lol). I actually find it hard to believe other developers aren't actively contributing to this!

@creationix
Copy link
Owner Author

wheaty isn't a module loader, it's a build system. You can probably
port/embed systemjs as a wheaty module like how I'm using my hand-rolled
browserify-like js compiler.

On Thu, May 21, 2015 at 5:31 PM, Tim Burgess [email protected]
wrote:

How difficult do you think it would be to make tedit use systemjs
https://github.com/systemjs/systemjs instead of wheaty? I'm asking
because I'm already using SystemJS, plus it follows the ES6 module loader
spec which will help out in the future. I should be able to load most
modules as usual using SystemJS, right? I have a feeling I'll either need
to update the references any symlinked package (or specify them using
System.config or something), but off the top of your head, what else
might need to be done?


Reply to this email directly or view it on GitHub
#51 (comment).

@creationix
Copy link
Owner Author

The src folder is tedit, the others were experimental forks/rewrites that I
never finished. I'm afraid I had to leave the work in a mess since I ran
out of money and had to focus on paying work.

On Thu, May 21, 2015 at 5:38 PM, Tim Burgess [email protected]
wrote:

Also, what is the difference between src, src-minimal, and src-ui exactly?

Sorry for all the questions! As soon as I get a handle on how everything
works I should be out of your hair. I think tedit has tremendous
potential, and it's a shame you had to move onto other things but I
completely understand that (and will probably be in the same boat soon
lol). I actually find it hard to believe other developers aren't actively
contributing to this!


Reply to this email directly or view it on GitHub
#51 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants