File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 1
- var fs = require ( 'fs' ) ;
2
1
var path = require ( 'path' ) ;
3
2
4
3
var pkg = require ( '../../package.json' ) ;
5
4
6
5
var pathToRoot = path . join ( __dirname , '../../' ) ;
7
- var pathToRootParent = path . join ( __dirname , '../../../../' ) ;
8
6
var pathToSrc = path . join ( pathToRoot , 'src/' ) ;
9
7
var pathToImageTest = path . join ( pathToRoot , 'test/image' ) ;
10
8
var pathToDist = path . join ( pathToRoot , 'dist/' ) ;
11
9
var pathToBuild = path . join ( pathToRoot , 'build/' ) ;
12
10
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
+ ) ;
23
14
24
15
module . exports = {
25
16
pathToRoot : pathToRoot ,
You can’t perform that action at this time.
0 commit comments