Setting up a dev environment¶
Installing the 3rd party dependencies¶
To develop and customize Converse, you’ll first need to check out Converse’s Git repository:
git clone https://github.com/conversejs/converse.js.git cd converse.js
We use development tools which depend on Node.js and NPM (the Node package manager).
It’s recommended that you use NVM (the Node version manager) to make sure you have the right version of Node.
Refer to the NVM Github page for instructions on how to install it.
Once NVM is installed, you can run the following inside your checkout of the Converse Git repository:
You will always have to first run
nvm install in a new terminal session in order to use the
recommended version of Node before working on Converse.
To set up the Converse development environment, you now run
Alternatively, if you’re using Windows, or don’t have GNU Make installed, you can run the following:
npm install npm run lerna
This will install the Node development tools and Converse’s dependencies.
Converse directly depends and which will be loaded in the browser as part of
the bundle in
To see the 3rd party dependencies (not just the front-end dependencies, but
also ones necessary for development tasks like making builds), take a look at
the list under the
devDependencies in package.json.
`make dev`, you should now have a new node_modules directory
which contains all the external dependencies of Converse.
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. For support, you can ask in our chatroom: firstname.lastname@example.org.
If you don’t have an XMPP client installed, follow this link to conversejs.org where you can log in and be taken directly to the chatroom.
If you want OMEMO encryption, you need to load libsignal separately in your page.
Setting up a webserver¶
When making changes to Converse, either development or theming changes, you’ll want to preview them in your browser.
For this, you’ll need to serve the development files via a web server, so that you can see your local changes in the browser.
Manually starting a web server¶
To both set up the development environment and also start up a web browser to serve the files for you, you can run:
To run the “make” commands, you’ll need GNUMake installed on your computer. If you use GNU/Linux or *BSD, it should be installed or available via your package manager. For Mac, you’ll need to install XCode and in Windows you can use Chocolatey.
make serve you can open http://localhost:8000 in your webbrowser to see the Converse website.
When developing or changing the theme, you’ll want to load all the unminified JS and CSS resources as separate files. To do this, open http://localhost:8000/dev.html instead.
You might want to open dev.html in your text editor or IDE as well, to see
converse.initialize is called and to potentially change any of the
Starting a web server with live reloading¶
Alternatively, if you want to have live reloading whenever any of the source files change, you
make devserver (which will use webpack-dev-server).
dev.html being used, webpack.html
is now being used as the HTML template, and you’ll need to modify that file if
you want to change the settings passed to
If you’re running
make devserver, you need to open http://localhost:8080.