Files
ionic-framework/core/scripts/api-spec-generator.js
renovate[bot] ea8a5974fa chore(deps): update dependency @stencil/core to v4.18.0 (#29487)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@stencil/core](https://stenciljs.com/)
([source](https://togithub.com/ionic-team/stencil)) | [`4.17.2` ->
`4.18.0`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.17.2/4.18.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.17.2/4.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.17.2/4.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ionic-team/stencil (@&#8203;stencil/core)</summary>

###
[`v4.18.0`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4180-2024-05-06)

[Compare
Source](https://togithub.com/ionic-team/stencil/compare/v4.17.2...v4.18.0)

##### Bug Fixes

- **hydrate:** output track elements as void elms
([#&#8203;5720](https://togithub.com/ionic-team/stencil/issues/5720))
([2082351](20823518ec)),
closes
[#&#8203;2994](https://togithub.com/ionic-team/stencil/issues/2994)
- **runtime:** add root scope id to the nested child as classname
([#&#8203;5704](https://togithub.com/ionic-team/stencil/issues/5704))
([b40ebb9](b40ebb9378)),
closes
[#&#8203;5702](https://togithub.com/ionic-team/stencil/issues/5702)
- **testing:** support functional components in unit tests
([#&#8203;5722](https://togithub.com/ionic-team/stencil/issues/5722))
([922a972](922a97207d)),
closes
[#&#8203;4063](https://togithub.com/ionic-team/stencil/issues/4063)

##### Features

- **docs:** add style mode to `docs-json` output
([#&#8203;5718](https://togithub.com/ionic-team/stencil/issues/5718))
([44fcba1](44fcba1a6c))

#### 🏊
[4.17.2](https://togithub.com/ionic-team/stencil/compare/v4.17.1...v4.17.2)
(2024-04-29)

##### Bug Fixes

- **build:** address
[@&#8203;ionic/angular](https://togithub.com/ionic/angular) bundle size
issue
([#&#8203;5705](https://togithub.com/ionic-team/stencil/issues/5705))
([0a7becc](0a7beccb0a))
- **compiler:** recognize loud comments when generating style docs
([#&#8203;5706](https://togithub.com/ionic-team/stencil/issues/5706))
([a325f5c](a325f5cd3f)),
closes
[#&#8203;5623](https://togithub.com/ionic-team/stencil/issues/5623)

#### 🚒
[4.17.1](https://togithub.com/ionic-team/stencil/compare/v4.17.0...v4.17.1)
(2024-04-23)

##### Bug Fixes

- **cli:** prevent generate task from crashing
([#&#8203;5693](https://togithub.com/ionic-team/stencil/issues/5693))
([9efbf4b](9efbf4bffa)),
closes
[#&#8203;5692](https://togithub.com/ionic-team/stencil/issues/5692)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ryan Waskiewicz <ryanwaskiewicz@gmail.com>
2024-05-15 20:29:25 +00:00

44 lines
1.2 KiB
JavaScript

const fs = require('fs');
function apiSpecGenerator(opts) {
return {
type: 'docs-custom',
generator: (docsData) => {
const content = [];
docsData.components.forEach(cmp => generateComponent(cmp, content));
const contentStr = content.join('\n');
return new Promise(resolve => {
fs.writeFile(opts.file, contentStr, () => {
resolve();
});
});
}
};
}
function generateComponent(component, content) {
content.push('');
content.push(`${component.tag},${component.encapsulation}`);
component.props.forEach(prop => {
content.push(`${component.tag},prop,${prop.name},${prop.type},${prop.default},${prop.required},${prop.reflectToAttr}`);
});
component.methods.forEach(prop => {
content.push(`${component.tag},method,${prop.name},${prop.signature}`);
});
component.events.forEach(prop => {
content.push(`${component.tag},event,${prop.event},${prop.detail},${prop.bubbles}`);
});
component.styles.forEach(prop => {
content.push(`${component.tag},css-prop,${prop.name}${prop.mode ? ',' + prop.mode : ''}`);
});
component.parts.forEach(part => {
content.push(`${component.tag},part,${part.name}`);
});
}
exports.apiSpecGenerator = apiSpecGenerator;