Skip to content

Commit

Permalink
Chore: Omit version prefix from replacing jsdelivr urls in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Nov 4, 2021
1 parent 97454e1 commit 704332b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The package is a wrapper around [Cookie Consent] by [Orest Bida].
Load the script and initialize the plugin right before ending `</body>` tag:

```html
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@v0.3.0/init.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.3.0/init.js"></script>
<script>
window.addEventListener('load', function () {
initLmcCookieConsentManager();
Expand All @@ -29,7 +29,7 @@ This will load the plugin from CDN and initialize the plugin with default settin
You can load the plugin from a CDN, as in the basic example above.

```html
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@v0.3.0/init.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@lmc-eu/cookie-consent-manager@0.3.0/init.js"></script>
```

Alternatively, you can also download the latest version from the [Releases page](https://github.com/lmc-eu/cookie-consent-manager/releases).
Expand Down
4 changes: 2 additions & 2 deletions scripts/readme-replace-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const replace = require('replace-in-file');
const packageJson = require('../package.json');
const options = {
files: 'README.md',
from: /cookie-consent-manager@v([0-9]\.[0-9]\.[0-9])/gm,
to: `cookie-consent-manager@v${packageJson.version}`,
from: /cookie-consent-manager@([0-9]\.[0-9]\.[0-9])/gm,
to: `cookie-consent-manager@${packageJson.version}`,
};

replace(options)
Expand Down

0 comments on commit 704332b

Please sign in to comment.