Skip to content

Commit 140570f

Browse files
authored
Merge pull request #57 from contentstack/feature/json-rte
🎉 Json RTE support added
2 parents 782e50c + 990edb8 commit 140570f

File tree

8 files changed

+339
-2087
lines changed

8 files changed

+339
-2087
lines changed

.talismanrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fileignoreconfig:
2+
- filename: package-lock.json
3+
checksum: b89941bdbdeb07c213733fef4d934e35478c5a1c6e33f2ec150e515a012b8d2d
4+
- filename: dist/nativescript/contentstack.js
5+
checksum: ad3c75c5c18f8b396d7338f24024c6a4fb0839fa7b471bf89b5ee6d4d07284fe
6+
- filename: dist/react-native/contentstack.js
7+
checksum: b0d9db0acc9bb46c67d104e7b28ae7429d775487efb38e5f5d25a2de9731a8f8
8+
- filename: dist/node/contentstack.js
9+
checksum: 50b0f7d9c93c53fa5df3adadae94de74089fdbd7012778b371573a2d154a8277
10+
- filename: dist/web/contentstack.js
11+
checksum: a9d2ee09e3409142f238901afc3efc7f731628a8c239c366360c59690de2e309

dist/nativescript/contentstack.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-native/contentstack.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web/contentstack.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export class Utils {
1111
paths?: string[]
1212
}): void;
1313
static renderContent(content: (string | string[]), option: Option): (string| string[]);
14+
static jsonToHTML(option: {
15+
entry: EntryEmbedable| EntryEmbedable[],
16+
paths: string[],
17+
renderOption?: RenderOption,
18+
}): void;
1419
}
1520

1621
//Enum for Contentstack Region

package-lock.json

Lines changed: 306 additions & 2074 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"tmp": "tmp/contentstack-3.13.2.tgz_1477830884275_0.9869455888401717"
6565
},
6666
"devDependencies": {
67-
"@types/jest": "^26.0.13",
67+
"@types/jest": "^26.0.24",
6868
"babel-core": "6.26.0",
6969
"babel-loader": "7.1.2",
7070
"babel-plugin-transform-runtime": "6.23.0",
@@ -79,26 +79,26 @@
7979
"http-proxy-agent": "^3.0.0",
8080
"istanbul": "^0.4.5",
8181
"jest": "^26.4.2",
82-
"jest-html-reporters": "^2.0.3",
82+
"jest-html-reporters": "^2.1.6",
8383
"jsdoc": "^3.6.7",
84-
"jshint": "^2.12.0",
85-
"nodemailer": "^6.6.1",
84+
"jshint": "^2.13.0",
85+
"nodemailer": "^6.6.3",
8686
"request": "^2.88.2",
8787
"string-replace-loader": "1.3.0",
8888
"string-replace-webpack-plugin": "0.1.3",
8989
"tap-html": "^1.0.1",
9090
"tap-json": "1.0.0",
9191
"tape": "4.8.0",
92-
"ts-jest": "^26.3.0",
93-
"typescript": "^4.0.2",
92+
"ts-jest": "^26.5.6",
93+
"typescript": "^4.3.5",
9494
"uglify-js": "2.8.29",
95-
"webpack": "^4.44.1",
95+
"webpack": "^5.44.0",
9696
"webpack-cli": "^3.3.12",
9797
"webpack-md5-hash": "0.0.5",
9898
"webpack-merge": "4.1.0"
9999
},
100100
"dependencies": {
101-
"@contentstack/utils": "^1.0.1",
101+
"@contentstack/utils": "^1.0.2",
102102
"es6-promise": "4.1.1",
103103
"isomorphic-fetch": "^3.0.0",
104104
"localStorage": "1.0.3"

test/typescript/stack.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ describe('Stack tests', () => {
150150
const option = {entry: {field: string, uid: '', _embedded_items: { field: [{ uid:'',_content_type_uid: ''}]}}};
151151
utils.render(option);
152152
utils.renderContent(string, option);
153+
utils.jsonToHTML({
154+
...option,
155+
paths: []
156+
});
153157
expect(true).toBeTruthy();
154158
done();
155159
})

0 commit comments

Comments
 (0)