Comments (18)
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.
@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.
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.
@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.
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.
@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.
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.
What's the CDN URL
from jsverbalexpressions.
from jsverbalexpressions.
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.
I logged jsdelivr/jsdelivr#8941
from jsverbalexpressions.
Does jsdelivr support any syntax to fetch the latest release (like https://cdn.jsdelivr.net/jsverbalexpressions/latest/verbalexpressions.js)?
from jsverbalexpressions.
@jehna Yes they do. And your syntax is correct, it's just that currently their CDN are down, nothing seem to works.
from jsverbalexpressions.
Thank you @trungtin.
@TheJaredWilcurt We should use the /latest/
url in the JSFiddle
from jsverbalexpressions.
@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.
from jsverbalexpressions.
@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.
from jsverbalexpressions.
Related Issues (20)
- Non-capturing groups
- Lookaheads and lookbehinds HOT 2
- 'beginCapture' is not effect when 'or' HOT 1
- Support node.js 10+ HOT 2
- Functional rewrite HOT 9
- Docs examples for `multiple` HOT 1
- replace/format traditional HOT 2
- Support for non-greedy/lazy wildcards HOT 1
- Different test result between ES6 import VerEx and local VerEx
- Dependabot automerging package updades HOT 1
- State of JSVerbalexpressions HOT 1
- Your .dependabot/config.yml contained invalid details HOT 1
- SyntaxError: unterminated parenthetical HOT 1
- References to other similar projects HOT 4
- JS 001 HOT 2
- Dependabot can't resolve your JavaScript dependency files
- Not able to create expressions for OR and AND type statements
- Move away from Grunt
- 1 HOT 1
- "Range out of order in character class" when trying to match common operators
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsverbalexpressions.