-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linkify 2.0 #51
Linkify 2.0 #51
Conversation
Current API just includes the `find` method, which takes a string of text and returns the kinds of links available in it. More methods to come soon. Also included are Mocha unit tests for the major lexical analysis components.
As a way to demo the linkify plugin API - Totally works, but requires classes to create new kinds of tokens. This may mean having to convert the ES6 classes to regular JS classes somehow.
To check if the given string is a linkable value
Also added .travis.yml file
Brings back functionality of taking a string of text and outputting a string of HTML with anchor tags.
Should switch the current ES6 Transpiler to this one https://6to5.org Seems much more robust and supports compiling to various modules |
As well as 6to5 (instead of the ES6 transpiler)
Needs a few more but this should be good for now
Much cleaner this way!
This is brutal :(
Run `gulp build` or `gulp dist`
Let’s make a really good module system with flexible builds
Been doing a lot of mental labour trying to come up with a sophisticated build system. I have AMD modules working so far (should make building an Ember CLI plugin trivial!), and now I have to come up with the vanilla browser build. Here's the game plan so far
|
* Basic linkify.js compiled with closure compiler * Build steps for linkify interfaces including string - jQuery/DOM interfaces soon to follow * Build steps for linkify plugins * AMD versions of all of the above Also includes some updates to the core directory and file structure for better compression/minification.
For a more filename-friendly browser shim. Also removed bower.json (moved to shim repository)
Shim repo located at https://github.com/nfrasser/linkify-shim (to be transferred to https://github.com/SoapBox/linkify-shim ) |
Includes a few new options and ability to set some options to functions. Also better HTML cleaning
Will try out running browser tests with Karma
Karma test runner fully working, cross-browser SauceLabs configuration still in the works.
Had to rewrite all the test files to use expect assertions instead of should to get this even working on IE8. Seems solid though!
It turns out that browsers really really like rearranging their attributes. Should make a note to find a better way to do this
Contributing covers how linkify works, setting up, building, testing, and plugin development (briefly) Readme has been updated with links to the docs site, and all previous API documentation has been taken out.
This is just about ready to merge. Next up, updating Bower to point to the shim repository. |
2.0 includes completely rewritten internals and a Node.js/io.js API. This PR supersedes #17 and fixes numerous additionally reported issues.
Work in Progress.
Overview
var linkify = require('linkifyjs');
require('linkifyjs-mentions')(linkify);
Multiple browser builds with various featuresDeferring these to a future releaseBasic linkify for URLs with most available TLDs and email addressesSlim linkify with only the most common TLDsFixes
localhost
, but IP addresses are not yet supported89 Support (full IE 8 Support deferred to post 2.0 release)@
APIs
find
- Find linkstest
- Is the given string a link?.linkify
anchor tags (can be used on the server-side)Deprecations
linkifyjs
(install withbower install linkifyjs
)