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. # You can set these variables from the command line.
SPHINXOPTS = SPHINXOPTS =
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
PAPER = PAPER =
BUILDDIR = ./docs BUILDDIR = ./docs
# Internal variables. # Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_a4 = -D latex_paper_size=a4
...@@ -11,35 +11,43 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./d ...@@ -11,35 +11,43 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./d
# the i18n builder cannot share the environment and doctrees with the others # the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source 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: help:
@echo "Please use \`make <target>' where <target> is one of" @echo "Please use \`make <target>' where <target> is one of"
@echo " changes to make an overview of all changed/added/deprecated items" @echo " dev to set up the development environment"
@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 " gettext to make PO message catalogs of the documentation" @echo " gettext to make PO message catalogs of the documentation"
@echo " html to make standalone HTML files 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 " pot to generate a gettext POT file to be used for translations"
@echo " info to make Texinfo files and run them through makeinfo" @echo " po to generate gettext PO files for each i18n language"
@echo " json to make JSON files" @echo " po2json to generate JSON files from the language PO 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 " release to make a new minified release" @echo " release to make a new minified release"
@echo " singlehtml to make a single large HTML file"
@echo " texinfo to make Texinfo files" # @echo " changes to make an overview of all changed/added/deprecated items"
@echo " text to make text files" # @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: 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"; 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 \; find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
merge: po
po2json: po2json:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec po2json {}/LC_MESSAGES/converse.po {}/LC_MESSAGES/converse.json \; find ./locale -maxdepth 1 -mindepth 1 -type d -exec po2json {}/LC_MESSAGES/converse.po {}/LC_MESSAGES/converse.json \;
...@@ -53,6 +61,11 @@ release: ...@@ -53,6 +61,11 @@ release:
sed -i "s/(Unreleased)/(`date +%Y-%m-%d`)/" docs/CHANGES.rst sed -i "s/(Unreleased)/(`date +%Y-%m-%d`)/" docs/CHANGES.rst
grunt minify grunt minify
dev:
npm install
./node_modules/.bin/bower update;
cd ./components/strophe && make normal;
clean: clean:
-rm -rf $(BUILDDIR)/* -rm -rf $(BUILDDIR)/*
......
...@@ -70,7 +70,7 @@ You'll most likely want to implement some kind of single-signon solution for ...@@ -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 your website, where users authenticate once in your website and then stay
logged into their XMPP session upon page reload. 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 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 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 ...@@ -392,8 +392,8 @@ follow the instructions below to create this folder and fetch Converse's
3rd-party dependencies. 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>`_) We use development tools (`Grunt <http://gruntjs.com>`_ and `Bower <http://bower.io>`_)
which depend on Node.js and npm (the Node package manager). which depend on Node.js and npm (the Node package manager).
...@@ -406,36 +406,32 @@ directory: ...@@ -406,36 +406,32 @@ directory:
:: ::
npm install make dev
This will install all the development dependencies for Converse.js. If you are This will first install the Node.js development tools (like Grunt and Bower)
curious to know what these are, take a look at whats under the *devDependencies* key in and then use Bower to install all of Converse.js's front-end dependencies.
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`.
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 * Development dependencies:
should get loaded in the browser). 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 .. Note:
path: 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) With AMD and require.js (recommended)
===================================== =====================================
...@@ -578,7 +574,7 @@ To do this for ALL languages, run: ...@@ -578,7 +574,7 @@ To do this for ALL languages, run:
:: ::
make merge make po
The resulting PO file is then what gets translated. The resulting PO file is then what gets translated.
...@@ -805,6 +801,12 @@ Here are the different events that are emitted: ...@@ -805,6 +801,12 @@ Here are the different events that are emitted:
Triggered whenever the roster view (i.e. the rendered HTML) has changed. 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** * **onChatBoxFocused**
``converse.on('onChatBoxFocused', function (chatbox) { ... });`` ``converse.on('onChatBoxFocused', function (chatbox) { ... });``
...@@ -817,11 +819,11 @@ Here are the different events that are emitted: ...@@ -817,11 +819,11 @@ Here are the different events that are emitted:
Triggered when a chat box has been opened. 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** * **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 ...@@ -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 your website, where users authenticate once in your website and then stay
logged into their XMPP session upon page reload. 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 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 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 ...@@ -392,8 +392,8 @@ follow the instructions below to create this folder and fetch Converse's
3rd-party dependencies. 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>`_) We use development tools (`Grunt <http://gruntjs.com>`_ and `Bower <http://bower.io>`_)
which depend on Node.js and npm (the Node package manager). which depend on Node.js and npm (the Node package manager).
...@@ -406,36 +406,32 @@ directory: ...@@ -406,36 +406,32 @@ directory:
:: ::
npm install make dev
This will install all the development dependencies for Converse.js. If you are This will first install the Node.js development tools (like Grunt and Bower)
curious to know what these are, take a look at whats under the *devDependencies* key in and then use Bower to install all of Converse.js's front-end dependencies.
`package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`.
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 * Development dependencies:
should get loaded in the browser). 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) With AMD and require.js (recommended)
===================================== =====================================
...@@ -578,7 +574,7 @@ To do this for ALL languages, run: ...@@ -578,7 +574,7 @@ To do this for ALL languages, run:
:: ::
make merge make po
The resulting PO file is then what gets translated. 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