Skip to content

Instantly share code, notes, and snippets.

@bscottm
Created February 9, 2014 21:15
Show Gist options
  • Select an option

  • Save bscottm/8906034 to your computer and use it in GitHub Desktop.

Select an option

Save bscottm/8906034 to your computer and use it in GitHub Desktop.
buffer_ieee754 dependency bug in elasticsearch-js
To reproduce, you need the following three files and need to place elasticsearch.jquery.js in the same directory. Then:
(a) npm install
(b) grunt
Gruntfile.js
~~~~~~~~~~~~
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
basic: {
src: [ "foobar.js" ],
dest: "dist/js/foobar.js"
}
}
});
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('default', [ "browserify" ]);
};
package.json
~~~~~~~~~~~~
{
"name": "foobar",
"version": "0.0.1",
"description": "No description",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "B. Scott Michel",
"license": "GPLv3",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-browserify": "~1.3.0",
"browserify": "~3.24.13",
"ieee754": "~1.1.2",
"buffer-browserify": "~0.2.2"
},
"dependencies": {
"browserify": "~3.24.11"
}
}
foobar.js
~~~~~~~~~
require('./elasticsearch.jquery');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment