]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/fstream-npm/example/dir.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / fstream-npm / example / dir.js
1 // this will show what ends up in the fstream-npm package
2 var P = require('../')
3 var DW = require('fstream').DirWriter
4
5 var target = new DW({ Directory: true, type: 'Directory',
6                       path: __dirname + '/output'})
7
8 function f (entry) {
9   return entry.basename !== '.git'
10 }
11
12 P({ path: './', type: 'Directory', isDirectory: true, filter: f })
13   .on('package', function (p) {
14     console.error('package', p)
15   })
16   .on('ignoreFile', function (e) {
17     console.error('ignoreFile', e)
18   })
19   .on('entry', function (e) {
20     console.error(e.constructor.name, e.path)
21   })
22   .pipe(target)
23   .on('end', function () {
24     console.error('ended')
25   })