mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 01:03:03 +08:00
![renovate[bot]](/assets/img/avatar_default.png)
[](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) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>ionic-team/stencil (@​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 ([#​5720](https://togithub.com/ionic-team/stencil/issues/5720)) ([2082351](20823518ec
)), closes [#​2994](https://togithub.com/ionic-team/stencil/issues/2994) - **runtime:** add root scope id to the nested child as classname ([#​5704](https://togithub.com/ionic-team/stencil/issues/5704)) ([b40ebb9](b40ebb9378
)), closes [#​5702](https://togithub.com/ionic-team/stencil/issues/5702) - **testing:** support functional components in unit tests ([#​5722](https://togithub.com/ionic-team/stencil/issues/5722)) ([922a972](922a97207d
)), closes [#​4063](https://togithub.com/ionic-team/stencil/issues/4063) ##### Features - **docs:** add style mode to `docs-json` output ([#​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 [@​ionic/angular](https://togithub.com/ionic/angular) bundle size issue ([#​5705](https://togithub.com/ionic-team/stencil/issues/5705)) ([0a7becc](0a7beccb0a
)) - **compiler:** recognize loud comments when generating style docs ([#​5706](https://togithub.com/ionic-team/stencil/issues/5706)) ([a325f5c](a325f5cd3f
)), closes [#​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 ([#​5693](https://togithub.com/ionic-team/stencil/issues/5693)) ([9efbf4b](9efbf4bffa
)), closes [#​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>
44 lines
1.2 KiB
JavaScript
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;
|