Coder Social home page Coder Social logo

Comments (18)

jehna avatar jehna commented on June 24, 2024

Better yet, one could make an interactive js widget to the VerbalExpressions GitHub site.

I'm thinking something like: http://www.typescriptlang.org/Playground

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

@jehna you don't really need to do your own playground. Just embed one of the playgrounds in your site. I prefer JSBin to JSFiddle because it gives access to the console.

Once this library is on a CDN, it will be easy to do this where you set up the basics of using JSVerbalExpressions and then embed it in the website to allow people to play.

I can do it and submit a PR if you want?

edit... for Javascript only that is ;) I think once we had that in place, perhaps other languages could do something similar using whatever playground software they have (many do have something).

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

@mackenza

Either is fine, I just think it's a lot easier to understand jsfiddle's:

console.log( tester );

than it is to understand jsbin's

console.log( "/" + tester._prefixes + tester._source + tester._suffixes + "/" + tester._modifiers );

JSFiddle, gives you the same access to the console that any website does. JSBin does a poor attempt at trying to display that information on the page. Either way, we should be having a live demo, I just think JSFiddle is less confusing.

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

@TheJaredWilcurt - fair enough. I agree, just using the regular browser console is a better way of handling this ;)

I added the raw URL to the minified resource here on GitHub and though it complained (as GH is not a CDN) it still worked. So when we get a proper CDN URI we should update the JSFiddle to reflect that and not have the script in the HTML.

I am wondering if we really want an HTML playground at all. A Node REPL would be better at showing the use of the library, I think. How it fits in to a web page is entirely a different thing. What we are trying to do is to get the VerEx method chaining correct. Agreed?

I will look for such a thing.

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

I have found and experimented with: https://github.com/Idered/Editr.js
This is easily embedded into the static org site and is able to hide the HTML and CSS tabs so you can focus on the JS and result.
I will try to have this in a PR for the org repo tomorrow if I get time.

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

@mackenza All I use VerbalExpressions for is easily generating the regex string for me, then I just use that in my code to forgo the library in my repo. 100% of my use of VerbalExpressions is on that JSFiddle link. Without that I would not ever touch this library.

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

fair enough. I would think you would want to update the JSFiddle link with the CDN URL for JSDelivr to clean it up a bit, though.

As for the #127 I see your point that this is a separate thing and not mutually exclusive to having a JSFiddle link AND a playground.

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

What's the CDN URL

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

#124

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

None of the links on that CDN work. I tried on my home internet and on my phone. Both return "File not found".

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

I logged jsdelivr/jsdelivr#8941

from jsverbalexpressions.

jehna avatar jehna commented on June 24, 2024

Does jsdelivr support any syntax to fetch the latest release (like https://cdn.jsdelivr.net/jsverbalexpressions/latest/verbalexpressions.js)?

from jsverbalexpressions.

trungtin avatar trungtin commented on June 24, 2024

@jehna Yes they do. And your syntax is correct, it's just that currently their CDN are down, nothing seem to works.

from jsverbalexpressions.

jehna avatar jehna commented on June 24, 2024

Thank you @trungtin.

@TheJaredWilcurt We should use the /latest/ url in the JSFiddle

from jsverbalexpressions.

mackenza avatar mackenza commented on June 24, 2024

@trungtin when I logged the issue, other libraries worked fine, it was just this one broken. They have fixed jsdelivr/jsdelivr#8941 and the files work now.

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

from jsverbalexpressions.

jehna avatar jehna commented on June 24, 2024

@TheJaredWilcurt can you change the 0.2.0 part from the js library url to latest? This would guarantee that the fiddle and bin are using the latest libraries.

from jsverbalexpressions.

TheJaredWilcurt avatar TheJaredWilcurt commented on June 24, 2024

from jsverbalexpressions.

Related Issues (20)

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.