Skip to content

Commit 21c697f

Browse files
author
Ives van Hoorne
committed
Add examples and css versioning
1 parent 8482ab8 commit 21c697f

File tree

6 files changed

+185
-17
lines changed

6 files changed

+185
-17
lines changed

Gulpfile.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ const gulp = require('gulp');
22
const postcss = require('gulp-postcss');
33
const autoprefixer = require('autoprefixer');
44
const cssnano = require('cssnano');
5+
const rev = require('gulp-rev');
6+
const replace = require('gulp-replace');
57

68
const config = require('./config/paths');
79

810
gulp.task('css', function() {
911
return gulp
1012
.src('src/homepage/**/*.css')
1113
.pipe(postcss([autoprefixer, cssnano]))
14+
.pipe(rev())
15+
.pipe(gulp.dest(`${config.appBuild}/`))
16+
.pipe(rev.manifest())
1217
.pipe(gulp.dest(`${config.appBuild}/`));
1318
});
1419

@@ -19,8 +24,11 @@ gulp.task('javascript', function() {
1924
});
2025

2126
gulp.task('html', function() {
27+
const manifest = require(`${config.appBuild}/rev-manifest.json`);
28+
2229
return gulp
23-
.src('src/homepage/**/*.html')
30+
.src('src/homepage/index.html')
31+
.pipe(replace('static/css/main.css', manifest['static/css/main.css']))
2432
.pipe(gulp.dest(`${config.appBuild}/`));
2533
});
2634

@@ -30,4 +38,4 @@ gulp.task('static', function() {
3038
.pipe(gulp.dest(`${config.appBuild}/`));
3139
});
3240

33-
gulp.task('default', ['css', 'html', 'javascript', 'static']);
41+
gulp.task('default', ['css', 'javascript', 'static', 'html']);

config/webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ const config = {
236236
name: 'vendor',
237237
minChunks: Infinity,
238238
}),
239+
new webpack.optimize.CommonsChunkPlugin({
240+
async: true,
241+
children: true,
242+
minChunks: 4,
243+
}),
239244
new webpack.NamedModulesPlugin(),
240245
],
241246
};

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"filesize": "^3.5.6",
3939
"flow-bin": "0.43.0",
4040
"fs-extra": "^2.0.0",
41+
"gulp-replace": "^0.5.4",
4142
"gzip-size": "3.0.0",
4243
"html-loader": "^0.4.4",
4344
"html-webpack-plugin": "^2.24.1",
@@ -78,7 +79,9 @@
7879
"file-saver": "^1.3.3",
7980
"glamor": "^2.20.12",
8081
"gulp": "^3.9.1",
82+
"gulp-filter": "^5.0.0",
8183
"gulp-postcss": "^6.4.0",
84+
"gulp-rev": "^7.1.2",
8285
"humps": "CompuIves/humps",
8386
"jszip": "^3.1.3",
8487
"lodash": "^4.17.2",

src/homepage/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ <h3>Example Projects</h3>
153153
</div>
154154
</section>
155155

156+
<section id="picked" class="picked">
157+
<h3>Picked Projects</h3>
158+
<h4>Made something cool? Send it to <a href="mailto:[email protected]">[email protected]</a> so we can feature it here!</h4>
159+
160+
<div class="picked-project">
161+
<h4>Redux Form - Simple Example by @erikras</h4>
162+
<iframe src=https://codesandbox.io/embed/mZRjw05yp style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
163+
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
164+
</div>
165+
166+
<div class="picked-project">
167+
<h4>Glamorous themeing by @kentcdodds</h4>
168+
<iframe src=https://codesandbox.io/embed/o2yq9MkQk style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
169+
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
170+
</div>
171+
</section>
172+
156173
<section class="about">
157174
We'd love to hear your thoughts, feedback and suggestions. Contact us any time at <a href="mailto:[email protected]">[email protected]</a>!
158175
<br> By <a target="_blank" href="https://ivesvh.com">Ives van Hoorne</a> and <a target="_blank" href="https://www.linkedin.com/in/bas-buursma-b904a3139/">Bas Buursma</a>

src/homepage/static/css/main.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,36 @@ h1 {
219219
font-weight: 400;
220220
}
221221

222+
.picked {
223+
display: flex;
224+
align-items: center;
225+
flex-direction: column;
226+
text-align: center;
227+
justify-content: center;
228+
padding-bottom: 2rem;
229+
background-color: #272C2E;
230+
}
231+
232+
.picked-project {
233+
width: 100%;
234+
max-width: 1200px;
235+
margin-bottom: 2rem;
236+
}
237+
238+
.picked h3 {
239+
text-transform: uppercase;
240+
margin: 2rem;
241+
margin-bottom: 0;
242+
font-size: 2rem;
243+
font-weight: 400;
244+
}
245+
246+
.picked h4 {
247+
margin: 1rem;
248+
font-size: 1rem;
249+
font-weight: 400;
250+
}
251+
222252
.projects {
223253
display: flex;
224254
max-width: 900px;

yarn.lock

Lines changed: 120 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ babel-standalone@^6.21.1-0:
10661066
version "6.23.1"
10671067
resolved "https://registry.yarnpkg.com/babel-standalone/-/babel-standalone-6.23.1.tgz#904a6db801f6b485e693459e8adc6c3a00416e20"
10681068

1069-
babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1:
1069+
babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1, babel-template@^6.7.0:
10701070
version "6.24.1"
10711071
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333"
10721072
dependencies:
@@ -1076,7 +1076,7 @@ babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1:
10761076
babylon "^6.11.0"
10771077
lodash "^4.2.0"
10781078

1079-
babel-template@^6.23.0, babel-template@^6.3.0, babel-template@^6.7.0:
1079+
babel-template@^6.23.0, babel-template@^6.3.0:
10801080
version "6.23.0"
10811081
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638"
10821082
dependencies:
@@ -1186,6 +1186,10 @@ binary-extensions@^1.0.0:
11861186
version "1.8.0"
11871187
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"
11881188

1189+
binaryextensions@~1.0.0:
1190+
version "1.0.1"
1191+
resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-1.0.1.tgz#1e637488b35b58bda5f4774bf96a5212a8c90755"
1192+
11891193
block-stream@*:
11901194
version "0.0.9"
11911195
resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
@@ -2267,7 +2271,7 @@ escape-html@~1.0.3:
22672271
version "1.0.3"
22682272
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
22692273

2270-
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
2274+
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5:
22712275
version "1.0.5"
22722276
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
22732277

@@ -3055,6 +3059,14 @@ growly@^1.3.0:
30553059
version "1.3.0"
30563060
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
30573061

3062+
gulp-filter@^5.0.0:
3063+
version "5.0.0"
3064+
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.0.0.tgz#cfa81966fb67884f2ba754b067152929428d59bc"
3065+
dependencies:
3066+
gulp-util "^3.0.6"
3067+
multimatch "^2.0.0"
3068+
streamfilter "^1.0.5"
3069+
30583070
gulp-postcss@^6.4.0:
30593071
version "6.4.0"
30603072
resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-6.4.0.tgz#78a32e3c87aa6cdcec5ae1c905e196d478e8c5d5"
@@ -3064,7 +3076,28 @@ gulp-postcss@^6.4.0:
30643076
postcss-load-config "^1.2.0"
30653077
vinyl-sourcemaps-apply "^0.2.1"
30663078

3067-
gulp-util@^3.0.0, gulp-util@^3.0.8:
3079+
gulp-replace@^0.5.4:
3080+
version "0.5.4"
3081+
resolved "https://registry.yarnpkg.com/gulp-replace/-/gulp-replace-0.5.4.tgz#69a67914bbd13c562bff14f504a403796aa0daa9"
3082+
dependencies:
3083+
istextorbinary "1.0.2"
3084+
readable-stream "^2.0.1"
3085+
replacestream "^4.0.0"
3086+
3087+
gulp-rev@^7.1.2:
3088+
version "7.1.2"
3089+
resolved "https://registry.yarnpkg.com/gulp-rev/-/gulp-rev-7.1.2.tgz#5e17cc229f6b45c74256f88ad3f2d3e9a3305829"
3090+
dependencies:
3091+
gulp-util "^3.0.0"
3092+
modify-filename "^1.1.0"
3093+
object-assign "^4.0.1"
3094+
rev-hash "^1.0.0"
3095+
rev-path "^1.0.0"
3096+
sort-keys "^1.0.0"
3097+
through2 "^2.0.0"
3098+
vinyl-file "^1.1.0"
3099+
3100+
gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8:
30683101
version "3.0.8"
30693102
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
30703103
dependencies:
@@ -3761,6 +3794,13 @@ istanbul-reports@^1.0.0:
37613794
dependencies:
37623795
handlebars "^4.0.3"
37633796

3797+
3798+
version "1.0.2"
3799+
resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-1.0.2.tgz#ace19354d1a9a0173efeb1084ce0f87b0ad7decf"
3800+
dependencies:
3801+
binaryextensions "~1.0.0"
3802+
textextensions "~1.0.0"
3803+
37643804
jest-changed-files@^19.0.2:
37653805
version "19.0.2"
37663806
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824"
@@ -4506,6 +4546,10 @@ [email protected], "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd
45064546
dependencies:
45074547
minimist "0.0.8"
45084548

4549+
modify-filename@^1.0.0, modify-filename@^1.1.0:
4550+
version "1.1.0"
4551+
resolved "https://registry.yarnpkg.com/modify-filename/-/modify-filename-1.1.0.tgz#9a2dec83806fbb2d975f22beec859ca26b393aa1"
4552+
45094553
moment@^2.17.1:
45104554
version "2.17.1"
45114555
resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82"
@@ -4518,6 +4562,15 @@ [email protected]:
45184562
version "0.7.2"
45194563
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
45204564

4565+
multimatch@^2.0.0:
4566+
version "2.1.0"
4567+
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
4568+
dependencies:
4569+
array-differ "^1.0.0"
4570+
array-union "^1.0.1"
4571+
arrify "^1.0.0"
4572+
minimatch "^3.0.0"
4573+
45214574
multipipe@^0.1.2:
45224575
version "0.1.2"
45234576
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
@@ -5651,7 +5704,7 @@ [email protected], "readable-stream@>=1.0.33-1 <1.1.0-0":
56515704
isarray "0.0.1"
56525705
string_decoder "~0.10.x"
56535706

5654-
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.1.5, readable-stream@^2.2.2:
5707+
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.1.5, readable-stream@^2.2.2:
56555708
version "2.2.5"
56565709
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.5.tgz#a0b187304e05bab01a4ce2b4cc9c607d5aa1d606"
56575710
dependencies:
@@ -5663,16 +5716,7 @@ [email protected], "readable-stream@>=1.0.33-1 <1.1.0-0":
56635716
string_decoder "~0.10.x"
56645717
util-deprecate "~1.0.1"
56655718

5666-
readable-stream@~1.1.9:
5667-
version "1.1.14"
5668-
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
5669-
dependencies:
5670-
core-util-is "~1.0.0"
5671-
inherits "~2.0.1"
5672-
isarray "0.0.1"
5673-
string_decoder "~0.10.x"
5674-
5675-
readable-stream@~2.0.6:
5719+
readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.0.6:
56765720
version "2.0.6"
56775721
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
56785722
dependencies:
@@ -5683,6 +5727,15 @@ readable-stream@~2.0.6:
56835727
string_decoder "~0.10.x"
56845728
util-deprecate "~1.0.1"
56855729

5730+
readable-stream@~1.1.9:
5731+
version "1.1.14"
5732+
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
5733+
dependencies:
5734+
core-util-is "~1.0.0"
5735+
inherits "~2.0.1"
5736+
isarray "0.0.1"
5737+
string_decoder "~0.10.x"
5738+
56865739
readable-stream@~2.1.4:
56875740
version "2.1.5"
56885741
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
@@ -5844,6 +5897,14 @@ [email protected]:
58445897
version "0.0.1"
58455898
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
58465899

5900+
replacestream@^4.0.0:
5901+
version "4.0.2"
5902+
resolved "https://registry.yarnpkg.com/replacestream/-/replacestream-4.0.2.tgz#0c4140707e4f0323f50de044851708cf58bc37bd"
5903+
dependencies:
5904+
escape-string-regexp "^1.0.3"
5905+
object-assign "^4.0.1"
5906+
readable-stream "^2.0.2"
5907+
58475908
request@^2.79.0:
58485909
version "2.81.0"
58495910
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
@@ -5938,6 +5999,16 @@ ret@~0.1.10:
59385999
version "0.1.14"
59396000
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.14.tgz#58c636837b12e161f8a380cf081c6a230fd1664e"
59406001

6002+
rev-hash@^1.0.0:
6003+
version "1.0.0"
6004+
resolved "https://registry.yarnpkg.com/rev-hash/-/rev-hash-1.0.0.tgz#96993959ea9bfb1c59b13adf02ac2e34bb373603"
6005+
6006+
rev-path@^1.0.0:
6007+
version "1.0.0"
6008+
resolved "https://registry.yarnpkg.com/rev-path/-/rev-path-1.0.0.tgz#d4ccb436ac3370c4607175ce88eafc5c65c5d653"
6009+
dependencies:
6010+
modify-filename "^1.0.0"
6011+
59416012
right-align@^0.1.1:
59426013
version "0.1.3"
59436014
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
@@ -6255,6 +6326,12 @@ stream-http@^2.3.1:
62556326
to-arraybuffer "^1.0.0"
62566327
xtend "^4.0.0"
62576328

6329+
streamfilter@^1.0.5:
6330+
version "1.0.5"
6331+
resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.5.tgz#87507111beb8e298451717b511cfed8f002abf53"
6332+
dependencies:
6333+
readable-stream "^2.0.2"
6334+
62586335
strict-uri-encode@^1.0.0:
62596336
version "1.1.0"
62606337
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
@@ -6294,6 +6371,13 @@ [email protected], strip-ansi@^3.0.0, strip-ansi@^3.0.1:
62946371
dependencies:
62956372
ansi-regex "^2.0.0"
62966373

6374+
strip-bom-stream@^1.0.0:
6375+
version "1.0.0"
6376+
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
6377+
dependencies:
6378+
first-chunk-stream "^1.0.0"
6379+
strip-bom "^2.0.0"
6380+
62976381
[email protected], strip-bom@^3.0.0:
62986382
version "3.0.0"
62996383
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
@@ -6428,6 +6512,10 @@ text-table@~0.2.0:
64286512
version "0.2.0"
64296513
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
64306514

6515+
textextensions@~1.0.0:
6516+
version "1.0.2"
6517+
resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-1.0.2.tgz#65486393ee1f2bb039a60cbba05b0b68bd9501d2"
6518+
64316519
throat@^3.0.0:
64326520
version "3.0.0"
64336521
resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6"
@@ -6690,6 +6778,15 @@ [email protected]:
66906778
dependencies:
66916779
extsprintf "1.0.2"
66926780

6781+
vinyl-file@^1.1.0:
6782+
version "1.3.0"
6783+
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-1.3.0.tgz#aa05634d3a867ba91447bedbb34afcb26f44f6e7"
6784+
dependencies:
6785+
graceful-fs "^4.1.2"
6786+
strip-bom "^2.0.0"
6787+
strip-bom-stream "^1.0.0"
6788+
vinyl "^1.1.0"
6789+
66936790
vinyl-fs@^0.3.0:
66946791
version "0.3.14"
66956792
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
@@ -6724,6 +6821,14 @@ vinyl@^0.5.0:
67246821
clone-stats "^0.0.1"
67256822
replace-ext "0.0.1"
67266823

6824+
vinyl@^1.1.0:
6825+
version "1.2.0"
6826+
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
6827+
dependencies:
6828+
clone "^1.0.0"
6829+
clone-stats "^0.0.1"
6830+
replace-ext "0.0.1"
6831+
67276832
67286833
version "0.0.4"
67296834
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"

0 commit comments

Comments
 (0)