gulp-jspm-build
gulp-jspm-build copied to clipboard
config path resolution is different to jspm
I've found a problem that jspm uses another path resolution to config file than this plugin. It should be related to issue #6 and pull request #15 (especially line 31).
JSPM uses jspm.directories.baseURL
only for searching scripts and jspm.configFile
determines independently the path to config (starting from gulpfile.js).
This Plugin uses the baseUrl
and also appends the full path of the configFile
after it. I've provided a gist for that (move config.system.js
into the folder public/scripts/
). If your baseUrl
is public/scripts
and the path to your configFile
is public/scripts/config.system.js
, the resolved path will contain the base path two times [PROCESS.CWD]/public/scripts/public/scripts/config.system.js
.
Execute jspm install
and everything will be fine until here. But after executing gulp bundle
you will receive an error that "css" couldn't be fetched (no mention of missing config file). The "bundle" task only works, if you change the path public/scripts/config.system.js
to only config.system.js
, but then following jspm install
will fail (asks for creating a new config.system.js
).
Maybe the joined path in lib/build.js
shouldn't use the options.baseUrl
, though I like the idea of resolving the config path from the base path …