From 80da9adc07555432e4347a46ce497fee387c8271 Mon Sep 17 00:00:00 2001
From: Greg Venech
Date: Sat, 27 May 2017 10:58:05 -0400
Subject: [PATCH 1/9] docs(guides): start fetching starter-kits data
---
.gitignore | 1 +
package.json | 1 +
scripts/fetch.sh | 3 +++
scripts/fetch_starter_kits.js | 13 +++++++++++++
4 files changed, 18 insertions(+)
create mode 100755 scripts/fetch_starter_kits.js
diff --git a/.gitignore b/.gitignore
index 98c6aa66bf3c..ee93ba0570cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ build
generated
components/support/support-backers.json
components/support/support-sponsors.json
+components/starter-kits/starter-kits-data.json
.antwar
diff --git a/package.json b/package.json
index 6043f0922d3a..7809846b79ea 100644
--- a/package.json
+++ b/package.json
@@ -104,6 +104,7 @@
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-router": "^2.8.1",
+ "tool-list": "^0.9.1",
"whatwg-fetch": "^2.0.1"
}
}
diff --git a/scripts/fetch.sh b/scripts/fetch.sh
index 6d4488a2de43..5053f487e227 100755
--- a/scripts/fetch.sh
+++ b/scripts/fetch.sh
@@ -18,3 +18,6 @@ cp -rf ./content/plugins/ ./generated/plugins
# Fetch sponsors and backers from opencollective
./scripts/fetch_supporters.js
+
+# Fetch starter kits
+./scripts/fetch_starter_kits.js
diff --git a/scripts/fetch_starter_kits.js b/scripts/fetch_starter_kits.js
new file mode 100755
index 000000000000..09eb12bd1875
--- /dev/null
+++ b/scripts/fetch_starter_kits.js
@@ -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')
+});
From 709483c45abaff9bd151159e6d4dc619eccb9546 Mon Sep 17 00:00:00 2001
From: Greg Venech
Date: Sat, 27 May 2017 10:58:41 -0400
Subject: [PATCH 2/9] docs(guides): add starter-kits route and component
---
antwar.config.js | 7 +++
.../starter-kits/starter-kits-style.scss | 4 ++
components/starter-kits/starter-kits.jsx | 58 +++++++++++++++++++
3 files changed, 69 insertions(+)
create mode 100644 components/starter-kits/starter-kits-style.scss
create mode 100644 components/starter-kits/starter-kits.jsx
diff --git a/antwar.config.js b/antwar.config.js
index fea1a65d0412..7e4ca6f3785c 100644
--- a/antwar.config.js
+++ b/antwar.config.js
@@ -73,6 +73,13 @@ module.exports = {
}
),
+ 'guides/starter-kits': {
+ title: 'Starter Kits',
+ path() {
+ return require('./components/starter-kits/starter-kits.jsx').default;
+ }
+ },
+
development: section(
'Development',
function() {
diff --git a/components/starter-kits/starter-kits-style.scss b/components/starter-kits/starter-kits-style.scss
new file mode 100644
index 000000000000..f291d8b7a826
--- /dev/null
+++ b/components/starter-kits/starter-kits-style.scss
@@ -0,0 +1,4 @@
+.starter-kits {
+ flex: 1 1 auto;
+ padding: 1.5em;
+}
diff --git a/components/starter-kits/starter-kits.jsx b/components/starter-kits/starter-kits.jsx
new file mode 100644
index 000000000000..5f9cda73b294
--- /dev/null
+++ b/components/starter-kits/starter-kits.jsx
@@ -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 => (
+
+
Starter Kits
+
+
+ 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
+ this repository
+ and submit a PR against this file:
+ generator/starterProjectUrls.js.
+
))}
From 49cab5a7931422f64a844f59dd2a7648bd346502 Mon Sep 17 00:00:00 2001
From: Greg Venech
Date: Sat, 27 May 2017 11:41:10 -0400
Subject: [PATCH 5/9] style(markdown): remove block quote icons and old icon
code
These looked pretty rough, and I've heard some people who were
confused whether the icon was part of the content. If anything we
should use more prominent, nice icons like the ones @pastelsky
showed in his mockups.
---
styles/markdown.scss | 13 ++++---------
utilities/markdown.js | 15 ---------------
2 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/styles/markdown.scss b/styles/markdown.scss
index 50738e7e7ff1..28a9ef1ec480 100644
--- a/styles/markdown.scss
+++ b/styles/markdown.scss
@@ -102,24 +102,19 @@
&.tip {
background-color: #DCF2FD;
color: #618ca0;
- .tip-content::before {
- content: 'ℹ';
- font-style: normal;
- }
}
+
&.warning {
background-color: #fbedb7;
color: #8c8466;
- .tip-content::before {
- content: '⚠';
- font-style: normal;
- }
}
+
&.todo {
background-color: #fbddcd;
color: #907a6e;
+
.tip-content::before {
- content: '[TODO]';
+ content: '[TODO]: ';
font-style: normal;
}
}
diff --git a/utilities/markdown.js b/utilities/markdown.js
index 5606cb5d1fde..39c75d7fcea5 100644
--- a/utilities/markdown.js
+++ b/utilities/markdown.js
@@ -299,21 +299,6 @@ function parseCustomQuote(token, match, className) {
var text = token.text;
if (text.indexOf(match) === 0) {
- // var icon;
-
- // TODO: Update icons and styling
- // switch(className) {
- // case 'tip':
- // icon = 'icon-info';
- // break;
- // case 'warning':
- // icon = 'icon-warning';
- // break;
- // default:
- // icon = 'icon-chevron-right';
- // break;
- // }
-
return {
type: 'html',
text: (
From dcc476044317f45e390eec4e1d6c4460a0295657 Mon Sep 17 00:00:00 2001
From: Greg Venech
Date: Sat, 27 May 2017 11:41:48 -0400
Subject: [PATCH 6/9] style(markdown): increase padding in mobile table design
---
styles/markdown.scss | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/styles/markdown.scss b/styles/markdown.scss
index 28a9ef1ec480..f16af08c2615 100644
--- a/styles/markdown.scss
+++ b/styles/markdown.scss
@@ -140,13 +140,14 @@
&-tr {
background-color: white;
margin: 0;
- padding: 0;
+ padding: 0.25em 0;
display: block;
border: 1px solid #cccccc;
border-bottom: none;
@include break {
border: none;
+ padding: 0;
display: table-row;
}
From 31186843049cf4b7c70e9119efa6a50ac202ea96 Mon Sep 17 00:00:00 2001
From: Greg Venech
Date: Sat, 27 May 2017 11:42:36 -0400
Subject: [PATCH 7/9] docs(guides): add a warning to the starter-kits guide
---
components/starter-kits/starter-kits.jsx | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/components/starter-kits/starter-kits.jsx b/components/starter-kits/starter-kits.jsx
index e2c740202e65..ad22f0343d3d 100644
--- a/components/starter-kits/starter-kits.jsx
+++ b/components/starter-kits/starter-kits.jsx
@@ -23,6 +23,16 @@ export default props => (
generator/starterProjectUrls.js.
+
+
+ Boilerplates should be used as Proof of Concepts to help you learn
+ different webpack techniques for various frameworks. Make sure you understand
+ what's going on in them and avoid copy and paste coding. Also note that none
+ of these are officially supported by webpack. If you run into an issue, please
+ report that to the maintainer(s) of the repository.
+