# Working with the source code

This tutorial describes how to start working with jPList source code.

1. Download and install NodeJS.

2. Download jPList library from GitHub or use GIT to get it:

       git clone https://github.com/1rosehip/jplist-es6.git

3. Go to the downloaded folder, open CMD or Terminal window and run the following commands:

       cd jplist-es6
       npm install

4. jPList uses Babel and Webpack to transpile and bundle JavaScript source code:

       npm run build

   It's also possible to run them in the watch mode:

       npm run watch

   By default the latest version defined in package.json in version filed is compiled. To build a different version use --version= argument. For example it's possible to build version 1.1.0 as following:

       node node_modules/.bin/webpack --config webpack.config.js --version=1.1.0

5. jPList uses Jest for the unit testing:

       npm test

   By default the command above runs all tests defined in src folder. To narrow it down or to test a specific version use the following command:

       node node_modules/.bin/jest path_to_folder

   For example to test version 1.1.0:

       node node_modules/.bin/jest src/1.1.0