Is the difference in Codidact's CDN guidance intentional? Question
Codidact has a guide to installing Co-Design. The section "Using a pre-built version" recommends using a CDN.
I notice that the CDN recommended in the guide is different to the CDN used in the Codidact source code:
- The guide uses
unpkg.com
- The source code uses
cdn.jsdelivr.net
There is also a difference in what version is used:
- The guide uses
@latest
so will always get the most recent version - The source code currently uses
@0.12.5
so will not use any subsequently released version without a code change
The usage in the source code can be seen for example in app/views/layouts/_head.html.erb, on line 22 and line 36.
Line 22:
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/@codidact/[email protected]/dist/codidact.css" %>
Line 36:
<scrpt src="https://cdn.jsdelivr.net/npm/@codidact/[email protected]/js/co-design.js" defer></scrpt>
Note that the previous code block has a deliberate typo to avoid using the "script" opening or closing tag which currently cause problems - the correct code can be seen by following the link above.
Is there a reason that the guidance should make different recommendations than what Codidact currently uses? If so, would it be useful to add this reason to the guide? If not, should either the guide or the source code be changed so that they are consistent?
In the later section of the guide called "Minimal HTML template", the Co-Design JavaScript is added from a CDN, but the CSS is local. Is this an oversight? Should there be either an explanation or a fix to the guide?
0 comment threads