@@ -5,16 +5,16 @@ var fs = require('fs');
5
5
var SaveAssetsJson = require ( 'assets-webpack-plugin' ) ;
6
6
7
7
var addons = require ( './addons.json' ) ;
8
- var root = path . join ( __dirname , 'website' , 'static' ) ;
8
+ var root = path . resolve ( __dirname , 'website' , 'static' ) ;
9
9
/** Return the absolute path given a path relative to ./website/static */
10
10
var staticPath = function ( dir ) {
11
- return path . join ( root , dir ) ;
11
+ return path . resolve ( root , dir ) ;
12
12
} ;
13
13
var nodePath = function ( dir ) {
14
- return path . join ( __dirname , 'node_modules' , dir ) ;
14
+ return path . resolve ( __dirname , 'node_modules' , dir ) ;
15
15
} ;
16
16
var addonsPath = function ( dir ) {
17
- return path . join ( __dirname , 'addons' , dir ) ;
17
+ return path . resolve ( __dirname , 'addons' , dir ) ;
18
18
} ;
19
19
20
20
/**
@@ -103,20 +103,20 @@ var addonModules = ['files.js', 'node-cfg.js', 'user-cfg.js', 'file-detail.js',
103
103
addons . addons . forEach ( function ( addonName ) {
104
104
var baseDir = addonName + '/' ;
105
105
addonModules . forEach ( function ( module ) {
106
- var modulePath = path . join ( __dirname , 'addons' ,
106
+ var modulePath = path . resolve ( __dirname , 'addons' ,
107
107
addonName , 'static' , module ) ;
108
108
if ( fs . existsSync ( modulePath ) ) {
109
109
var entryPoint = baseDir + module . split ( '.' ) [ 0 ] ;
110
110
entry [ entryPoint ] = modulePath ;
111
111
}
112
112
} ) ;
113
- var logTextPath = path . join ( __dirname , 'addons' ,
113
+ var logTextPath = path . resolve ( __dirname , 'addons' ,
114
114
addonName , 'static' , addonName + 'LogActionList.json' ) ;
115
115
if ( fs . existsSync ( logTextPath ) ) {
116
116
addonLog = require ( logTextPath ) ;
117
117
for ( var attrname in addonLog ) { mainLogs [ attrname ] = addonLog [ attrname ] ; }
118
118
}
119
- var anonymousLogTextPath = path . join ( __dirname , 'addons' ,
119
+ var anonymousLogTextPath = path . resolve ( __dirname , 'addons' ,
120
120
addonName , 'static' , addonName + 'AnonymousLogActionList.json' ) ;
121
121
if ( fs . existsSync ( anonymousLogTextPath ) ) {
122
122
anonymousAddonLog = require ( anonymousLogTextPath ) ;
@@ -161,7 +161,7 @@ var resolve = {
161
161
'highlight-css' : nodePath ( 'highlight.js/styles/default.css' ) ,
162
162
'pikaday-css' : nodePath ( 'pikaday/css/pikaday.css' ) ,
163
163
// Also alias some internal libraries for easy access
164
- 'addons' : path . join ( __dirname , 'addons' ) ,
164
+ 'addons' : path . resolve ( __dirname , 'addons' ) ,
165
165
'tests' : staticPath ( 'js/tests' ) ,
166
166
// GASP Items not defined as main in its package.json
167
167
'TweenLite' : nodePath ( 'gsap/src/minified/TweenLite.min.js' ) ,
@@ -190,12 +190,12 @@ var plugins = [
190
190
// Slight hack to make sure that CommonJS is always used
191
191
new webpack . DefinePlugin ( {
192
192
'define.amd' : false ,
193
- '__ENABLE_DEV_MODE_CONTROLS' : fs . existsSync ( staticPath ( path . join ( 'built' , 'git_logs.json' ) ) )
193
+ '__ENABLE_DEV_MODE_CONTROLS' : fs . existsSync ( staticPath ( path . resolve ( 'built' , 'git_logs.json' ) ) )
194
194
} ) ,
195
195
] ;
196
196
197
197
var output = {
198
- path : path . join ( __dirname , 'website' , 'static' , 'public' , 'js' ) ,
198
+ path : path . resolve ( __dirname , 'website' , 'static' , 'public' , 'js' ) ,
199
199
// publicPath: '/static/', // used to generate urls to e.g. images
200
200
filename : '[name].js' ,
201
201
sourcePrefix : ''
0 commit comments