Skip to content

Commit

Permalink
docs: update list of guessed dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
agentofuser committed May 16, 2019
1 parent ae1aec7 commit e73f69f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
/.env
.env
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
> Upload static website to IPFS pinning services and optionally update DNS.
<p align="center">
<img src="./docs/og-image.png">
<img src="docs/og-image.png">
</p>

The goal of `@agentofuser/ipfs-deploy` is to make it as easy as possible to
Expand Down Expand Up @@ -67,16 +67,17 @@ guess it for you based on the build directories used by the most popular static
site generators:

```javascript
// prettier-ignore
const guesses = [
'_site', // jekyll, hakyll
'site',
'public', // gatsby, hugo
'dist', // nuxt
'output', // pelican
'out', // hexo
'build', // metalsmith, middleman
'_site', // jekyll, hakyll, eleventy
'site', // forgot which
'public', // gatsby, hugo
'dist', // nuxt
'output', // pelican
'out', // hexo
'build', // create-react-app, metalsmith, middleman
'website/build', // docusaurus
'docs',
'docs', // many others
]
```

Expand Down
17 changes: 9 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,17 @@ async function isNodeReachable(port) {
}

function guessedPath() {
// prettier-ignore
const guesses = [
'_site', // jekyll, hakyll
'site',
'public', // gatsby, hugo
'dist', // nuxt
'output', // pelican
'out', // hexo
'build', // metalsmith, middleman
'_site', // jekyll, hakyll, eleventy
'site', // forgot which
'public', // gatsby, hugo
'dist', // nuxt
'output', // pelican
'out', // hexo
'build', // create-react-app, metalsmith, middleman
'website/build', // docusaurus
'docs',
'docs', // many others
]

return fp.filter(existsSync)(guesses)[0]
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"format": "npx prettier --write ./**/*.{js,json,md,mdx,html,css}",
"test": "echo \"Error: no test specified\" && exit 1",
"commit": "npx sgc",
"commit:retry": "npx sgc --retry",
"semantic-release": "./semantic-release-dry-run.bash",
"deploy": "./release.bash"
},
Expand Down

0 comments on commit e73f69f

Please sign in to comment.