Working with the source code
This tutorial describes how to start working with jPList source code.
- Download and install NodeJS.
-
Download jPList library from GitHub or use GIT to get it:
git clone https://github.com/1rosehip/jplist-es6.git
-
Go to the downloaded folder, open CMD or Terminal window and run the following commands:
cd jplist-es6 npm install
-
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
-
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