Skip to content

ArtiDjeims/GistFiddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GistFiddle

GistFiddle is a small JavaScript library that allows you to load and run Gists online.

Visit GistFiddle Website

This repo contains:

  • GistFiddle.js - Our JS Framework
  • GistFiddle Website - Our platform where you can run and test gists online
  • Chrome Extension - Example project that loads a code from your Gist

Features

  • Load HTML, CSS, JS gists directly to your project
  • Run your code (gists) online using our website
  • Sandbox mode for your code, collaborate with others
  • Full Page Mode - no logos or other distractions, just your code

What is a Gist? Click Here to learn more.

Tech

GistFiddle uses a number of open source projects to work properly:

And of course, GistFiddle itself is open source with a public repository on GitHub.

How it works

GistFiddle uses GitHub API to load Gists. Means your code is safely hosted on your GitHub profile.

Development

Want to contribute or make your own project? Great!

To run a Gist online, simply use:

gist.run("<id>", "<fileName>");

Note: replace "id" with your Gist Id and "fileName" with your file name.

You can also load the whole page using components like this:

gist.run("<id>", "<fileName>.css");
gist.run("<id>", "<fileName>.html");
gist.run("<id>", "<fileName>.js");

To get a data from a Gist simply use:

gist.load("<id>");

Note: replace "id" with your Gist Id From that point, you will be able to call the "data" variable:

console.log(data);

You can also pass Gist data straight into your function:

    let dataFunction = (response) => {
        console.log(response);
    }

To check file extension use:

gist.type("<fileName>");

License

MIT, Created by Arthur James (Arti_Djeims)

Free Software, Rocks!

Releases

No releases published

Packages

No packages published