This is a simple, lightweight CDN for 2sxc.
📖 Read the docs on https://r.2sxc.org/cdn
2sxc uses various external javascripts, css files and fonts from external sources, such as
This is a problem for some customers, for reasons such as
This repo has 2 purposes:
https://cdn.2sxc.org/
as a neutral, cookie-free CDN/cdn/
- so it’s easy to copy to your own siteInternally all the packages we publish are copied to the /packages
folder.
This means that the default targets are:
https://cdn.2sxc.org/packages
/cdn/packages
(on your site)The original folders often have a @
character in the path.
This causes trouble when hosting on a Windows server.
Because of this, the paths here replace the @
character with _
- so @fancyapps
becomes _fancyapps
.
/packages/v15
- Resources for 2sxc 15.04+ and 16.00+
We usually have the same package in multiple versions (eg Bootstrap 4.6.2, 5.2.3, 5.3.0 etc.). To allow them all to be added to npm we must give them an own name in our node_modules like this:
npm i bootstrap523@npm:bootstrap@5.2.3
Then the packages are in the npm-folder, but not yet published.
Use npm run download-fonts
to download the fonts from Google.
They will be copied to the /src
folder but won’t publish them yet.
The scripts to publish the proper files are in the /build
folder.
We will have different files like v15.js
for each version to publish.
Use npm run build
to build all the resources.