Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Commit

Permalink
fix: remove extranous files from build
Browse files Browse the repository at this point in the history
fixes #15
  • Loading branch information
lowmess committed Jan 31, 2017
1 parent 5ac7eb7 commit fe3ddbb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 7 deletions.
9 changes: 9 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var collections = require('metalsmith-collections')
var markdown = require('metalsmith-markdownit')
var layouts = require('metalsmith-layouts')
var minify = require('metalsmith-html-minifier')
var defaults = require('metalsmith-default-values')
var drafts = require('metalsmith-drafts')
// PostCSS
var postcss = require('postcss')
// PDF
Expand Down Expand Up @@ -37,6 +39,12 @@ var siteBuild = Metalsmith(__dirname)
pattern: '*.md'
}
}))
.use(defaults([{
pattern: '*/**/*.md',
defaults: {
draft: true
}
}]))
// HTML
.use(markdown({
html: true,
Expand All @@ -57,6 +65,7 @@ var siteBuild = Metalsmith(__dirname)
default: 'default.pug',
pattern: '**/*.html'
}))
.use(drafts())

if (process.env.NODE_ENV === 'production') {
siteBuild.use(minify())
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"html-pdf": "^2.0.1",
"metalsmith": "^2.1.0",
"metalsmith-collections": "^0.7.0",
"metalsmith-default-values": "^1.0.1",
"metalsmith-drafts": "^0.0.1",
"metalsmith-html-minifier": "^2.0.0",
"metalsmith-layouts": "^1.6.5",
"metalsmith-markdownit": "^0.3.0",
Expand Down
64 changes: 57 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,10 @@ hoek@2.x.x:
version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"

hoek@4.x.x:
version "4.1.0"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.1.0.tgz#4a4557460f69842ed463aa00628cc26d2683afa7"

home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
Expand Down Expand Up @@ -2458,6 +2462,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"

isemail@2.x.x:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isemail/-/isemail-2.2.1.tgz#0353d3d9a62951080c262c2aa0a42b8ea8e9e2a6"

isexe@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
Expand All @@ -2472,12 +2480,26 @@ isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"

items@2.x.x:
version "2.1.1"
resolved "https://registry.yarnpkg.com/items/-/items-2.1.1.tgz#8bd16d9c83b19529de5aea321acaada78364a198"

jodid25519@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
dependencies:
jsbn "~0.1.0"

joi@^9.0.4:
version "9.2.0"
resolved "https://registry.yarnpkg.com/joi/-/joi-9.2.0.tgz#3385ac790192130cbe230e802ec02c9215bbfeda"
dependencies:
hoek "4.x.x"
isemail "2.x.x"
items "2.x.x"
moment "2.x.x"
topo "2.x.x"

js-base64@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
Expand Down Expand Up @@ -2804,6 +2826,10 @@ lodash.defaultsdeep@^4.1.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz#bec1024f85b1bd96cbea405b23c14ad6443a6f81"

lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"

lodash.indexof@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/lodash.indexof/-/lodash.indexof-4.0.5.tgz#53714adc2cddd6ed87638f893aa9b6c24e31ef3c"
Expand Down Expand Up @@ -2856,18 +2882,22 @@ lodash.restparam@^3.0.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"

lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"

lodash@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"

lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"

lodash@~4.0.1:
lodash@^4.0.0, lodash@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.0.1.tgz#cd8c902c9e03f2e69ce3e0e456d505ab89eb98f4"

lodash@^4.1.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"

log-symbols@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
Expand Down Expand Up @@ -2974,6 +3004,20 @@ metalsmith-collections@^0.7.0:
read-metadata "0.0.2"
uniq "0.0.2"

metalsmith-default-values@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/metalsmith-default-values/-/metalsmith-default-values-1.0.1.tgz#61d4f7a7b9c15a71da2dbcf2ada90307e38a42e9"
dependencies:
debug "^2.2.0"
joi "^9.0.4"
lodash.get "^4.4.2"
lodash.set "^4.3.2"
multimatch "^2.1.0"

metalsmith-drafts@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/metalsmith-drafts/-/metalsmith-drafts-0.0.1.tgz#727858ba266934a37a287013beca9b6033272f77"

metalsmith-html-minifier@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/metalsmith-html-minifier/-/metalsmith-html-minifier-2.2.0.tgz#59930b5c371cd4db3110e9ae400246debadc9ed6"
Expand Down Expand Up @@ -3117,7 +3161,7 @@ mkdirp@0.5.0:
dependencies:
minimist "0.0.8"

moment@^2.13.0, moment@^2.5.1:
moment@2.x.x, moment@^2.13.0, moment@^2.5.1:
version "2.17.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.0.tgz#a4c292e02aac5ddefb29a6eed24f51938dd3b74f"

Expand All @@ -3129,7 +3173,7 @@ ms@0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"

multimatch@^2.0.0:
multimatch@^2.0.0, multimatch@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
dependencies:
Expand Down Expand Up @@ -5383,6 +5427,12 @@ token-stream@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a"

topo@2.x.x:
version "2.0.2"
resolved "https://registry.yarnpkg.com/topo/-/topo-2.0.2.tgz#cd5615752539057c0dc0491a621c3bc6fbe1d182"
dependencies:
hoek "4.x.x"

touch@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/touch/-/touch-1.0.0.tgz#449cbe2dbae5a8c8038e30d71fa0ff464947c4de"
Expand Down

0 comments on commit fe3ddbb

Please sign in to comment.