-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add alaska.md to processed doc files #170
- Loading branch information
1 parent
e35a773
commit b6d2a6d
Showing
3 changed files
with
154 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Alaska | ||
|
||
The `auro-alaska` custom element is more than just an easy-to-use placement of the official logo, but it also comes with automation that will produce the proper version of the logo depending on the size of the parent container. | ||
|
||
## Install | ||
|
||
```bash | ||
import "@alaskaairux/auro-icon/dist/auro-alaska"; | ||
``` | ||
|
||
## Default component | ||
|
||
<div class="exampleWrapper"> | ||
<auro-alaska style="width: 192px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska style="width: 192px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> | ||
|
||
<div class="exampleWrapper--ondark"> | ||
<auro-alaska onDark style="width: 192px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska onDark style="width: 192px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> | ||
|
||
## Official logo with tagline | ||
|
||
Using the `official` property will display the Alaska Airlines logo with the official tagline. | ||
|
||
<div class="exampleWrapper"> | ||
<auro-alaska official style="width: 192px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska official style="width: 192px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> | ||
|
||
<div class="exampleWrapper--ondark"> | ||
<auro-alaska official ondark style="width: 192px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska official ondark style="width: 192px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> | ||
|
||
## Auto scale support | ||
|
||
The Alaska Airline logo has a preferred version of the logo depending in the size of the rendering. The auro-alaska custom element is auto-aware and will display the proper version of the logo depending on the size of the container automatically. | ||
|
||
<div class="exampleWrapper"> | ||
<auro-alaska style="width: 72px"></auro-alaska><br> | ||
<auro-alaska style="width: 108px"></auro-alaska><br> | ||
<auro-alaska style="width: 192px"></auro-alaska><br> | ||
<auro-alaska style="width: 528px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska style="width: 72px"></auro-alaska> | ||
<auro-alaska style="width: 108px"></auro-alaska> | ||
<auro-alaska style="width: 192px"></auro-alaska> | ||
<auro-alaska style="width: 528px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> | ||
|
||
<div class="exampleWrapper"> | ||
<auro-alaska official style="width: 72px"></auro-alaska><br> | ||
<auro-alaska official style="width: 108px"></auro-alaska><br> | ||
<auro-alaska official style="width: 192px"></auro-alaska><br> | ||
<auro-alaska official style="width: 528px"></auro-alaska> | ||
</div> | ||
|
||
<auro-accordion alignRight> | ||
<span slot="trigger">See code</span> | ||
|
||
```html | ||
<auro-alaska official style="width: 72px"></auro-alaska> | ||
<auro-alaska official style="width: 108px"></auro-alaska> | ||
<auro-alaska official style="width: 192px"></auro-alaska> | ||
<auro-alaska official style="width: 528px"></auro-alaska> | ||
``` | ||
|
||
</auro-accordion> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { fileConfigs as defaultFileConfigs, defaultDocsProcessorConfig } from "@aurodesignsystem/auro-library/scripts/build/processors/defaultDocsProcessor.mjs"; | ||
import { Logger } from "@aurodesignsystem/auro-library/scripts/utils/logger.mjs"; | ||
import { | ||
fromAuroComponentRoot, | ||
processContentForFile, | ||
templateFiller | ||
} from "@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils.mjs"; | ||
|
||
/** | ||
* @param {ProcessorConfig} config - The configuration for this processor. | ||
* @returns {import('@aurodesignsystem/auro-library/scripts/utils/sharedFileProcessorUtils').FileProcessorConfig[]} | ||
*/ | ||
export const fileConfigs = (config) => [ | ||
...defaultFileConfigs(config), | ||
{ | ||
identifier: 'alaska.md', | ||
input: fromAuroComponentRoot(`docs/partials/alaska.md`), | ||
output: fromAuroComponentRoot(`demo/alaska.md`) | ||
} | ||
]; | ||
|
||
/** | ||
* | ||
* @param {ProcessorConfig} config - The configuration for this processor. | ||
* @return {Promise<void>} | ||
*/ | ||
export async function processDocFiles(config = defaultDocsProcessorConfig) { | ||
// setup | ||
await templateFiller.extractNames(); | ||
|
||
for (const fileConfig of fileConfigs(config)) { | ||
try { | ||
// eslint-disable-next-line no-await-in-loop | ||
await processContentForFile(fileConfig); | ||
} catch (err) { | ||
Logger.error(`Error processing ${fileConfig.identifier}: ${err.message}`); | ||
} | ||
} | ||
} | ||
|
||
processDocFiles().catch(err => { | ||
Logger.error(`Failed to process docs: ${err}`); | ||
}); | ||
|