RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

Allow .. to navigate to parent directory in config file inputs declaration #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I want to put the config file in a sibling directory to the javascript 
directory, so that I have a config file of the form:

{
  "id": "myapp",
  "paths": [ "../javascript" ],
  "inputs": "../javascript/myapp.js",
  "mode": "RAW",
}

In RAW mode, the src attribute on the script tag that is generated for myapp.js 
is "http://localhost:9810/input/myapp/../javascript/myapp.js".  It should 
include the id -- something like 
"http://localhost:9810/input/myapp/javascript/myapp.js"

Src attributes for the script tags of the other javascript files that myapp.js 
requires are fine.  They are 
"http://localhost:9810/input/myapp/javascript/filename.js"

The app compiles fine.  This is only a problem in RAW mode.

-dallan

Original issue reported on code.google.com by dallan on 16 Dec 2010 at 6:54

GoogleCodeExporter commented 9 years ago
Hmm, this is a pretty serious issue. What if the dots were changed to dollar 
signs? My only concern is if you had both of the following as inputs:

../javascript/myapp.js
javascript/myapp.js

Then there would need to be a way to distinguish the two.

I realize that similar problematic scenarios already exist in plovr, though I 
would like to try to reduce them.

Original comment by bolinf...@gmail.com on 2 Jan 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Mapping .. to $$ seems like a pretty good solution.  So in RAW mode, the src 
attribute for the file ../javascript/myapp.js would be 
http://localhost:9810/input/myapp/$$/javascript/myapp.js, and plovr would 
respond to that request with the content of ../javascript/myapp.js, right? 

That works for me.

Original comment by dallan on 6 Jan 2011 at 4:21

GoogleCodeExporter commented 9 years ago
Fixed in 
http://code.google.com/p/plovr/source/detail?r=7cca662d555fdd5ec882a89aa808d1d94
2979c82

Original comment by bolinf...@gmail.com on 15 Sep 2011 at 2:02

GoogleCodeExporter commented 9 years ago
Issue 44 has been merged into this issue.

Original comment by bolinf...@gmail.com on 15 Sep 2011 at 2:02

GoogleCodeExporter commented 9 years ago
thank you for fixing this!

Original comment by dal...@quass.org on 15 Sep 2011 at 2:16