Coder Social home page Coder Social logo

ember-cli / ember-twiddle Goto Github PK

View Code? Open in Web Editor NEW
268.0 22.0 97.0 2.83 MB

JSFiddle type thing for ember-cli style code

Home Page: https://ember-twiddle.com

License: MIT License

JavaScript 87.37% HTML 1.13% CSS 0.87% Shell 0.14% SCSS 4.61% Handlebars 5.88%
emberjs ember-cli development-environment developer-tools playground

ember-twiddle's Introduction

Build Status Code Climate

An ember cli like web based javascript sharing tool. http://ember-twiddle.com

  • Ember Twiddle uses Github Gists as persistence layer. Once you hit Save on a newly created Twiddle, it will create a public Gist under your Github account.
  • If you'd like to help out, check out CONTRIBUTING.md We are looking for help maintaining the project. If you have contributed and would like to be made a maintainer, please make a request on the Discord channel or via email.
  • Ember Twiddle uses a backend for compiling addons. It is currently located at https://github.com/joostdevries/twiddle-backend

Browser support

To make using Ember Twiddle secure, we use the sandbox and srcdoc attributes of the <iframe> element. Especially srcdoc is not supported by any version of IE at the moment and older versions of other browsers also lack support for sandbox. Furthermore, the sandbox prohibits the use of cookies, localStorage, IndexedDB, Web Workers, etc.

We are planning to move to a secure solution with better compatibility soon (most likely one where the twiddle is run on a different domain).

Ember support

The latest working version of Ember in Ember Twiddle is 3.4. Feel free to open a PR to extend the supported versions.

Feedback

You can use the issue tracker to provide feedback, suggest features or report bugs. Before you open an issue though, make sure you check canary.ember-twiddle.com to see whether it's not already fixed on master. Of course, you should also check whether an issue doesn't exist already (if it does, use the comments to provide additional input).

Contributing

See CONTRIBUTING.md

Security-related issues

If you run into a security-related issue, please do not open an issue for it but instead email [email protected] (preferably with a twiddle demonstrating the issue).

ember-twiddle's People

Contributors

acorncom avatar alexspeller avatar amiller-gh avatar bcardarella avatar bekzod avatar brianally avatar dependabot[bot] avatar ember-tomster avatar gaurav0 avatar gavinjoyce avatar gokatz avatar heroiceric avatar jacobq avatar jrock2004 avatar k-fish avatar kagemusha avatar knownasilya avatar ktkate avatar makepanic avatar migbar avatar miguelcobain avatar mixonic avatar pangratz avatar piotrpalek avatar quajo avatar romgere avatar rwjblue avatar stefanpenner avatar tim-evans avatar vikram7 avatar

Stargazers

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

Watchers

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

ember-twiddle's Issues

Support addons

Ideally, we find a way to easily demo addons on Twiddle.

Improve caching headers

Stef Penner [4:24 PM]
looks like vendor.js and ember-twiddle.js can be more aggressively cached

Stef Penner [4:24 PM]
they are never served straight from cache

Implement new UI

The lovely mr @kevinrudyanderson has done some work on a UI for this. Tracking work on that here..

First version

image

Todo

  • Main layout
    • Menubar
      • Twiddle name + version (eg. "My twiddle @ abf34c2")
    • Fonts
    • Colors
  • File menu
    • Add resource
      • Add component
      • Add controller
      • Add resource (pod)
      • Add template
    • Delete file (in active column)
    • Rename file / move filefile (in active column)
    • Fork Twiddle
    • Share Twiddle
      • Embed
      • URL
    • Delete Twiddle?
  • User menu
    • Sign in
    • Sign out
  • Editor column
    • File picker dropdown (make it clear it's a dropdown)
    • Focus active column
    • Type label
    • Resizable
  • Informational
    • Build errors
    • Succesful builds - Output updated
    • Twiddle saved/committed

Build into iframe

Instead of 'lazily' builing the app file-by-file on change using the resolver, run a full build and dump the code into an iframe.

Benefits:

  • isolate the app from the editor
  • allows other versions of ember to be used
  • use css without polluting parent window

modules we need to include

  • app/app.js
  • app/router.js
  • boot.js (boots the app)

EmberCLIService

  • buildGist
  • fileFromBlueprint
  • contentForAppBoot

Autosave

But with an option to turn this off.

How to ES6 import?

See http://twiddle.joostdvrs.com/1c0da49ac7eab2af3d77

In the console, I get the error message: Could not find module views/view-stack

The module views/view-stack.js exists, what is the correct path by which I can import it?

I have tried:

import ViewStack from "views/view-stack";

import ViewStack from "./views/view-stack";

import ViewStack from "../views/view-stack";

import ViewStack from "app/views/view-stack";

Install errors on Windows

I get this errors installing twiddle on windows.

C:\dev>git clone https://github.com/alexspeller/ember-twiddle.git
Cloning into 'ember-twiddle'...
remote: Counting objects: 338, done.
Receiving object 0 (delta 0), pack-reused 338
Receiving objects: 100% (338/338), 45.57 KiB | 0 bytes/s, done.
Resolving deltas: 100% (167/167), done.
Checking connectivity... done.

C:\dev>cd ember-twiddle

C:\dev\ember-twiddle>npm install
npm WARN optional dep failed, continuing [email protected]
-
> [email protected] install C:\dev\ember-twiddle\node_modules\broccoli-sass\node_m
odules\node-sass
> node build.js

child_process: customFds option is deprecated, use stdio instead.

C:\dev\ember-twiddle\node_modules\broccoli-sass\node_modules\node-sass>node "C:\
Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-
gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:99:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\dev\ember-twiddle\node_modules\broccoli-sass\node_modules\node-s
ass
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Build failed
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\ember-twiddle\npm-debug.log

C:\dev\ember-twiddle>

Refactor list

  • Use Ember Data for user model
  • Use DS.EmbeddedRecordsMixin attrs setting to prevent history serialization (instead of serializeMany hack)

[BUG] Cannot add two files of the same type, even if name is different.

Steps to reproduce:

Create new twiddle.
Add template, name it 'foo/template.hbs'
Try to add another template.

You are not prompted to change the name. In the console, you see the error "Uncaught Error: Assertion Failed: The id my-route.template.hbs has already been used with another record of type ember-twiddle@model:gist-file:".

Roadmap

List of issues that we should solve at some point

  • Module imports #21
  • CSS - including not leaking bootstrap to demo app #21
  • Nice UX
  • Scss #105
  • Addon support #22
  • Embed support #13
  • Use ember data for Github API
  • Revision history #66
  • CLI #107
  • Different ember / ember data versions #38
  • XHR mocking support #62
  • Support e.g. coffeescript, emberscript, emblem #106

Use Ember Data

Files

  • adapters/github.js
  • adapters/application.js
  • serializers/github.js
  • serializers/application.js
  • models/gist.js
  • models/gist-file.js
  • models/gist-revision.js

Models

  • Gist
  • GistFile
  • GistRevision
  • Read support
  • Create support
  • Update support
    • Change file content
    • Change file name
      • Handle the new file name coming back from the server as id (probably during normalizeFiles)
    • Add file
    • Remove file
      • Include file name with null value.

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.