This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231323 - implementation of CDNJS libraries provider is out-dated
Summary: implementation of CDNJS libraries provider is out-dated
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 23:06 UTC by David Konecny
Modified: 2013-06-18 14:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2013-06-16 23:06:58 UTC
Current implementation providing CNDJS libraries relies on content of  package.json library descriptor file. Which was sufficient when we started using CDNJS more then year ago. But since then CDNJS evolved and relying only on package.json files has many limitations:
* library can consist of multiple files (css, html, etc.) and these files are not descrribed in package.json
* library can have both debug and release versions and this is not described in package.json either
* some JS files may be using non-standard file naming, eg. issue 225132
Comment 1 David Konecny 2013-06-16 23:15:07 UTC
319f98ce0b0f

Few notes about the solution:
* I rewrote the provider to analyze directory structure
* I removed cdnjs.zip from NetBeans HG repository and treat it as a binary - it got too big (2MB)
* the cndjs.zip bundled with the IDE keeps all files so that file structure analysis can be done but content of the files (apart from package.json) files was stripped down
* I enhanced code creating JS libraries in project to recreate directories if library is using some (many libraries do)
Comment 2 David Konecny 2013-06-16 23:40:25 UTC
While implementing this I noticed few issues which I filed separately:
* Bug 231324 - cndjs.zip is stored in cache directory (eg. /tmp)
* Bug 231325 - library download should abort after first download failure
* Bug 231326 - libraries folder incorrectly updated
Comment 3 David Konecny 2013-06-17 04:25:46 UTC
This issue is relevant too:

* Bug 228876 - Use local JS libs if available
Comment 4 Quality Engineering 2013-06-18 14:46:54 UTC
Integrated into 'main-golden', will be available in build *201306181109* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/319f98ce0b0f
User: David Konecny <dkonecny@netbeans.org>
Log: #231323 - implementation of CDNJS libraries provider is out-dated