Skip to content

Latest commit

 

History

History
146 lines (89 loc) · 3.24 KB

README.rst

File metadata and controls

146 lines (89 loc) · 3.24 KB

The name candlestick comes from the times when the telephone had just been invented. One of the first models of a telephone was a stick which was placed on a table where the speaker could talk into it.

docs/candlestick.jpg

This module provides a javascript library to automatically generate phone links. A treeWalker walks through the whole DOM and collects all textNodes. If a node matches a phone number the number will be replaced with a <a href="tel:phonenumber">Your phonenumber</a> link. Existing links or input fields are not affected.

By default the candlestick.integration.js is loaded which converts all phone numbers in the body.

Plone 4.3.x Plone 5.1.x

  • Add the package to your buildout configuration:
[instance]
eggs +=
    ...
    ftw.candlestick

Python:

  1. Fork this repo
  2. Clone your fork
  3. Shell: ln -s development.cfg buidlout.cfg
  4. Shell: python boostrap.py
  5. Shell: bin/buildout

Or start an instance by running bin/instance fg.

This package is copyright by 4teamwork.

ftw.candlestick is licensed under GNU General Public License, version 2.

The client library depends on Grunt. Assuming you already have Node.js installed on your system, run the following command:

sudo npm install -g grunt

To install the dependencies, run the following command:

npm install

And with npm you get the following packages:

  • Grunt - JavaScript task runner.
  • Babel - ES6 Transpiler.
  • Browserify - Dependency Bundler
  • Karma - JavaScript test runner.
  • Jasmine - JavaScript test suite.
  • Chai - JavaScript Assertion Library.

Run the following command to re-build the library:

grunt build

Run the following command to watch for changes which trigger a rebuild:

grunt

See https://github.com/substack/browserify-handbook for more information about browserify.

Browserify comes with a built-in support to generate source maps. It is already enabled by default, but feel free to disable source maps. Refer to this article to enable source maps in Google Chrome, if you haven't already done so.

Run all tests

grunt test

Run a specific test

grunt test --grep="Name of your test"

Converts all phone numbers to links

window.candlestick();