[Git][debian-gis-team/mgrs][master] 6 commits: Imported Upstream version 1.0.0

Bas Couwenberg gitlab at salsa.debian.org
Sat Mar 31 10:26:33 UTC 2018


Bas Couwenberg pushed to branch master at Debian GIS Project / mgrs


Commits:
bf956e60 by Bas Couwenberg at 2017-01-25T18:03:11+01:00
Imported Upstream version 1.0.0
- - - - -
461522f1 by Bas Couwenberg at 2017-01-25T18:03:18+01:00
Merge tag 'upstream/1.0.0'

Upstream version 1.0.0

- - - - -
c390f41b by Bas Couwenberg at 2017-01-25T18:03:34+01:00
New upstream release.

- - - - -
6a06afa0 by Bas Couwenberg at 2017-03-01T07:52:45+01:00
Set distribution to experimental.

- - - - -
646f8890 by Bas Couwenberg at 2018-01-20T22:19:01+01:00
Update copyright-format URL to use HTTPS.

- - - - -
9a463a48 by Bas Couwenberg at 2018-03-31T12:26:25+02:00
Update Vcs-* URLs for Salsa.

- - - - -


8 changed files:

- debian/changelog
- debian/control
- debian/copyright
- dist/mgrs.js
- mgrs.js
- package.json
- + rollup.config.js
- test/test.js


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+mgrs (1.0.0-1~exp2) UNRELEASED; urgency=medium
+
+  * Update Vcs-* URLs for Salsa.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 31 Mar 2018 12:26:21 +0200
+
+mgrs (1.0.0-1~exp1) experimental; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 01 Mar 2017 07:52:29 +0100
+
 mgrs (0.0.3-3) unstable; urgency=medium
 
   * Change section of libjs-mgrs to web.


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,8 @@ Build-Depends: debhelper (>= 9),
                nodejs,
                node-uglify
 Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/mgrs.git/
-Vcs-Git: https://anonscm.debian.org/git/pkg-grass/mgrs.git
+Vcs-Browser: https://salsa.debian.org/debian-gis-team/mgrs/
+Vcs-Git: https://salsa.debian.org/debian-gis-team/mgrs.git
 Homepage: https://github.com/proj4js/mgrs
 
 Package: libjs-mgrs


=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: mgrs
 Upstream-Contact: MetaCRS Developers <metacrs at lists.osgeo.org>
 Source: https://github.com/proj4js/mgrs


=====================================
dist/mgrs.js
=====================================
--- a/dist/mgrs.js
+++ b/dist/mgrs.js
@@ -1,6 +1,8 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.mgrs=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-
-
+(function (global, factory) {
+	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+	typeof define === 'function' && define.amd ? define(['exports'], factory) :
+	(factory((global.mgrs = global.mgrs || {})));
+}(this, (function (exports) { 'use strict';
 
 /**
  * UTM zones are grouped, and assigned to one of a group of 6
@@ -31,7 +33,11 @@ var I = 73; // I
 var O = 79; // O
 var V = 86; // V
 var Z = 90; // Z
-
+var mgrs = {
+  forward: forward,
+  inverse: inverse,
+  toPoint: toPoint
+};
 /**
  * Conversion of lat/lon to MGRS.
  *
@@ -41,13 +47,13 @@ var Z = 90; // Z
  *      100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.
  * @return {string} the MGRS string for the given location and accuracy.
  */
-exports.forward = function(ll, accuracy) {
+function forward(ll, accuracy) {
   accuracy = accuracy || 5; // default accuracy 1m
   return encode(LLtoUTM({
     lat: ll[1],
     lon: ll[0]
   }), accuracy);
-};
+}
 
 /**
  * Conversion of MGRS to lat/lon.
@@ -57,21 +63,21 @@ exports.forward = function(ll, accuracy) {
  *     (longitude) and top (latitude) values in WGS84, representing the
  *     bounding box for the provided MGRS reference.
  */
-exports.inverse = function(mgrs) {
+function inverse(mgrs) {
   var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
   if (bbox.lat && bbox.lon) {
     return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
   }
   return [bbox.left, bbox.bottom, bbox.right, bbox.top];
-};
+}
 
-exports.toPoint = function(mgrs) {
+function toPoint(mgrs) {
   var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
   if (bbox.lat && bbox.lon) {
     return [bbox.lon, bbox.lat];
   }
   return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];
-};
+}
 /**
  * Conversion from degrees to radians.
  *
@@ -742,5 +748,11 @@ function getMinNorthing(zoneLetter) {
 
 }
 
-},{}]},{},[1])(1)
-});
+exports['default'] = mgrs;
+exports.forward = forward;
+exports.inverse = inverse;
+exports.toPoint = toPoint;
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+})));


=====================================
mgrs.js
=====================================
--- a/mgrs.js
+++ b/mgrs.js
@@ -30,7 +30,11 @@ var I = 73; // I
 var O = 79; // O
 var V = 86; // V
 var Z = 90; // Z
-
+export default {
+  forward: forward,
+  inverse: inverse,
+  toPoint: toPoint
+};
 /**
  * Conversion of lat/lon to MGRS.
  *
@@ -40,7 +44,7 @@ var Z = 90; // Z
  *      100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.
  * @return {string} the MGRS string for the given location and accuracy.
  */
-exports.forward = function(ll, accuracy) {
+export function forward(ll, accuracy) {
   accuracy = accuracy || 5; // default accuracy 1m
   return encode(LLtoUTM({
     lat: ll[1],
@@ -56,7 +60,7 @@ exports.forward = function(ll, accuracy) {
  *     (longitude) and top (latitude) values in WGS84, representing the
  *     bounding box for the provided MGRS reference.
  */
-exports.inverse = function(mgrs) {
+export function inverse(mgrs) {
   var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
   if (bbox.lat && bbox.lon) {
     return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
@@ -64,7 +68,7 @@ exports.inverse = function(mgrs) {
   return [bbox.left, bbox.bottom, bbox.right, bbox.top];
 };
 
-exports.toPoint = function(mgrs) {
+export function toPoint(mgrs) {
   var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
   if (bbox.lat && bbox.lon) {
     return [bbox.lon, bbox.lat];


=====================================
package.json
=====================================
--- a/package.json
+++ b/package.json
@@ -1,11 +1,12 @@
 {
   "name": "mgrs",
-  "version": "0.0.2",
+  "version": "1.0.0",
   "description": "Utility for converting between WGS84 lat/lng and MGRS coordinates",
-  "main": "mgrs.js",
+  "main": "dist/mgrs.js",
+  "module": "mgrs.js",
   "scripts": {
-    "test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js",
-    "build": "mkdir -p dist && browserify mgrs.js -s mgrs | derequire > dist/mgrs.js"
+    "test": "npm run build && istanbul test _mocha test/test.js",
+    "build": "mkdir -p dist && rollup -c"
   },
   "repository": {
     "type": "git",
@@ -22,9 +23,8 @@
     "url": "https://github.com/proj4js/mgrs/issues"
   },
   "devDependencies": {
-    "browserify": "^8.1.1",
+    "rollup": "^0.41.4",
     "chai": "~1.8.1",
-    "derequire": "^1.2.0",
     "istanbul": "~0.1.46",
     "mocha": "~1.15.1"
   }


=====================================
rollup.config.js
=====================================
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,8 @@
+
+export default {
+	entry: 'mgrs.js',
+  dest: 'dist/mgrs.js',
+  format: 'umd',
+  moduleName: 'mgrs',
+  exports: 'named'
+};


=====================================
test/test.js
=====================================
--- a/test/test.js
+++ b/test/test.js
@@ -1,5 +1,5 @@
 var should = require('chai').should();
-var mgrs = require('../mgrs');
+var mgrs = require('../dist/mgrs');
 describe('First MGRS set', function() {
   var mgrsStr = "33UXP04";
   var point = mgrs.toPoint(mgrsStr);



View it on GitLab: https://salsa.debian.org/debian-gis-team/mgrs/compare/d8b6a54f4e837cf2d7d0b67bb3ac82541fe4b4d4...9a463a48a641b65c8a362fcf019bc41683892c73

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/mgrs/compare/d8b6a54f4e837cf2d7d0b67bb3ac82541fe4b4d4...9a463a48a641b65c8a362fcf019bc41683892c73
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180331/a94cf8e1/attachment-0001.html>


More information about the Pkg-grass-devel mailing list