Fix load order for TextEncoder/TextDecoder in require.js, update dist/

This commit is contained in:
David Humphrey (:humph) david.humphrey@senecacollege.ca 2013-11-27 13:08:26 -05:00
parent 415ad41406
commit 8a33cb0449
5 changed files with 19 additions and 9 deletions

5
dist/idbfs.js vendored
View File

@ -7001,7 +7001,7 @@ define("encoding-indexes", function(){});
global['TextDecoder'] = global['TextDecoder'] || TextDecoder;
}(this));
define("encoding", function(){});
define("encoding", ["encoding-indexes"], function(){});
// Copyright Joyent, Inc. and other Node contributors.
//
@ -7547,13 +7547,12 @@ define('src/providers/providers',['require','src/providers/indexeddb','src/provi
};
});
define('src/fs',['require','lodash','encoding-indexes','encoding','src/path','src/path','src/path','src/shared','src/shared','src/shared','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/providers/providers'],function(require) {
define('src/fs',['require','lodash','encoding','src/path','src/path','src/path','src/shared','src/shared','src/shared','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/error','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/constants','src/providers/providers'],function(require) {
var _ = require('lodash');
// TextEncoder and TextDecoder will either already be present, or use this shim.
// Because of the way the spec is defined, we need to get them off the global.
require('encoding-indexes');
require('encoding');
var normalize = require('src/path').normalize;

6
dist/idbfs.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -43,10 +43,16 @@ module.exports = function(grunt) {
wrap: {
startFile: 'build/wrap.start',
endFile: 'build/wrap.end'
},
shim: {
// TextEncoder and TextDecoder shims. encoding-indexes must get loaded first.
"encoding": {
deps: ["encoding-indexes"]
}
}
}
}
},
}
});
grunt.loadNpmTasks('grunt-contrib-clean');

View File

@ -4,7 +4,6 @@ define(function(require) {
// TextEncoder and TextDecoder will either already be present, or use this shim.
// Because of the way the spec is defined, we need to get them off the global.
require('encoding-indexes');
require('encoding');
var normalize = require('src/path').normalize;

View File

@ -11,7 +11,13 @@ require.config({
"IDBFS": "../src/fs"
},
baseUrl: "../lib",
optimize: "none"
optimize: "none",
shim: {
// TextEncoder and TextDecoder shims. encoding-indexes must get loaded first.
"encoding": {
deps: ["encoding-indexes"]
}
}
});
require(["tests/test-manifest"], function() {