Skip to content

Commit

Permalink
feat: move docs to the separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Freisler committed Feb 14, 2021
1 parent 7ac7c17 commit b79b174
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 30 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ jobs:
- name: Link package directories together if it's not already done as a part of install.
if: steps.lerna-yarn-cache.outputs.cache-hit == 'true'
run: yarn link
- name: Build packages to get cross-references working 🔧
- name: Build packages 🔧 (docs included 📄)
run: yarn build
- name: Build docs 📄
run: yarn docs:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist
FOLDER: packages/docs/.vuepress/dist
CLEAN: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ report.html
.nyc_output
.vscode
dist
docs/.vuepress/public/packages
coverage
1 change: 1 addition & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"extends": "semantic-release-monorepo"
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@
"scripts": {
"publish": "lerna publish",
"start": "lerna run start --parallel",
"build": "lerna run build",
"build": "lerna run build --stream",
"test": "lerna run test --parallel",
"watch:test": "lerna run watch:test --parallel",
"coverage": "lerna run coverage --parallel",
"lint": "concurrently 'lerna run lint --parallel' 'yarn lint:text'",
"lint:text": "textlint docs/**/* README.md packages/*/README.md",
"lint:text": "textlint README.md packages/*/README.md",
"fix:lint": "concurrently 'lerna run fix:lint --parallel' 'yarn lint:text --fix'",
"link": "lerna link",
"postinstall": "lerna bootstrap",
"what-changed": "lerna changed",
"diff": "lerna diff",
"clean:docs:bundles": "rimraf docs/.vuepress/public/packages/*",
"predocs:dev": "yarn clean:docs:bundles",
"docs:dev": "concurrently yarn:docs:dev:*",
"docs:dev:vuepress": "vuepress dev docs",
"docs:dev:packages": "lerna run --parallel docs:dev",
"predocs:build": "yarn clean:docs:bundles",
"docs:build": "lerna run --stream docs:build",
"postdocs:build": "vuepress build docs"
"diff": "lerna diff"
},
"keywords": [
"carousel",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"watch:test": "concurrently yarn:watch:test:*",
"watch:test:scripts:unit": "yarn test:scripts:unit --watch",
"build": "microbundle",
"start": "microbundle watch",
"docs:dev": "microbundle watch -o ../../docs/.vuepress/public/packages/core.js --no-pkg-main -f umd",
"docs:build": "microbundle -o ../../docs/.vuepress/public/packages/core.js --no-pkg-main -f umd"
"start": "microbundle watch"
},
"keywords": [
"carousel",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
],
searchPlaceholder: 'Search in docs...',
repo: 'frsource/tiny-carousel',
docsDir: 'docs',
docsDir: 'packages/docs',
editLinks: true,
editLinkText: 'Help us improve this page on GitHub',
smoothScroll: true,
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = {
}

function getSideBar() {
const ignoreDirs = ['.vuepress'];
const ignoreDirs = ['.vuepress', 'node_modules'];

return fs
.readdirSync(path.join(__dirname, '..'), { withFileTypes: true })
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@frsource/tiny-carousel-docs",
"version": "0.0.0",
"description": "Documentation for @frsource/tiny-carousel 📄",
"main": ".vuepress/dist/index.html",
"scripts": {
"lint": "concurrently yarn:lint:*",
"lint:text": "textlint **/*.md",
"fix:lint": "concurrently 'yarn lint:scripts --fix' 'yarn lint:styles --fix' 'yarn lint:text --fix'",
"build": "vuepress build .",
"start": "vuepress dev ."
},
"keywords": [
"carousel",
"slider",
"swiper",
"tiny",
"documentation",
"docs",
"vuepress",
"efficient",
"modular",
"lightweight",
"mobile-friendly",
"css snap",
"scroll snap",
"snapping points"
],
"author": "Jakub Freisler <jakub.freisler@frsource.org>",
"license": "MIT",
"bugs": {
"url": "https://github.com/FRSource/tiny-carousel/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/FRSource/tiny-carousel.git"
},
"homepage": "https://www.frsource.org/tiny-carousel/",
"dependencies": {
"@frsource/tiny-carousel-utils": "*",
"@frsource/tiny-carousel-core": "*",
"@frsource/tiny-carousel-plugin-custom-events": "*",
"@frsource/tiny-carousel-plugin-scroll-snap-fallback": "*"
}
}
4 changes: 1 addition & 3 deletions packages/plugin-custom-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"coverage:scripts": "yarn test:scripts:unit --coverage",
"watch:test": "concurrently yarn:watch:test:*",
"watch:test:scripts:unit": "yarn test:scripts:unit --watch",
"build": "microbundle",
"docs:dev": "microbundle watch -o ../../docs/.vuepress/public/packages/pluginCustomEvents.js --no-pkg-main -f umd",
"docs:build": "microbundle -o ../../docs/.vuepress/public/packages/pluginCustomEvents.js --no-pkg-main -f umd"
"build": "microbundle"
},
"devDependencies": {
"@frsource/tiny-carousel-core": "*"
Expand Down
4 changes: 1 addition & 3 deletions packages/plugin-scroll-snap-fallback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"watch:test": "concurrently yarn:watch:test:*",
"watch:test:scripts:unit": "yarn test:scripts:unit --watch",
"build": "microbundle",
"start": "microbundle watch",
"docs:dev": "microbundle watch -o ../../docs/.vuepress/public/packages/pluginScrollSnapFallback.js --no-pkg-main -f umd",
"docs:build": "microbundle -o ../../docs/.vuepress/public/packages/pluginScrollSnapFallback.js --no-pkg-main -f umd"
"start": "microbundle watch"
},
"keywords": [
"carousel",
Expand Down
4 changes: 1 addition & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
"watch:test": "concurrently yarn:watch:test:*",
"watch:test:scripts:unit": "yarn test:scripts:unit --watch",
"build": "microbundle",
"start": "microbundle watch",
"docs:dev": "microbundle watch -o ../../docs/.vuepress/public/packages/utils.js --no-pkg-main -f umd",
"docs:build": "microbundle -o ../../docs/.vuepress/public/packages/utils.js --no-pkg-main -f umd"
"start": "microbundle watch"
},
"keywords": [
"carousel",
Expand Down

0 comments on commit b79b174

Please sign in to comment.