Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Apr 28, 2022
1 parent c5a7bb7 commit 38e988f
Show file tree
Hide file tree
Showing 27 changed files with 1,051 additions and 618 deletions.
10 changes: 10 additions & 0 deletions .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [
2,
'always',
['', 'docs', 'example', 'release', 'wallet'],
],
},
};
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --config ./.commitlintrc.cjs --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
17 changes: 17 additions & 0 deletions .scripts/check-for-pnpm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Thanks: https://github.com/vitebook/vitebook/tree/main/.scripts
*/

if (!/pnpm/.test(process.env.npm_execpath || '')) {
console.warn(
`\n⚠️ \u001b[33mThis repository requires using PNPM as the package manager ` +
` for scripts to work properly.\u001b[39m` +
'\n\n1. Install Volta to automatically manage it by running: \x1b[1mcurl https://get.volta.sh | bash\x1b[0m',
'\n2. Install PNPM by running: \x1b[1mvolta install pnpm@6\x1b[0m',
"\n3. Done! Run `pnpm` commands as usual and it'll just work :)",
'\n\nSee \x1b[1mhttps://volta.sh\x1b[0m for more information.',
'\n',
);

process.exit(1);
}
31 changes: 31 additions & 0 deletions .scripts/check-node-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Thanks: https://github.com/vitebook/vitebook/tree/main/.scripts
*/

import { exec } from 'child_process';
import { promisify } from 'util';

async function main() {
const nodeV = await promisify(exec)('node -v');
const nodeVersion = parseInt(nodeV.stdout.slice(1).split('.')[0]);

if (nodeVersion < 16) {
console.warn(
'\n',
`⚠️ \u001b[33mThis package requires your Node.js version to be \`>=16\`` +
` to work properly.\u001b[39m`,
'\n\n1. Install Volta to automatically manage it by running: \x1b[1mcurl https://get.volta.sh | bash\x1b[0m',
'\n2. Install Node.js by running: \x1b[1mvolta install node@16\x1b[0m',
"\n3. Done! Run `npm` commands as usual and it'll just work :)",
'\n\nSee \x1b[1mhttps://volta.sh\x1b[0m for more information.',
'\n',
);

process.exit(1);
}
}

main().catch((err) => {
console.error(err);
process.exit(1);
});
19 changes: 0 additions & 19 deletions .vitebook/App.vue

This file was deleted.

22 changes: 0 additions & 22 deletions .vitebook/config.ts

This file was deleted.

3 changes: 0 additions & 3 deletions .vitebook/global.css

This file was deleted.

18 changes: 0 additions & 18 deletions .vitebook/index.html

This file was deleted.

5 changes: 0 additions & 5 deletions .vitebook/public/404.svg

This file was deleted.

Binary file removed .vitebook/public/apple-touch-icon.png
Binary file not shown.
Binary file removed .vitebook/public/favicon-16x16.png
Binary file not shown.
Binary file removed .vitebook/public/favicon-32x32.png
Binary file not shown.
Binary file removed .vitebook/public/favicon.ico
Binary file not shown.
Binary file removed .vitebook/public/logo-192x192.png
Binary file not shown.
Binary file removed .vitebook/public/logo-512x512.png
Binary file not shown.
4 changes: 0 additions & 4 deletions .vitebook/public/logo.svg

This file was deleted.

20 changes: 0 additions & 20 deletions .vitebook/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vitebook/public/robots.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .vitebook/theme/index.ts

This file was deleted.

4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
"heroicon",
"booleanish",
"composables",
"preinstall",
"commitlint"
],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
}
83 changes: 45 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "vue-component-library-starter",
"version": "0.1.0",
"description": "Vue 3 Component Library Starter kit.",
"type": "module",
"version": "0.2.0",
"description": "The easy way to start your Vue 3 Component Library.",
"keywords": [
"component",
"library",
Expand All @@ -12,7 +13,7 @@
"kit"
],
"license": "MIT",
"author": "Meema Labs",
"author": "Open Web Labs",
"main": "./dist/my-awesome-vue-component-lib.umd.js",
"module": "./dist/my-awesome-vue-component-lib.es.js",
"exports": {
Expand All @@ -34,54 +35,60 @@
"dev": "vite --port 3333 --open",
"build": "vite build && vue-tsc --emitDeclarationOnly",
"preview": "vite preview",
"vitebook:dev": "vitebook dev",
"vitebook:build": "vitebook build",
"vitebook:preview": "vitebook preview",
"commit": "git add . && commit",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest",
"test:unit": "vitest",
"test:e2e": "cypress open",
"coverage": "vitest run --coverage",
"typecheck": "vue-tsc --emitDeclarationOnly"
"typecheck": "vue-tsc --emitDeclarationOnly",
"preinstall": "node .scripts/check-for-pnpm.js && node .scripts/check-node-version.js",
"prepare": "husky install",
"release:dry": "standard-version --dry-run",
"release": "standard-version",
"publish": "release && git push --follow-tags"
},
"dependencies": {
"vue": "^3.2.33"
},
"devDependencies": {
"@antfu/eslint-config": "0.21.1",
"@babel/types": "7.17.0",
"@tailwindcss/aspect-ratio": "0.4.0",
"@tailwindcss/forms": "0.5.0",
"@tailwindcss/line-clamp": "0.4.0",
"@tailwindcss/typography": "0.5.2",
"@vitebook/client": "0.23.6",
"@vitebook/core": "0.23.6",
"@vitebook/markdown-vue": "0.23.6",
"@vitebook/theme-default": "0.23.6",
"@vitebook/vue": "0.23.6",
"@vitejs/plugin-vue": "2.3.1",
"@vue/compiler-sfc": "3.2.33",
"@vueuse/core": "8.3.1",
"autoprefixer": "10.4.5",
"eslint": "8.14.0",
"eslint-plugin-cypress": "2.12.1",
"pnpm": "6.32.11",
"postcss": "8.4.12",
"postcss-import": "14.1.0",
"prettier": "2.6.2",
"prettier-plugin-tailwindcss": "0.1.10",
"svelte": "3.47.0",
"tailwindcss": "3.0.24",
"typescript": "4.6.3",
"unplugin-auto-import": "0.7.1",
"unplugin-vue-components": "0.19.3",
"vite": "2.9.6",
"vitest": "0.10.0",
"vue-tsc": "0.34.10"
"@antfu/eslint-config": "^0.21.1",
"@babel/types": "^7.17.0",
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@commitlint/prompt-cli": "^16.2.3",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.0",
"@tailwindcss/line-clamp": "^0.4.0",
"@tailwindcss/typography": "^0.5.2",
"@vitejs/plugin-vue": "^2.3.1",
"@vue/compiler-sfc": "^3.2.33",
"@vueuse/core": "^8.3.1",
"autoprefixer": "^10.4.5",
"eslint": "^8.14.0",
"eslint-plugin-cypress": "^2.12.1",
"husky": "^7.0.4",
"pnpm": "^6.32.11",
"postcss": "^8.4.12",
"postcss-import": "^14.1.0",
"prettier": "^2.6.2",
"prettier-plugin-tailwindcss": "^0.1.10",
"svelte": "^3.47.0",
"tailwindcss": "^3.0.24",
"typescript": "^4.6.3",
"unplugin-auto-import": "^0.7.1",
"unplugin-vue-components": "^0.19.3",
"vite": "^2.9.6",
"vitest": "^0.10.0",
"vue-tsc": "^0.34.10"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": "eslint . --fix"
},
"engines": {
"node": ">=v16.15.0"
"node": ">=v16.15.0",
"pnpm": ">=6.32.11"
},
"contributors": [
"Chris Breuer <chris@meema.xyz>"
Expand Down
Loading

0 comments on commit 38e988f

Please sign in to comment.