now paths should work without issues on both U*NX systems and Windows...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-01-27 17:24:08 +03:00
parent 5390001e5c
commit 8c62d1d222
3 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,10 @@ var setup = function(require, root){
(require.main ? (require.main ?
require.main.filename.split(/[\\\/]/g).slice(0, -1).join('/') require.main.filename.split(/[\\\/]/g).slice(0, -1).join('/')
: document.baseURI : document.baseURI
.replace(/^[a-zA-Z]+:\/\/\/?/, '') // remove URL protocol...
.replace(/^[a-zA-Z]+:\/\/\/?/, '/')
// remove leading '/' on windows drives...
.replace(/^\/[a-zA-Z]:/, '')
.split(/[#&]/)[0].split(/[\\\/]/g).slice(0, -1).join('/')) .split(/[#&]/)[0].split(/[\\\/]/g).slice(0, -1).join('/'))
: '.', : '.',

View File

@ -11,6 +11,8 @@ Hacks and fixes
- cfg/requirejs.js: - cfg/requirejs.js:
.baseUrl calculation under U*IX systems needs a '/' prefixed... .baseUrl calculation under U*IX systems needs a '/' prefixed...
Both issues are currently tweaked manually...
20210122: 20210122:

View File

@ -13,7 +13,7 @@
// > node version.js // > node version.js
// - browser + requirejs + file:// // - browser + requirejs + file://
// - browser + requirejs + http* // - browser + requirejs + http*
var VERSION = '4.0.0a' var VERSION = '4.0.1a'
//console.log(VERSION) //console.log(VERSION)