-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starter Kits #1253
Merged
Merged
Starter Kits #1253
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
80da9ad
docs(guides): start fetching starter-kits data
skipjack 709483c
docs(guides): add starter-kits route and component
skipjack 318aa62
fix(support): display fetch logs for support data
skipjack d2b6bb8
docs(guides): display tags better in starter-kits
skipjack 49cab5a
style(markdown): remove block quote icons and old icon code
skipjack dcc4760
style(markdown): increase padding in mobile table design
skipjack 3118684
docs(guides): add a warning to the starter-kits guide
skipjack 47cd332
refactor(starter-kits): include `key` prop for tags
skipjack 829c9e4
refactor(fetch): include missing semicolons
skipjack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,4 @@ | ||
.starter-kits { | ||
flex: 1 1 auto; | ||
padding: 1.5em; | ||
} |
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,58 @@ | ||
import React from 'react'; | ||
import Container from '../container/container'; | ||
import Link from '../link/link'; | ||
import Kits from './starter-kits-data.json'; | ||
import './starter-kits-style'; | ||
|
||
// NOTE: The table classes used in this component correspond to | ||
// those used in the markdown utility. Ideally we will soon create | ||
// a table component that both the markdown utility and this page | ||
// can use. This component could even use something like griddle | ||
// to allow sorting and such. | ||
|
||
export default props => ( | ||
<Container className="starter-kits page__content"> | ||
<h1>Starter Kits</h1> | ||
|
||
<p> | ||
The following table contains a curated list of starter kits that can | ||
be used as a jumping off point for webpack-based projects. To add a new | ||
kit to the list please visit | ||
<Link to="https://github.com/ahfarmer/tool-list">this repository</Link> | ||
and submit a PR against this file: | ||
<code>generator/starterProjectUrls.js</code>. | ||
</p> | ||
|
||
<div className="table"> | ||
<div className="table-wrap"> | ||
<div className="table-header"> | ||
<div className="table-tr"> | ||
<div className="table-th">Project Name</div> | ||
<div className="table-th">Maintainer</div> | ||
<div className="table-th">Tags</div> | ||
</div> | ||
</div> | ||
<div className="table-body"> | ||
{ Kits.map((kit, i) => ( | ||
<div className="table-tr" key={ i }> | ||
<div className="table-td"> | ||
<div className="table-td-title">Project Name</div> | ||
<div className="table-td-content"> | ||
<Link to={ kit.githubUrl }>{ kit.githubRepoName }</Link> | ||
</div> | ||
</div> | ||
<div className="table-td"> | ||
<div className="table-td-title">Maintainer</div> | ||
<div className="table-td-content">{ kit.githubUserName }</div> | ||
</div> | ||
<div className="table-td"> | ||
<div className="table-td-title">Tags</div> | ||
<div className="table-td-content">{ kit.tags.join(' | ') }</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's ok. Maybe better as separate elements with some nice class, though? |
||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
</Container> | ||
); |
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
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,13 @@ | ||
#!/usr/bin/env node | ||
const fs = require('fs'); | ||
const toolList = require('tool-list'); | ||
|
||
const data = toolList.startersWithTag('webpack'); | ||
const body = JSON.stringify(data); | ||
|
||
fs.writeFile('./components/starter-kits/starter-kits-data.json', body, err => { | ||
if (err) { | ||
console.error('Failed to write starter kits file: ', err); | ||
|
||
} else console.log('Fetched 1 file: starter-kits-data.json') | ||
}); |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want something super light, it's enough to attach a little standalone script (these exist for sure) that hooks into the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really like to hold off on anything table related until we get a better markdown solution in place. I think the best option by far is to pipe all markdown to components that contain clean, isolated logic. It just feels like we've added a lot of features at this point, many of them in a hacky way which have come back to bite us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.