cassette icon indicating copy to clipboard operation
cassette copied to clipboard

bundle.txt doesn't recognize ../../ style paths

Open prabirshrestha opened this issue 13 years ago • 3 comments
trafficstars

prabirshrestha avatar May 05 '12 03:05 prabirshrestha

Are you ".."ing above the directory that bundle.txt is in? Because this won't work right now.

andrewdavey avatar May 09 '12 08:05 andrewdavey

Here is my bundle.txt https://github.com/prabirshrestha/backbone-js-on-nancy/blob/f8374f9a8af45c5543d6202fac9a017241fe11ad/src/BackboneJsOnNancy.Web/assets/javascripts/app/bundle.txt

I want it to look something like this.

app.js
..\public_app\views\header.js
models/*
collections/*
views/*
routers/*
*

Header.js is common. right now the only way was by adding header.js in both public_app\vies\header.js and app\views\header.js

You can find the folder structure at https://github.com/prabirshrestha/backbone-js-on-nancy/tree/f8374f9a8af45c5543d6202fac9a017241fe11ad/src/BackboneJsOnNancy.Web/assets/javascripts

prabirshrestha avatar May 09 '12 14:05 prabirshrestha

Aye I've run to this just now. The concept that bundles will cleanly map to folders of scripts is a bit... bleh. In order to make use of bundle descriptors I seem to have to create a seperate folder and put a bundle.txt in it.

So I have a folder structure like this:

/ui/js (contains all my scripts) /ui/js/jquery/ (contains bundle.txt to load up jquery) /ui/js/defaultscripts/ (contains a bundle.txt that references the jquery bundle and several assets in the parent folder)

jquery/bundle.txt

[external] url = //ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js fallbackCondition = !window.jQuery

[assets] ~/ui/js/jquery-1.7.1.min.js

defaultscripts/bundle.txt

~/ui/js/class.js ~/ui/js/knockout-2.0.0.js ~/ui/js/knockout.mapping-latest.js ~/ui/js/globalize.js ~/ui/js/jquery.continuations.js ~/ui/js/ajax.js ~/ui/js/bootstrap-dropdown.js ~/ui/js/utils.js

[references] ~/ui/js/jquery

In my view:

Bundles.Reference("~/ui/js/defaultscripts");

Yields: FNFException The asset file "~/ui/js/jquery-1.7.1.min.js" was not found for bundle "~/ui/js/jquery".

How should I have set this up? Seems this problem would be solved by letting me have multiple bundle.txt (obviously with diff names) in the root js folder.

worldspawn avatar May 31 '12 03:05 worldspawn