Commit b552b885 authored by JC Brand's avatar JC Brand

Add MakeFile target for setting up dev env.

parent ad4d959d
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = ./docs
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = ./docs
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
......@@ -11,35 +11,43 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./d
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source
.PHONY: help clean html dirhtml singlehtml json htmlhelp devhelp epub latex latexpdf text changes linkcheck doctest gettext
.PHONY: all help clean html dirhtml singlehtml json htmlhelp devhelp epub latex latexpdf text changes linkcheck doctest gettext po pot po2json merge release
all: dev
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " epub to export the documentation to epub"
@echo " dev to set up the development environment"
@echo " gettext to make PO message catalogs of the documentation"
@echo " html to make standalone HTML files of the documentation"
@echo " htmlhelp to make HTML files and a HTML help project from the documentation"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " json to make JSON files"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " linkcheck to check all external links for integrity"
@echo " pot generates a gettext POT file to be used for translations"
@echo " pot to generate a gettext POT file to be used for translations"
@echo " po to generate gettext PO files for each i18n language"
@echo " po2json to generate JSON files from the language PO files"
@echo " release to make a new minified release"
@echo " singlehtml to make a single large HTML file"
@echo " texinfo to make Texinfo files"
@echo " text to make text files"
# @echo " changes to make an overview of all changed/added/deprecated items"
# @echo " devhelp to make HTML files and a Devhelp project"
# @echo " dirhtml to make HTML files named index.html in directories"
# @echo " doctest to run all doctests embedded in the documentation (if enabled)"
# @echo " epub to export the documentation to epub"
# @echo " htmlhelp to make HTML files and a HTML help project from the documentation"
# @echo " info to make Texinfo files and run them through makeinfo"
# @echo " json to make JSON files"
# @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
# @echo " latexpdf to make LaTeX files and run them through pdflatex"
# @echo " linkcheck to check all external links for integrity"
# @echo " singlehtml to make a single large HTML file"
# @echo " texinfo to make Texinfo files"
# @echo " text to make text files"
pot:
xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.7.0 -c --language="python";
merge:
po:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
merge: po
po2json:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec po2json {}/LC_MESSAGES/converse.po {}/LC_MESSAGES/converse.json \;
......@@ -53,6 +61,11 @@ release:
sed -i "s/(Unreleased)/(`date +%Y-%m-%d`)/" docs/CHANGES.rst
grunt minify
dev:
npm install
./node_modules/.bin/bower update;
cd ./components/strophe && make normal;
clean:
-rm -rf $(BUILDDIR)/*
......
......@@ -70,7 +70,7 @@ You'll most likely want to implement some kind of single-signon solution for
your website, where users authenticate once in your website and then stay
logged into their XMPP session upon page reload.
For more info on this, read: `Pre-binding and Single Session Support`_.
For more info on this, read: `Prebinding and Single Session Support`_.
You might also want to have more fine-grained control of what gets included in
the minified Javascript file. Read `Configuration`_ and `Minification`_ for more info on how to do
......@@ -392,8 +392,8 @@ follow the instructions below to create this folder and fetch Converse's
3rd-party dependencies.
Install Node.js and development dependencies
============================================
Install the development and front-end dependencies
==================================================
We use development tools (`Grunt <http://gruntjs.com>`_ and `Bower <http://bower.io>`_)
which depend on Node.js and npm (the Node package manager).
......@@ -406,36 +406,32 @@ directory:
::
npm install
make dev
This will install all the development dependencies for Converse.js. If you are
curious to know what these are, take a look at whats under the *devDependencies* key in
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`.
This will first install the Node.js development tools (like Grunt and Bower)
and then use Bower to install all of Converse.js's front-end dependencies.
Install 3rd party dependencies
==============================
The front-end dependencies are those javascript files on which
Converse.js directly depends and which will therefore be loaded in the browser.
After running ``npm install``, you will now have Grunt and Bower installed.
If you are curious to know what these different dependencies are:
We use Bower to manage Converse's front-end dependencies (e.g. Javascript that
should get loaded in the browser).
* Development dependencies:
Take a look at whats under the *devDependencies* key in
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`_.
To fetch these dependencies, run:
* Front-end dependencies:
See *dependencies* in
`bower.json <https://github.com/jcbrand/converse.js/blob/master/bower.json>`_.
::
grunt fetch
If you don't have grunt installed globally, you need to specify the relative
path:
::
.. Note:
After running ```make dev```, you should now have a new directory *components*,
which contains all the front-end dependencies of Converse.js.
If this directory does NOT exist, something must have gone wrong.
Double-check the output of ```make dev``` to see if there are any errors
listed.
./node_modules/.bin/grunt fetch
This will call Bower in the background to fetch all the front-end
dependencies (like backbone.js, strophe.js etc.) and then put them in the
*components* folder.
With AMD and require.js (recommended)
=====================================
......@@ -578,7 +574,7 @@ To do this for ALL languages, run:
::
make merge
make po
The resulting PO file is then what gets translated.
......@@ -805,6 +801,12 @@ Here are the different events that are emitted:
Triggered whenever the roster view (i.e. the rendered HTML) has changed.
* **onChatBoxClosed**
``converse.on('onChatBoxClosed', function (chatbox) { ... });``
Triggered when a chat box has been closed.
* **onChatBoxFocused**
``converse.on('onChatBoxFocused', function (chatbox) { ... });``
......@@ -817,11 +819,11 @@ Here are the different events that are emitted:
Triggered when a chat box has been opened.
* **onChatBoxClosed**
* **onChatBoxToggled**
``converse.on('onChatBoxClosed', function (chatbox) { ... });``
``converse.on('onChatBoxToggled', function (chatbox) { ... });``
Triggered when a chat box has been closed.
Triggered when a chat box has been minimized or maximized.
* **onStatusChanged**
......
This diff is collapsed.
This diff is collapsed.
......@@ -70,7 +70,7 @@ You'll most likely want to implement some kind of single-signon solution for
your website, where users authenticate once in your website and then stay
logged into their XMPP session upon page reload.
For more info on this, read: `Pre-binding and Single Session Support`_.
For more info on this, read: `Prebinding and Single Session Support`_.
You might also want to have more fine-grained control of what gets included in
the minified Javascript file. Read `Configuration`_ and `Minification`_ for more info on how to do
......@@ -392,8 +392,8 @@ follow the instructions below to create this folder and fetch Converse's
3rd-party dependencies.
Install Node.js and development dependencies
============================================
Install the development and front-end dependencies
==================================================
We use development tools (`Grunt <http://gruntjs.com>`_ and `Bower <http://bower.io>`_)
which depend on Node.js and npm (the Node package manager).
......@@ -406,36 +406,32 @@ directory:
::
npm install
make dev
This will install all the development dependencies for Converse.js. If you are
curious to know what these are, take a look at whats under the *devDependencies* key in
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`.
This will first install the Node.js development tools (like Grunt and Bower)
and then use Bower to install all of Converse.js's front-end dependencies.
Install 3rd party dependencies
==============================
The front-end dependencies are those javascript files on which
Converse.js directly depends and which will therefore be loaded in the browser.
After running ``npm install``, you will now have Grunt and Bower installed.
If you are curious to know what these different dependencies are:
We use Bower to manage Converse's front-end dependencies (e.g. Javascript that
should get loaded in the browser).
* Development dependencies:
Take a look at whats under the *devDependencies* key in
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`_.
To fetch these dependencies, run:
* Front-end dependencies:
See *dependencies* in
`bower.json <https://github.com/jcbrand/converse.js/blob/master/bower.json>`_.
::
grunt fetch
If you don't have grunt installed globally, you need to specify the relative
path:
::
./node_modules/.bin/grunt fetch
.. Note:
After running ```make dev```, you should now have a new directory *components*,
which contains all the front-end dependencies of Converse.js.
If this directory does NOT exist, something must have gone wrong.
Double-check the output of ```make dev``` to see if there are any errors
listed.
This will call Bower in the background to fetch all the front-end
dependencies (like backbone.js, strophe.js etc.) and then put them in the
*components* folder.
With AMD and require.js (recommended)
=====================================
......@@ -578,7 +574,7 @@ To do this for ALL languages, run:
::
make merge
make po
The resulting PO file is then what gets translated.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment