Commit b3a9684e authored by Calvin Metcalf's avatar Calvin Metcalf
Browse files

clean up

parent 541a06fc
Loading
Loading
Loading
Loading
+71 −86
Original line number Diff line number Diff line
@@ -13,22 +13,19 @@ module.exports = function(grunt) {
      before: {
        options: {
          urls: [ //my ide requries process.env.IP and PORT
						"http://"+(process.env.IP||"127.0.0.1")+":"+(process.env.PORT||"8080")+"/test/index.html"
					]
          "http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/index.html"]
        }
      },
      after: {
        options: {
          urls: [ //my ide requries process.env.IP and PORT
						"http://"+(process.env.IP||"127.0.0.1")+":"+(process.env.PORT||"8080")+"/test/opt.html"
					]
          "http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/opt.html"]
        }
      },
      amd: {
        options: {
          urls: [ //my ide requries process.env.IP and PORT
						"http://"+(process.env.IP||"127.0.0.1")+":"+(process.env.PORT||"8080")+"/test/amd.html"
					]
          "http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/amd.html"]
        }
      }
    },
@@ -49,50 +46,38 @@ module.exports = function(grunt) {
      },
      all: ['./proj4/*.js', './proj4/projCode/*.js']
    },
    requirejs: {
      reg:{
        options:{
          out: "./dist/proj4.js",
          baseUrl: ".",
          //name: "proj4",
          wrap: {
            startFile: 'almond/top.frag',
            endFile: 'almond/end.frag'
          },
          name: 'node_modules/almond/almond',
          include: ['proj4'],
          optimize:'uglify2',
          //optimize:'none',
          uglify2:{
            mangle: true
    browserify: {
      all: {
        files: {
          'dist/proj4.js': ['lib/index.js'],
        },
          preserveLicenseComments: false
        options: {
          transform: ['deamdify'],
          standalone: 'proj4'
        }
      }
    },
      amd:{
    uglify: {
      options: {
          out: "./dist/amd/proj4.js",
          baseUrl: ".",
          name: "proj4",
          //include: ['proj4'],
          optimize:'none',
          uglify2:{
        report: 'gzip',
        mangle: true
      },
          preserveLicenseComments: false
        }
      all: {
        src: 'dist/proj4.js',
        dest: 'dist/proj4.min.js'
      }
    }
  });
  grunt.loadNpmTasks('grunt-contrib-requirejs');
  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-mocha-phantomjs');
  grunt.registerTask('version', function() {
	  grunt.file.write('./proj4/version.js',"define(function(){return '"+grunt.file.readJSON('package.json').version+"';});");
    grunt.file.write('./lib/version.js', "define(function(){return '" + grunt.file.readJSON('package.json').version + "';});");
  });
  grunt.registerTask('test', ['connect', 'mocha_phantomjs:before']);
  grunt.registerTask('amd', ['jshint', 'requirejs:amd', 'connect', 'mocha_phantomjs:amd']);
  grunt.registerTask('build', ['jshint', 'requirejs:custom']);
  grunt.registerTask('default', ['version','jshint','test','requirejs:reg','requirejs:amd','mocha_phantomjs:after','mocha_phantomjs:amd']);
}
  grunt.registerTask('default', ['version', 'jshint', 'test', 'browserify', 'uglify', 'mocha_phantomjs:after', 'mocha_phantomjs:amd']);
};

almond/end.frag

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
  return require('proj4');
}));
 No newline at end of file

almond/top.frag

deleted100644 → 0
+0 −11
Original line number Diff line number Diff line
(function (root, factory) {
  /* global module: false */
  if (typeof define === 'function' && define.amd) {
    define(factory);
  } else if(typeof module !== 'undefined'){
    module.exports = factory();
  }else {
    root.proj4 = factory();
  }
}(this, function () {
+1 −1
Original line number Diff line number Diff line
{
  "name": "proj4",
  "version": "1.4.1",
  "version": "1.5.0-dev.1",
  "homepage": "https://github.com/proj4js/proj4js",
  "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
  "main": "dist/proj4.js",
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
  "name": "proj4",
  "repo": "proj4js/proj4js",
  "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
  "version": "1.4.1",
  "version": "1.5.0-dev.1",
  "keywords": ["projections","proj4","transform","crs"],
  "license": "MIT",
  "main": "dist/proj4.js",
Loading