Results 1 to 7 of 7

Thread: Include external libs in fiddle, like jasmine

  1. #1
    Ext Premium Member halcwb's Avatar
    Join Date
    Mar 2010
    Location
    Rotterdam
    Posts
    411
    Answers
    10

    Default Answered: Include external libs in fiddle, like jasmine

    Would it be possible to have fiddle include exclude external libs. Specifically, jasmine! Then fiddle could be used to generate actual unit tests. This would be great for bug reports or issues.

    P.s. I think fiddle only let you select one lib. But if you just include jasmine in extjs, i.e. call it ext-test, then you could use it in fiddle and create unit tests.

  2. I'm currently working on a more robust solution in this area. It's taking a while as it's a lot of coding to do what I am attempting but including any external JS/CSS will be supported.

    On my personal wish list is to integrate jasmine natively in the fiddle but that is something down the road. There are some bugs that are more important.

  3. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,436
    Answers
    3997

    Default

    I'm currently working on a more robust solution in this area. It's taking a while as it's a lot of coding to do what I am attempting but including any external JS/CSS will be supported.

    On my personal wish list is to integrate jasmine natively in the fiddle but that is something down the road. There are some bugs that are more important.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,436
    Answers
    3997

    Default

    Just an update... it actually took almost 3 days to do it but there is going to be a concept of a file system so you can have a full MVC stack or a lib directory or whatever. You can also add remote resources also. When I say "resource" I mean a JS or CSS file. I pushed this update to our testing environment to do some internal crunching on it. Next week sometime will probably push to the production server if all goes well as a beta2 or RC release.

    Also fixed an issue in a live preview (outside the fiddle app UI) with mock data.

    Am also looking into the search issue right now.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #4
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Answers
    32

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Just an update... it actually took almost 3 days to do it but there is going to be a concept of a file system so you can have a full MVC stack or a lib directory or whatever. You can also add remote resources also.
    This will be an awesome addition. Thanks for the update!

  6. #5
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,436
    Answers
    3997

    Default

    Quote Originally Posted by existdissolve View Post
    This will be an awesome addition. Thanks for the update!
    Here is some proof even. We also are moving from regular neptune to charcoal neptune... the blue was too much blue for my taste.

    Fiddle Resources.png
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  7. #6
    Ext Premium Member halcwb's Avatar
    Join Date
    Mar 2010
    Location
    Rotterdam
    Posts
    411
    Answers
    10

    Default Including external libs by pasting.

    In the meantime, I succeeded with fiddling using my favorite lib Underscore, by just pasting the minified source code at the top and then start using it.

    Note, if you save your fiddle, you should comment the minified line, otherwise formatting will occur resulting in a large number of lines.

    Last edited by halcwb; 3 Aug 2013 at 8:05 AM. Reason: made appropriate sample

  8. #7
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,436
    Answers
    3997

    Default

    @halcwb

    As part of this release coming this next week I have it where all code is automatically run through js_beautify or cssbeautify which in the case of using a minified file I can see being a bad thing. So as part of having a filesystem each file can have settings and I just added a setting to toggle this automatic beautify. There are two values, off or auto and defaults to auto. If you set to off, obviously it won't beautify it. If set to auto, it will actually try to determine if the file is a minified file. The way I do this is calculate number of characters per line and if over a threshold (750 characters right now) then it will not beautify it.

    So in the case of underscore, it calculated there was about 2,200 characters per line which is over the 750 threshold so it didn't beautify that file.

    Hopefully this will help. I'm keeping beautify on auto by default so that people's code quality will be better, I see lots of code with tabs/space mix, indention gone crazy etc but of course you can override this behavior.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •