Commit 59124a5b authored by Christopher S Barnett's avatar Christopher S Barnett Committed by Christopher S Barnett
Browse files

updated dependencies

updated gulpfile.js to use new gulp api, add browserify task
updated README to add install and build instructions, quick link documentation
added package-lock.json
parent 13a03410
......@@ -5,10 +5,44 @@ international arms trade and broader military sector. It forms part
of WPF’s ongoing program on the Global Arms Trade and Corruption.
## quick links to countries and cases
You can link directly to a country or a case with a URI fragment.
The query string for a country is the 3 letter ISO code.
The query string for a case is the URL encoded case name.
## Install and build javascript
Build javascript by running gulpfile.js. Browserify is used to create
a javascript bundle.
requires Node, npm and gulp cli. See the gulp.js quickstart for information.
### To install:
Navigate to the project directory.
To install javascript dependencies:
npm install
To build the javascript file:
The arms deal data for the map is found in `docroot/data/wpf_deals.json`
This diff is collapsed.
......@@ -36,7 +36,7 @@
<link rel="stylesheet" href="css/leaflet.css"/>
<link rel="stylesheet" href="css/map.css"/>
<!-- Bootstrap Core JavaScript -->
<!-- Application JavaScript -->
<script src="dist/js/app.js"></script>
"use strict";
const gulp = require('gulp');
const uglify = require('gulp-uglify');
const browserify = require('browserify');
const source = require('vinyl-source-stream');
var browserify = require("browserify");
var gulp = require("gulp");
var source = require("vinyl-source-stream");
var buffer = require("vinyl-buffer");
var uglify = require("gulp-uglify");
var gutil = require("gulp-util");
gulp.task("javascript", function () {
// set up the browserify instance on a task basis
var b = browserify({
entries: "./js/map.js",
debug: true
gulp.task('browserify', function() {
return browserify('./js/map.js')
//Pass desired output filename to vinyl-source-stream
// Start piping stream to tasks!
return b.bundle()
// Add transformation tasks to the pipeline here.
.on("error", gutil.log)
gulp.task('compress', function() {
return gulp.src('./js/app.js')
gulp.task('default', gulp.series('browserify', 'compress'));
This diff is collapsed.
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