Skip to content

Commit 0a327ab

Browse files
committed
adding native script to generate task
1 parent dda5830 commit 0a327ab

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"deploy": "docusaurus deploy",
1313
"serve": "docusaurus serve",
1414
"clear": "docusaurus clear",
15-
"generate-markdown": "concurrently \"node scripts/api\" \"node scripts/cli\""
15+
"generate-markdown": "concurrently \"node scripts/api\" \"node scripts/cli\" \"node scripts/native\""
1616
},
1717
"dependencies": {
1818
"@docusaurus/core": "2.0.0-beta.0",
@@ -28,8 +28,8 @@
2828
"prettier": "^2.2.1",
2929
"react": "^16.8.4",
3030
"react-dom": "^16.8.4",
31-
"remark-html": "^13.0.1",
32-
"react-live": "^2.2.3"
31+
"react-live": "^2.2.3",
32+
"remark-html": "^13.0.1"
3333
},
3434
"browserslist": {
3535
"production": [

scripts/native.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ const utils = require('./utils.js');
1111
function writePage(page) {
1212
const data = [
1313
renderFrontmatter(page),
14+
renderImports(page),
1415
renderIntro(page),
15-
// renderUsage(page),
16+
renderSalesCTA(page),
1617
// renderProperties(page),
1718
// renderEvents(page),
1819
// renderMethods(page),
@@ -39,6 +40,12 @@ ${Object.entries(frontmatter)
3940
`;
4041
}
4142

43+
function renderImports({}) {
44+
return `
45+
import DocsCard from '@site/src/components/DocsCard';
46+
`;
47+
}
48+
4249
function renderIntro({ description, displayName, repo }) {
4350
return `
4451
# ${displayName}
@@ -51,6 +58,20 @@ ${description}
5158
`;
5259
}
5360

61+
function renderSalesCTA({}) {
62+
return `
63+
<h2>Stuck on a Cordova issue?</h2>
64+
<DocsCard class="cordova-ee-card" header="Don't waste precious time on plugin issues." href="https://ionicframework.com/sales?product_of_interest=Ionic%20Native">
65+
<div>
66+
<img src="/docs/icons/native-cordova-bot.png" class="cordova-ee-img" />
67+
<p>If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.</p>
68+
<docs-button class="native-ee-detail">Contact Us Today!</docs-button>
69+
</div>
70+
</DocsCard>
71+
72+
`;
73+
}
74+
5475
// function renderUsage({ usage }) {
5576
// const keys = Object.keys(usage);
5677

src/css/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,14 @@ iframe {
280280
}
281281
.git-link path {
282282
fill: currentColor;
283+
}
284+
285+
.cordova-ee-img {
286+
width:50px;
287+
float:left;
288+
margin-right:20px;
289+
}
290+
291+
.cordova-ee-card {
292+
max-width:100%;
283293
}

0 commit comments

Comments
 (0)