weixin_39805409
weixin_39805409
2021-01-08 02:02

Add Brick to JSFiddle and integrate JSFiddle with Brick's site

JSFiddle would be a great way for people to learn how to use Brick and try it out. I see two parts of this: - adding it to JSfiddle itself, which I assume is easy, though I do wonder how we can push updates out when there's a new release of the library? ? - adding it to the Brick site somehow, so that people can click a button and try things out immediately. I am not sure if there's an API for it of sorts, but maybe we can write "simple" code that'll take a brick code example and instantly spin up a new fiddle with it?

该提问来源于开源项目:mozbrick/brick

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39530509 weixin_39530509 4月前

    The best option for updates is to create some sort of edge (nightly) version which will get updated frequently. Some old fiddles might not work if changes will be backward incompatible. There is also an option to create a stable version plus the egde one.

    These should be placed on some sort of CDN (github pages are fine, but not the repository's RAW view)

    JSFiddle is able to read prepared github directory or directly from POST request. - http://doc.jsfiddle.net/use/github_read.html - http://doc.jsfiddle.net/api/post.html

    These will not let you to display an embedded version - for that the fiddle needs to be saved. It would be good to create a user called "brick" and place all examples inside (http://doc.jsfiddle.net/basic/introduction.html#fiddle-options). All named examples will be displayed in http://jsfiddle.net/user/brick/ Avatar is taken from Gravatar only so pick a good email :)

    点赞 评论 复制链接分享
  • weixin_39695241 weixin_39695241 4月前

    If GitHub pages are fine, then the canonical URLs are:

    JS: http://mozilla.github.io/brick/dist/brick.js CSS: http://mozilla.github.io/brick/dist/brick.css

    点赞 评论 复制链接分享
  • weixin_39530509 weixin_39530509 4月前

    Yest it's good - currently fixing the Dependencies table to allow CSS inly links

    点赞 评论 复制链接分享
  • weixin_39530509 weixin_39530509 4月前

    Please check if it's working on http://alpha.jsfiddle.net/

    点赞 评论 复制链接分享
  • weixin_39530509 weixin_39530509 4月前

    It is on the production site now as "Brick edge"

    点赞 评论 复制链接分享

相关推荐