Skip to content

Commit

Permalink
Add examples and css versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Ives van Hoorne committed Apr 12, 2017
1 parent 8482ab8 commit 21c697f
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 17 deletions.
12 changes: 10 additions & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ const gulp = require('gulp');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const rev = require('gulp-rev');
const replace = require('gulp-replace');

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

gulp.task('css', function() {
return gulp
.src('src/homepage/**/*.css')
.pipe(postcss([autoprefixer, cssnano]))
.pipe(rev())
.pipe(gulp.dest(`${config.appBuild}/`))
.pipe(rev.manifest())
.pipe(gulp.dest(`${config.appBuild}/`));
});

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

gulp.task('html', function() {
const manifest = require(`${config.appBuild}/rev-manifest.json`);

return gulp
.src('src/homepage/**/*.html')
.src('src/homepage/index.html')
.pipe(replace('static/css/main.css', manifest['static/css/main.css']))
.pipe(gulp.dest(`${config.appBuild}/`));
});

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

gulp.task('default', ['css', 'html', 'javascript', 'static']);
gulp.task('default', ['css', 'javascript', 'static', 'html']);
5 changes: 5 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ const config = {
name: 'vendor',
minChunks: Infinity,
}),
new webpack.optimize.CommonsChunkPlugin({
async: true,
children: true,
minChunks: 4,
}),
new webpack.NamedModulesPlugin(),
],
};
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"filesize": "^3.5.6",
"flow-bin": "0.43.0",
"fs-extra": "^2.0.0",
"gulp-replace": "^0.5.4",
"gzip-size": "3.0.0",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.24.1",
Expand Down Expand Up @@ -78,7 +79,9 @@
"file-saver": "^1.3.3",
"glamor": "^2.20.12",
"gulp": "^3.9.1",
"gulp-filter": "^5.0.0",
"gulp-postcss": "^6.4.0",
"gulp-rev": "^7.1.2",
"humps": "CompuIves/humps",
"jszip": "^3.1.3",
"lodash": "^4.17.2",
Expand Down
17 changes: 17 additions & 0 deletions src/homepage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,23 @@ <h3>Example Projects</h3>
</div>
</section>

<section id="picked" class="picked">
<h3>Picked Projects</h3>
<h4>Made something cool? Send it to <a href="mailto:hello@codesandbox.io">hello@codesandbox.io</a> so we can feature it here!</h4>

<div class="picked-project">
<h4>Redux Form - Simple Example by @erikras</h4>
<iframe src=https://codesandbox.io/embed/mZRjw05yp style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
</div>

<div class="picked-project">
<h4>Glamorous themeing by @kentcdodds</h4>
<iframe src=https://codesandbox.io/embed/o2yq9MkQk style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
</div>
</section>

<section class="about">
We'd love to hear your thoughts, feedback and suggestions. Contact us any time at <a href="mailto:hello@codesandbox.io">hello@codesandbox.io</a>!
<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>
Expand Down
30 changes: 30 additions & 0 deletions src/homepage/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,36 @@ h1 {
font-weight: 400;
}

.picked {
display: flex;
align-items: center;
flex-direction: column;
text-align: center;
justify-content: center;
padding-bottom: 2rem;
background-color: #272C2E;
}

.picked-project {
width: 100%;
max-width: 1200px;
margin-bottom: 2rem;
}

.picked h3 {
text-transform: uppercase;
margin: 2rem;
margin-bottom: 0;
font-size: 2rem;
font-weight: 400;
}

.picked h4 {
margin: 1rem;
font-size: 1rem;
font-weight: 400;
}

.projects {
display: flex;
max-width: 900px;
Expand Down
135 changes: 120 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ babel-standalone@^6.21.1-0:
version "6.23.1"
resolved "https://registry.yarnpkg.com/babel-standalone/-/babel-standalone-6.23.1.tgz#904a6db801f6b485e693459e8adc6c3a00416e20"

babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1:
babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1, babel-template@^6.7.0:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333"
dependencies:
Expand All @@ -1076,7 +1076,7 @@ babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.24.1:
babylon "^6.11.0"
lodash "^4.2.0"

babel-template@^6.23.0, babel-template@^6.3.0, babel-template@^6.7.0:
babel-template@^6.23.0, babel-template@^6.3.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638"
dependencies:
Expand Down Expand Up @@ -1186,6 +1186,10 @@ binary-extensions@^1.0.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"

binaryextensions@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-1.0.1.tgz#1e637488b35b58bda5f4774bf96a5212a8c90755"

block-stream@*:
version "0.0.9"
resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
Expand Down Expand Up @@ -2267,7 +2271,7 @@ escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"

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

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

gulp-filter@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.0.0.tgz#cfa81966fb67884f2ba754b067152929428d59bc"
dependencies:
gulp-util "^3.0.6"
multimatch "^2.0.0"
streamfilter "^1.0.5"

gulp-postcss@^6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-6.4.0.tgz#78a32e3c87aa6cdcec5ae1c905e196d478e8c5d5"
Expand All @@ -3064,7 +3076,28 @@ gulp-postcss@^6.4.0:
postcss-load-config "^1.2.0"
vinyl-sourcemaps-apply "^0.2.1"

gulp-util@^3.0.0, gulp-util@^3.0.8:
gulp-replace@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/gulp-replace/-/gulp-replace-0.5.4.tgz#69a67914bbd13c562bff14f504a403796aa0daa9"
dependencies:
istextorbinary "1.0.2"
readable-stream "^2.0.1"
replacestream "^4.0.0"

gulp-rev@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/gulp-rev/-/gulp-rev-7.1.2.tgz#5e17cc229f6b45c74256f88ad3f2d3e9a3305829"
dependencies:
gulp-util "^3.0.0"
modify-filename "^1.1.0"
object-assign "^4.0.1"
rev-hash "^1.0.0"
rev-path "^1.0.0"
sort-keys "^1.0.0"
through2 "^2.0.0"
vinyl-file "^1.1.0"

gulp-util@^3.0.0, gulp-util@^3.0.6, gulp-util@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
dependencies:
Expand Down Expand Up @@ -3761,6 +3794,13 @@ istanbul-reports@^1.0.0:
dependencies:
handlebars "^4.0.3"

istextorbinary@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-1.0.2.tgz#ace19354d1a9a0173efeb1084ce0f87b0ad7decf"
dependencies:
binaryextensions "~1.0.0"
textextensions "~1.0.0"

jest-changed-files@^19.0.2:
version "19.0.2"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824"
Expand Down Expand Up @@ -4506,6 +4546,10 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd
dependencies:
minimist "0.0.8"

modify-filename@^1.0.0, modify-filename@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/modify-filename/-/modify-filename-1.1.0.tgz#9a2dec83806fbb2d975f22beec859ca26b393aa1"

moment@^2.17.1:
version "2.17.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82"
Expand All @@ -4518,6 +4562,15 @@ ms@0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"

multimatch@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
dependencies:
array-differ "^1.0.0"
array-union "^1.0.1"
arrify "^1.0.0"
minimatch "^3.0.0"

multipipe@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
Expand Down Expand Up @@ -5651,7 +5704,7 @@ readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0":
isarray "0.0.1"
string_decoder "~0.10.x"

"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:
"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:
version "2.2.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.5.tgz#a0b187304e05bab01a4ce2b4cc9c607d5aa1d606"
dependencies:
Expand All @@ -5663,16 +5716,7 @@ readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0":
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readable-stream@~1.1.9:
version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "0.0.1"
string_decoder "~0.10.x"

readable-stream@~2.0.6:
readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
dependencies:
Expand All @@ -5683,6 +5727,15 @@ readable-stream@~2.0.6:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readable-stream@~1.1.9:
version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "0.0.1"
string_decoder "~0.10.x"

readable-stream@~2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
Expand Down Expand Up @@ -5844,6 +5897,14 @@ replace-ext@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"

replacestream@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/replacestream/-/replacestream-4.0.2.tgz#0c4140707e4f0323f50de044851708cf58bc37bd"
dependencies:
escape-string-regexp "^1.0.3"
object-assign "^4.0.1"
readable-stream "^2.0.2"

request@^2.79.0:
version "2.81.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
Expand Down Expand Up @@ -5938,6 +5999,16 @@ ret@~0.1.10:
version "0.1.14"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.14.tgz#58c636837b12e161f8a380cf081c6a230fd1664e"

rev-hash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/rev-hash/-/rev-hash-1.0.0.tgz#96993959ea9bfb1c59b13adf02ac2e34bb373603"

rev-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/rev-path/-/rev-path-1.0.0.tgz#d4ccb436ac3370c4607175ce88eafc5c65c5d653"
dependencies:
modify-filename "^1.0.0"

right-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
Expand Down Expand Up @@ -6255,6 +6326,12 @@ stream-http@^2.3.1:
to-arraybuffer "^1.0.0"
xtend "^4.0.0"

streamfilter@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.5.tgz#87507111beb8e298451717b511cfed8f002abf53"
dependencies:
readable-stream "^2.0.2"

strict-uri-encode@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
Expand Down Expand Up @@ -6294,6 +6371,13 @@ strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"

strip-bom-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
dependencies:
first-chunk-stream "^1.0.0"
strip-bom "^2.0.0"

strip-bom@3.0.0, strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
Expand Down Expand Up @@ -6428,6 +6512,10 @@ text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"

textextensions@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-1.0.2.tgz#65486393ee1f2bb039a60cbba05b0b68bd9501d2"

throat@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6"
Expand Down Expand Up @@ -6690,6 +6778,15 @@ verror@1.3.6:
dependencies:
extsprintf "1.0.2"

vinyl-file@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-1.3.0.tgz#aa05634d3a867ba91447bedbb34afcb26f44f6e7"
dependencies:
graceful-fs "^4.1.2"
strip-bom "^2.0.0"
strip-bom-stream "^1.0.0"
vinyl "^1.1.0"

vinyl-fs@^0.3.0:
version "0.3.14"
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
Expand Down Expand Up @@ -6724,6 +6821,14 @@ vinyl@^0.5.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"

vinyl@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
dependencies:
clone "^1.0.0"
clone-stats "^0.0.1"
replace-ext "0.0.1"

vm-browserify@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
Expand Down

0 comments on commit 21c697f

Please sign in to comment.