Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @contentstack/live-preview-utils
Alternatively, if you want to include the package directly in your website HTML code, use the following command:

```html
<script type='module' integrity='sha384-b6G+ggU20rGxqCqsgaS6zludFgj5N11xsuXhMEIARMuQY2PtyDS04TU0H5goP+32' crossorigin="anonymous">
<script type='module' crossorigin="anonymous">
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@4.0.1';

ContentstackLivePreview.init({
Expand Down Expand Up @@ -51,7 +51,7 @@ ContentstackLivePreview.init({

MIT License

Copyright © 2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved
Copyright © 2021-2025 [Contentstack](https://www.contentstack.com/). All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 2 additions & 2 deletions main.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @contentstack/live-preview-utils
Alternatively, if you want to include the package directly in your website HTML code, use the following command:

```html
<script type='module' integrity='{{integrity}}' crossorigin="anonymous">
<script type='module' crossorigin="anonymous">
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@{{packageVersion}}';

ContentstackLivePreview.init({
Expand Down Expand Up @@ -51,7 +51,7 @@ ContentstackLivePreview.init({

MIT License

Copyright © 2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved
Copyright © 2021-{{currentYear}} [Contentstack](https://www.contentstack.com/). All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
7 changes: 2 additions & 5 deletions mustache.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
// index.js
// import { render } from 'mustache';
import * as mustache from 'mustache';
import { readFile, readFileSync, writeFileSync } from 'fs';
import { readFile, writeFileSync } from 'fs';
import packageJson from "./package.json" assert { type: "json" };
import ssri from 'ssri';
const MUSTACHE_MAIN_DIR = './main.mustache';
const fileContent = readFileSync('./dist/modern/index.js');
const integrity = ssri.fromData(fileContent, { algorithms: ['sha384'] });
/**
* DATA is the object that contains all
* the data to be provided to Mustache
* Notice the "name" and "date" property.
*/
const DATA = {
packageVersion: packageJson.version,
integrity: integrity.toString(),
currentYear: new Date().getFullYear(),
};
function generateReadMe() {

Expand Down
23 changes: 0 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@types/mustache": "^4.2.2",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@types/ssri": "^7.1.5",
"@types/uuid": "^8.3.1",
"@vitest/coverage-v8": "^2.1.2",
"@vitest/ui": "^2.1.2",
Expand All @@ -71,7 +70,6 @@
"jsdom": "^25.0.0",
"prettier": "^3.3.3",
"prettier-eslint": "^15.0.1",
"ssri": "^11.0.0",
"ts-node": "^10.9.2",
"tsc": "^2.0.4",
"tsup": "^8.0.1",
Expand Down
Loading