File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 1- var fs = require ( 'fs' ) ;
21var path = require ( 'path' ) ;
32
43var pkg = require ( '../../package.json' ) ;
54
65var pathToRoot = path . join ( __dirname , '../../' ) ;
7- var pathToRootParent = path . join ( __dirname , '../../../../' ) ;
86var pathToSrc = path . join ( pathToRoot , 'src/' ) ;
97var pathToImageTest = path . join ( pathToRoot , 'test/image' ) ;
108var pathToDist = path . join ( pathToRoot , 'dist/' ) ;
119var pathToBuild = path . join ( pathToRoot , 'build/' ) ;
1210
13- var pathToTopojsonSrc ;
14-
15- // npm3 flattens modules, so they won't be accessible through the old nested npm2 paths
16- // attempt a synchronous filestat check, and on error, use the npm3 path
17- try {
18- pathToTopojsonSrc = path . join ( pathToRoot , 'node_modules/sane-topojson/dist/' ) ;
19- fs . statSync ( pathToTopojsonSrc ) ;
20- } catch ( e ) {
21- pathToTopojsonSrc = path . join ( pathToRootParent , 'node_modules/sane-topojson/dist/' ) ;
22- }
11+ var pathToTopojsonSrc = path . join (
12+ path . dirname ( require . resolve ( 'sane-topojson' ) ) , 'dist/'
13+ ) ;
2314
2415module . exports = {
2516 pathToRoot : pathToRoot ,
You can’t perform that action at this time.
0 commit comments