Opened 10 years ago

Closed 10 years ago

#14757 closed defect (worksforme)

[regression] build no longer supports CSS @import the same

Reported by: Karl Tiedt Owned by: Rawld Gill
Priority: undecided Milestone: tbd
Component: BuildSystem Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


Prior to 1.7 optimzeCSS would inline any file @import'd as long as the file path was resolvable...

Now in 1.7 prior to optimizeCSS running, the entire build process is restricted to a resource list (bc.resources = {}) where the key is a filepath... during this list building, any file outside of the the custom namespaces package directory (js/namespace) for example is ignored (w/no easily findable way to override this behavior)

Due to this list... now relative imports from outside of the namespaces path... are skipped.

Whether or not this was intended behavior before, its great for allowing the build complete control of inlining the full applications CSS in the proper order.

Attachments (1) (2.0 KB) - added by Rawld Gill 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by Karl Tiedt

Ahh figured this out, Rawld was right about trees: [] working, the problem was the relative path is different from the other relative paths in the file.

Changing the relative path from dojo.js to from buildscripts folder properly finds these css files now.

Last edited 10 years ago by Karl Tiedt (previous) (diff)

comment:2 Changed 10 years ago by Karl Tiedt

Not sure if this needs a Note regarding outside @imports requiring the dirs or trees directive... but I have removed the "workaround" since the proper solution was figured out to just be a relative path problem

for anyone else reading this to solve any future problems --check-discovery flag for ./build.* scripts is your friend ;)

Changed 10 years ago by Rawld Gill

Attachment: added


comment:3 Changed 10 years ago by Rawld Gill

Resolution: worksforme
Status: newclosed

The attached includes files that demonstrate that CSS files are being compressed.

The zip includes a sparse file tree that is intended to be installed as the parent of dtk. Once installed, you can navigate to dtk/cssTest.html and see a document that loads a CSS resource (test.css) that imports another CSS resource (../imported.css).

Let's assume you wish to build a project that is rooted at dtk. Therefore, ../imported.css is clearly not in any packages and the only way to get it included in the build is to use a files, dirs, or trees profile value. This is done in dtk/util/buildscripts/profiles/css.profile.js.

basePath and releaseDir are also set to pull and push the files around as desired.

Otherwise, the profile simply builds the dojo package.

The build output contains imported.css, compressed, in the location expected.

Note: See TracTickets for help on using tickets.