github fkling/astexplorer v2.0.0
on GitHub

astexplorer 2.0

It’s been a long time coming, but now it’s here: astexplorer moved to Gists as storage backend!

Because Parse is shutting down, we had to find another solution for storing snippets. Using Gists as a backend has a couple of advantages, for example that is has a revision system built-in.

screen shot 2017-01-26 at 11 42 55 pm

So how exactly does astexplorer and Gists work together?

When you are storing a snippet, a new secret gist created, owned by the astexplorer user that was created for just this purpose (storing the Gist under your account is coming in the future).

A gist contains up to three files:

  • astexplorer.json: A JSON file containing meta-data, such as the selected parser or parser settings.
  • source.[js,css,html,..]: The file that contains the code/source.
  • transform.js: The transformer code, if a transformer was used.

screen shot 2017-01-27 at 1 33 48 am

These Gist snippets work pretty much the same as the Parse snippets:

  • Everybody who knows the URL can access them.
  • Everybody who knows the URL can make changes to them.
  • Everybody can view every revision by going to the corresponding GithHub page.

Since all gists are secret, it’s not possible to browse them.

There are some difference to Parse snippets as well, especially that revision are not numbered consecutively anymore. Things like these might be improved in the future. Please give us feedback so we can make gist integration in astexplorer a good experience.

In order to provide this service, astexplorer.net is now running on its own server (not GitHub anymore). That also gives us much more opportunities for future expansions.

What happens to the Parse snippets?

Existing snippets and URL will continue to work but you won’t be able to save changes to the them. You can fork them though, which will create a new gist.

screen shot 2017-01-27 at 1 34 40 am

Other changes

There have been many other noteworthy changes:

  • New menu item: “Save” and “Fork” have been moved into a dropdown menu, “Snippet”. That menu also provides two new entries “New” and “Share”. “New” will reset the code and transforms to the default code examples. “Share” will show a dialog with copyable URLs to the loaded snippet.
    A small “Save” or “Fork” button is available next to the “Snippet” menu header as a shortcut.

screen shot 2017-01-26 at 11 43 28 pm

screen shot 2017-01-27 at 12 15 58 am

  • URLs for accessing latest snippet version: /<snippetid>/latest instead of /<snippetid>/<revisionid> now allows you to link to the latest revision of a snippet. This will be even more useful later when you can store gists on your GitHub account that only you can edit.
  • Parser settings are stored in snippets: This should make sharing snippets better because it ensures that the other person uses the same configuration.
  • Last used transform is loaded on visit: Just as the last used parser is automatically selected, the last used transform is now selected as well.
  • Restoring previously entered code: If you entered code and didn’t save, coming back to the site will now restore the code from local storage.
  • More parsers: @skratchdot, @mohsen1 and @Turbo87 have been adding parsers for sqlite, YAML and handlebars.
3 years ago