Comment out debugging code from #4376

use node v8
This commit is contained in:
Bryan Housel
2017-09-25 11:56:50 -04:00
committed by Kushan Joshi
parent ddbc9df113
commit 2d583a9400
6 changed files with 3570 additions and 22 deletions

View File

@@ -1,7 +1,5 @@
language: node_js
node_js:
- "4"
- "6"
- "8"
sudo: required
before_script:

42
.yarnclean Normal file
View File

@@ -0,0 +1,42 @@
# test directories
__tests__
test
tests
powered-test
# asset directories
docs
doc
website
images
assets
# examples
example
examples
# code coverage directories
coverage
.nyc_output
# build scripts
Makefile
Gulpfile.js
Gruntfile.js
# configs
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.*.yml
*.yml
# misc
*.gz
*.md

View File

@@ -70,7 +70,7 @@ var imagery = YAML.load(fs.readFileSync('node_modules/editor-layer-index/i18n/en
var en = _.merge(core, { en: { presets: tstrings }}, imagery);
fs.writeFileSync('dist/locales/en.json', JSON.stringify(en, null, 4));
process.exit();
// process.exit();
function read(f) {

View File

@@ -36,6 +36,13 @@ if (isDevelopment) {
});
});
// gaze(['data/**/*.{js,json}'], function(err, watcher) {
// watcher.on('all', function() {
// build();
// });
// });
gaze(['modules/**/*.js', 'data/**/*.{js,json}'], function(err, watcher) {
watcher.on('all', function() {
build();

View File

@@ -236,32 +236,31 @@ function searchLimited(psize, limit, projection, rtree) {
limit = limit || 3;
var partitions = partitionViewport(psize, projection);
console.time('previous');
var results;
var x = _.flatten(_.map(partitions, function(extent) {
// console.time('previous');
results = _.flatten(_.map(partitions, function(extent) {
return rtree.search(extent.bbox())
.slice(0, limit)
.map(function(d) { return d.data; });
}));
console.timeEnd('previous');
// console.timeEnd('previous');
console.time('new');
var a = partitions.reduce(function(prev, curr) {
var searchResult = rtree.search(curr.bbox());
// searchResult will always be an array
if (searchResult.length === 0) return prev;
// console.time('new');
// results = partitions.reduce(function(result, extent) {
// var found = rtree.search(extent.bbox())
// .map(function(d) { return d.data; })
// .sort(function(a, b) {
// return a.loc[1] - b.loc[1];
// // return a.key.localeCompare(b.key);
// })
// .slice(0, limit);
return prev.concat(searchResult
.slice(0, limit)
.map(function(d) {
return d.data;
})
.sort(function(a, b) {
return a.key.localeCompare(b.key);
}));
}, []);
console.timeEnd('new');
return a;
// return (found.length ? result.concat(found) : result);
// }, []);
// console.timeEnd('new');
return results;
}

3502
yarn.lock Normal file

File diff suppressed because it is too large Load Diff