-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grunt files
expansion processing and builder's baseURL break configuration
#9
Comments
hi @MisterFreeze before I can dive into this more thoroughly I wanted to clarify something: In your post you keep mentioning "Bower" but I think you mean "Grunt". is that correct? thanks, |
Hi @yoavniran , you are correct. I will change this to grunt :) |
files
expansion processing and builder's baseURL break configurationfiles
expansion processing and builder's baseURL break configuration
In the project im working on now I have this set up and it works well: options.baseURL = "./target/widget" Would this not be a good solution for you @MisterFreeze ? |
Hi,
This is what I did in example 3 and it currently is the only solution I am
able to get it running with.
For two reasons, I do not think that this solution is good. Firstly,
baseURL is not honored in this setup. This makes this configuration
parameter completely useless and also may confuse users familiar with
systemjs-builder.
Secondly, the usage of grunt's files processing breaks the
systemjs-builder's source file lookup logic and will make implementation of
arithmetic builds more complicated, as I pointed out in #7.
Let me summarize this. I am aware of the workaround you suggested but I do
not like workarounds to be a mid-term solution. I am willing to contribute
to this project to improve it.
Best regards,
MisterFreeze
|
Hello,
for two reasons, I think that grunt's
files
logic and builder'sbaseURL
setting collide. First, I cannot give asrc
relative to the gruntfile (except using './') because when using abaseURL
, its value is prepended by systemjs-builder to determine the source files's location.So I would have to use a path relative to
baseURL
. This, however, breaks for grunt'sfiles
expansion.Example 1 (breaks):
file:
./static/js/main.js
baseURL:
static
src:
js/main
Example 1 does not work because
file.src
is undefined as grunt'sfiles
logic cannot find./js/main
. systemjs-builder, however, would find the correct source file.Example 2 (breaks):
file:
./static/js/main.js
baseURL:
static
src:
static/js/main.js
Example 2 gives a valid
file.src
value but systemjs-builder expands it tostatic/static/js/main.js
, which does not exist.Example 3 (works):
file:
./static/js/main.js
baseURL:
static
src:
./static/js/main.js
Example 3 works as grunt's file logic finds that file and systemjs-builder does not prepend the
baseURL
value as it recognizes the explicit relative path ('./').Idea
I would suggest not to use grunt's
files
logic at all and let systemjs-builder do the source file expansion. This would also allow for arithmetic builds. My suggestion can be found summarized in #7 .Kind regards
The text was updated successfully, but these errors were encountered: