Skip to content

Commit eda1eae

Browse files
committed
ignored author if none
1 parent 96122e2 commit eda1eae

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ List by
88
</div>
99

1010
### A
11-
- [a11y (Accessibility)](https://en.wikipedia.org/wiki/Web_accessibility): Development Practice by [N/A](N/A) ([1999](https://en.wikipedia.org/wiki/Web_accessibility))
11+
- [a11y (Accessibility)](https://en.wikipedia.org/wiki/Web_accessibility): Development Practice ([1999](https://en.wikipedia.org/wiki/Web_accessibility))
1212
- [Ajax](https://en.wikipedia.org/wiki/Ajax_(programming)): Technology by [Jesse James Garrett ](https://designftw.mit.edu/lectures/apis/ajax_adaptive_path.pdf) ([1999](https://en.wikipedia.org/wiki/Ajax_(programming)))
1313
- [AlertifyJS](https://alertifyjs.com/): UI Library by [Vitaliy Potapov](https://alertifyjs.com/) ([2015](https://www.npmjs.com/package/alertifyjs?activeTab=versions))
1414
- [Angular Universal](https://angular.io/guide/universal): Technology by [Google](https://www.google.com/) ([2017](https://www.npmjs.com/package/@nguniversal/express-engine?activeTab=versions))
@@ -72,6 +72,7 @@ List by
7272
- [Font Awesome](https://fontawesome.com): Icon Library by [Fonticons, Inc.](https://fontawesome.com/versions) ([2012](https://fontawesome.com/versions))
7373
- [Formik](https://formik.org/): UI Library by [Jared Palmer](https://www.npmjs.com/package/formik?activeTab=versions) ([2017](https://www.npmjs.com/package/formik?activeTab=versions))
7474
- [Foundation](https://get.foundation): UI Components Library by [ZURB](https://github.com/foundation/foundation-sites/tags?after=v2.2) ([2011](https://github.com/foundation/foundation-sites/tags?after=v2.2))
75+
- [Framer Motion](https://www.framer.com/motion/): Library ([2019](https://github.com/framer/motion/tags?after=v0.0.8))
7576

7677
### G
7778
- [Gatsby](https://www.gatsbyjs.com): Framework by [Kyle Mathews and the Gatsby team](https://en.wikipedia.org/wiki/Gatsby_(JavaScript_framework)) ([2015](https://en.wikipedia.org/wiki/Gatsby_(JavaScript_framework)))
@@ -81,6 +82,7 @@ List by
8182
- [GitLab](https://docs.gitlab.com): Version Control System by [GitLab, Inc.](https://about.gitlab.com/company/history/) ([2011](https://about.gitlab.com/company/history/))
8283
- [Glide.js](https://glidejs.com/): UI Library by [Jedrzej Kurylo](https://www.npmjs.com/package/@glidejs/glide?activeTab=versions) ([2014](https://www.npmjs.com/package/@glidejs/glide?activeTab=versions))
8384
- [GraphQL](https://graphql.org): Specification by [Facebook, Inc.](https://github.com/graphql/graphql-spec/releases/tag/July2015) ([2015](https://github.com/graphql/graphql-spec/releases/tag/July2015))
85+
- [Greensock Animation Platform (GSAP)](https://greensock.com/gsap/): Library ([2013](https://github.com/greensock/GSAP/tags?after=1.9.2))
8486
- [Grunt](https://gruntjs.com/): Build Tool by [Ben Alman and contributors](https://en.wikipedia.org/wiki/Grunt_(software)) ([2016](https://en.wikipedia.org/wiki/Grunt_(software)))
8587
- [Gulp](https://gulpjs.com): Build Tool by [Fractal, Inc. and the open-source community](https://en.wikipedia.org/wiki/Gulp.js) ([2013](https://en.wikipedia.org/wiki/Gulp.js))
8688

@@ -126,6 +128,7 @@ List by
126128
- [Meteor.js](https://www.meteor.com): Framework by [Meteor Development Group](https://www.meteor.com/) ([2012](https://www.npmjs.com/package/meteor?activeTab=versions))
127129
- [Mirage JS](https://miragejs.com/): Mocking Library by [Mirage JS Team](https://miragejs.com/about) ([2019](https://www.npmjs.com/package/miragejs?activeTab=versions))
128130
- [Mocha](https://mochajs.org): Testing Library by [Mocha Team](https://github.com/mochajs) ([2011](https://www.npmjs.com/package/mocha?activeTab=versions))
131+
- [Modernizr](https://modernizr.com): Utility Library ([2009](https://modernizr.com/news/modernizr-goes-1-0/))
129132
- [Moment.js](https://momentjs.com): Date & Time Library by [Moment.js Team](https://github.com/moment) ([2011](https://www.npmjs.com/package/moment?activeTab=versions))
130133
- [MVP.css](https://andybrewer.github.io/mvp/): CSS Framework by [Andy Brewer](https://github.com/andybrewer) ([2020](https://github.com/andybrewer/mvp/releases))
131134

@@ -177,6 +180,7 @@ List by
177180
- [Redux](https://redux.js.org): State Management Library by [Dan Abramov](https://overreacted.io/) ([2011](https://www.npmjs.com/package/redux?activeTab=versions))
178181
- [RefluxJS](https://github.com/reflux/refluxjs): State Management Library by [Reflux Team](https://github.com/reflux) ([2014](https://www.npmjs.com/package/reflux?activeTab=versions), Last release was in 2017.)
179182
- [Relay](https://relay.dev): Library by [Facebook](https://about.fb.com/) ([2016](https://github.com/facebook/relay/releases/tag/v0.1.0))
183+
- [Remeda](https://remedajs.com/): Utility Library ([2018](https://www.npmjs.com/package/remeda?activeTab=versions))
180184
- [Remix](https://remix.run/): Framework by [Remix Team](https://remix.run/about) ([2021](https://www.npmjs.com/package/@remix-run/react?activeTab=versions))
181185
- [Render](https://render.com/): Deployment & Hosting by [Render Team](https://render.com/about) ([2019](https://render.com/about))
182186
- [REST](https://en.wikipedia.org/wiki/Representational_state_transfer): Specification by [Roy Fielding](https://www.ics.uci.edu/~fielding/) ([2000](https://web.archive.org/web/20210512181107/https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm))

scripts/data.json

-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@
100100
"url": "https://en.wikipedia.org/wiki/Web_accessibility",
101101
"type": "Development Practice",
102102
"year_created": 1999,
103-
"author": "N/A",
104-
"author_url": "N/A",
105103
"year_created_source": "https://en.wikipedia.org/wiki/Web_accessibility"
106104
},
107105
{

scripts/generate.js

+18-12
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ function getAdditionalInfo(term) {
2020
return dateInfo;
2121
}
2222

23-
2423
function getAuthorInfo(term) {
25-
let authorName = term?.author || ''
26-
let authorUrl = term.author_url || ''
27-
28-
return `[${authorName}](${authorUrl})`
24+
let authorName = term?.author;
25+
let authorUrl = term.author_url;
2926

27+
if (authorName === undefined) {
28+
return null;
29+
}
30+
return `[${authorName}](${authorUrl})`;
3031
}
3132

3233
const subHeading = `<div align="center">
@@ -96,11 +97,15 @@ for (const key in data) {
9697
? term.type.join(', ')
9798
: term.type;
9899
let dateInfo = getAdditionalInfo(term);
99-
let authorInfo = getAuthorInfo(term)
100-
return `- ${nameWithLink}${types
101-
? `: ${types} ${authorInfo ? `by ${authorInfo}` : ``} ${dateInfo ? ` ${dateInfo}` : ''}`
102-
: ''
103-
}`;
100+
let authorInfo = getAuthorInfo(term);
101+
console.log(JSON.stringify(term.name),authorInfo)
102+
return `- ${nameWithLink}${
103+
types
104+
? `: ${types} ${
105+
(authorInfo!==null) ? `by ${authorInfo}` : ``
106+
} ${dateInfo ? ` ${dateInfo}` : ''}`
107+
: ''
108+
}`;
104109
})
105110
// sort by name case-insensitive
106111
.sort((a, b) =>
@@ -175,8 +180,9 @@ for (const key in data) {
175180
? `[${term.name}](${term.url})`
176181
: term.name;
177182

178-
let entry = `- ${nameWithLink}: ${types}${dateInfo ? ` ${dateInfo}` : ''
179-
}`;
183+
let entry = `- ${nameWithLink}: ${types}${
184+
dateInfo ? ` ${dateInfo}` : ''
185+
}`;
180186

181187
if (!chronological[yearCreated])
182188
chronological[yearCreated] = [];

0 commit comments

Comments
 (0)