Skip to content

Commit

Permalink
Add new github data
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-hebler committed Sep 26, 2020
1 parent 98fe53e commit 113febf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const mappedCopies = [

const mappedGithubData = {
in:
'https://s3.amazonaws.com/cdn.texastribune.org/design-system/class-usage.json',
'https://s3.amazonaws.com/cdn.texastribune.org/design-system/class-usage-new.json',
out: './docs/dist/data/github.json',
};

Expand Down
22 changes: 12 additions & 10 deletions docs/config/tasks/style-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@ import {
// eslint-disable-next-line import/extensions
} from './types';

const fs = require('fs-extra');
const kss = require('kss');
const ora = require('ora');
const {
passesWcagAaLargeText,
passesWcagAa,
passesWcagAaa,
} = require('passes-wcag');
const {
import {
generateName,
generateClassName,
generateTemplate,
Expand All @@ -34,7 +26,17 @@ const {
getDetails,
convertArrayToObject,
buildTokenArr,
} = require('./utils');
} from './utils';

const fs = require('fs-extra');
const kss = require('kss');
const ora = require('ora');
const {
passesWcagAaLargeText,
passesWcagAa,
passesWcagAaa,
} = require('passes-wcag');


const GITHUB_URL = 'https://github.com/texastribune/queso-ui/blob/main';

Expand Down
4 changes: 2 additions & 2 deletions docs/config/tasks/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const readUsageInfo = async () => {

const findUsageInfo = (usageInfo, className) => {
const data =
typeof usageInfo.classData[className] !== 'undefined'
? usageInfo.classData[className].searchDataArr
typeof usageInfo.results[className] !== 'undefined'
? usageInfo.results[className]
: [];
return {
className,
Expand Down
4 changes: 2 additions & 2 deletions docs/src/macros/data-list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<table class="table is-striped is-bordered is-fullwidth">
<tr><th>Repo</th><th>Count</th><th>Location(s)</th></tr>
{% for repo in githubData %}
{% if repo.totalCount > 0 %}
{% if repo.total_count > 0 %}
<tr>
<td>{{ repo.repo }}</td>
<td><strong>{{ repo.totalCount }}</strong></td>
<td><strong>{{ repo.total_count }}</strong></td>
<td><details class="dropdown q-dropdown">
<summary>
<span class="button is-info is-outlined is-small">List</strong></span>
Expand Down

0 comments on commit 113febf

Please sign in to comment.