Skip to content

Commit

Permalink
Fix/ci docs (#29)
Browse files Browse the repository at this point in the history
* docs: implements VuePress docs with reference and dev guides

Implements VuePress to create markdown-generated HTML documentation.
Adds a reference guide for symbologies and how to create them using
this module. Adds guidelines on contributing and related information
on development practices.

* chore(ci): sets Travis to build and publish docs

* fix(docs): corrects path and deploy module in publish script

Installs deploy-aws-s3-cloudfront. Fixes path to build in docs:publish
script. Fixes incorrect path reference for README logo.
  • Loading branch information
jshor committed Dec 16, 2019
1 parent aaf59d2 commit a3a7d63
Show file tree
Hide file tree
Showing 4 changed files with 697 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://raw.githubusercontent.com/jshor/symbology/master/docs/symbology-logo.svg?sanitize=true" alt="logo" width="500">
<img src="https://raw.githubusercontent.com/jshor/symbology/master/docs/.vuepress/public/assets/symbology-logo.svg" alt="logo" width="500">
</p>

<p align="center">A Node.js module that generates barcode images. Supports 50+ different 1D or 2D symbologies in png, eps, or svg formats.</p>
Expand Down
4 changes: 1 addition & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
const path = require('path')
const getDir = require('./utils/getDir')

console.error(getDir('docs'))

module.exports = {
base: '/',
dest: path.join(__dirname, '../../build'),
dest: path.join(__dirname, '../../build/docs'),
locales: {
'/': {
lang: 'en-US',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"install": "node ./scripts/install.js && node-pre-gyp install --fallback-to-build",
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs",
"docs:publish": "deploy-aws-s3-cloudfront --delete --non-interactive --bucket ${AWS_S3_BUCKET_NAME} --source ./dist/web --distribution ${AWS_CF_ID}"
"docs:publish": "deploy-aws-s3-cloudfront --delete --non-interactive --bucket ${AWS_S3_BUCKET_NAME} --source ./build/docs --distribution ${AWS_CF_ID}"
},
"main": "./src/index.js",
"author": "Josh Shor <https://github.com/jshor>",
Expand Down Expand Up @@ -59,6 +59,7 @@
"commitizen": "^4.0.3",
"coveralls": "2.11.6",
"cz-conventional-changelog": "^3.0.2",
"deploy-aws-s3-cloudfront": "^2.3.1",
"husky": "^3.1.0",
"istanbul": "0.4.2",
"mocha": "2.5.3",
Expand Down

0 comments on commit a3a7d63

Please sign in to comment.