GithubHelp home page GithubHelp logo

strd6 / editor Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 10.0 13.49 MB

Edit Github repos and run them in your browser.

Home Page: https://danielx.net/editor/

CoffeeScript 70.72% CSS 3.49% JavaScript 25.79%

editor's Introduction

Editor

The funny story about this editor is that it has an unbroken history from a single gist https://gist.github.com/STRd6/6286182/6196ffb39db7d10c56aa263190525318ca609db7

The original gist was an exploration in a self-hosting gist editor. One that could load gists via the Github API, update them, and create new gists. It succeeded at that, but I ran into the limits of the gist structure, namely no branches or folders.

I went on and created a git repo, merged in the gist history, and continued from there. Maybe if I were smarter I could have rewritten it from scratch to be better, but I had no idea what I was doing and still don't know to this day.

So that may explain why this is in such need of a cleanup.

Demo

Run it!

Components

Templates

FAQ

Help the run popup closes immediately after opening...?

Make sure your adblock extension isn't being to aggro!

editor's People

Contributors

canastanasty avatar mdiebolt avatar npmcdn-to-unpkg-bot avatar strd6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

editor's Issues

Dependency Explorer

Open dependency source in an editor window. Allow for saving back to github or perhaps overwriting local copy or a local branched copy.

Version Packages

Publish packages json to sha, version, and branch where appropriate.

We may even want to create an index file that lists versions.

See also #25

Auto-rebase when pushing to feature branches

To eliminate the "Empty commit" and squash all the others into one commit for the branch we should rebase and force-push our branch commits..

It may get more complex if we merge master into the branch, but maybe not.

Carry forward global script requires from packages.

We should aggregate all global script requires from packages and use them to create the standalone html for the top level app.

This could lead to a little trouble if there are incompatible requires, but the solution is to avoid global script requires where possible.

Clean up old branches on Github

Delete branches that have been merged back into master.

Remove gh-pages builds that are no longer current.

This should be automated as part of our repo hygiene tools.

Pull from upstream

If a repo is forked we should be able to detect that and add a "pull from upstream" button that will merge in any upstream changes.

Or optionally force a sync with upstream.

Continuous Deployment

Merges to master should deploy the latest version.

There may be some challenges with the self-hosting nature of things.

Generate documentation and publish on gh-pages

The editor should be able to generate project documentation and publish it to gh-pages. The documentation should be interactive. There should be links from the docs to the app and back.

We may need to implement something comparable to docco, with a template and optional hooks for interactive scripts.

Reduce commits to gh-pages branch.

Instead of using a series of content updates which results in many extra api calls and commits we should make one commit based on the existing gh-pages tree, adding/modifying our 3 files.

Require templates individually

Components that provide templates should not jam them into a global namespace, instead we should be able to require them as needed and named as we wish.

Rendering HAMLjr templates within a component

A component should be able to reference HAMLjr templates that it defines in a simple way.

This should continue to work if the component is reused within another component.

Ideally it would be transparently handled so that from any HAMLjr template one can call render "whatev", obj and it will choose the correct template.

Emoji Commits

Commits should have two random emoji so that they are more visually distinct.

Binary data in repos causes editor to fail to load the repo

When loading data from github repos, if they have binary data (images, fonts, etc.) it fails to decode and throws an exception causing the entire load to fail.

We should at least catch the exception. The challenge though is that when we save back it may delete the files if they aren't in the working tree.

One possibility is to keep the files encoded, and prevent opening them in the editor. This may be a good stop-gap solution.

We should probably keep binary data out of our trees anyway, but if it's there we should be able to continue and not destroy it.

Requiring css and text files from code files

Currently .css and .styl files are specially compiled into a style.css, but we should instead be able to require the content of these files from JS. This will allow components to insert their own styling and keep the build process consistent.

When creating a feature branch if there is another branch that begins with the same name errors occur

In the github api if you have two branches where one begins with a subset it returns an array rather than an object.

Ex:

GET https://api.github.com/repos/STRd6/editor/git/refs/heads/e

Returns an array of all branches that begin with e rather than 404 for branch e not being found.

We can mitigate this by deleting our unused branches on Github.

The correct fix is to check if we received an array instead of an object and if so examine each object in the array to find an exact name match.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.