Skip to content

Commit c3ae109

Browse files
committed
tooling: add development tooling
1 parent 3d5337c commit c3ae109

13 files changed

+1888
-30
lines changed

.gitignore

+2-30
Original file line numberDiff line numberDiff line change
@@ -72,33 +72,5 @@ typings/
7272
.env
7373
.env.test
7474

75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
75+
# Builds
76+
lib

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md

.prettierrc.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
printWidth: 85
2+
proseWrap: always

.versionrc.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
bumpFiles: [
3+
{
4+
filename: "package.json",
5+
type: "json",
6+
},
7+
{
8+
filename: "packages/version/version.json",
9+
type: "json",
10+
},
11+
],
12+
types: [
13+
{ type: "feat", section: "Features" },
14+
{ type: "fix", section: "Bug Fixes" },
15+
{ type: "chore", section: "Internal" },
16+
{ type: "wip", hidden: true },
17+
{ type: "test", hidden: true },
18+
{ type: "perf", hidden: true },
19+
{ type: "docs", hidden: true },
20+
{ type: "tooling", section: "Tooling" },
21+
{ type: "revert", section: "Reverts" },
22+
],
23+
};

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# full-firestore-backup
2+
23
Back up and restore your Firestore database - including subcollections!

commitlint.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
extends: ["@commitlint/config-conventional"],
3+
rules: {
4+
"type-enum": [
5+
2,
6+
"always",
7+
["feat", "fix", "chore", "wip", "test", "perf", "docs", "tooling", "revert"],
8+
],
9+
},
10+
};

package.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "full-firestore-backup",
3+
"version": "0.0.0",
4+
"description": "Back up and restore your Firestore database - including subcollections!",
5+
"repository": "[email protected]:benyap/full-firestore-backup.git",
6+
"author": "Ben Yap <[email protected]>",
7+
"license": "MIT",
8+
"module": "lib/main.js",
9+
"types": "lib/main.d.ts",
10+
"files": [
11+
"lib/**"
12+
],
13+
"bin": {
14+
"firestore-backup": "lib/main.js"
15+
},
16+
"directories": {
17+
"lib": "lib"
18+
},
19+
"scripts": {
20+
"setup": "yarn setup:install && yarn setup:husky",
21+
"setup:install": "yarn install",
22+
"setup:husky": "husky install",
23+
"clean": "rm -rf ./lib/*",
24+
"format": "prettier --write \"./src/**/*.ts\"",
25+
"prebuild": "yarn clean && yarn format",
26+
"build": "tsc",
27+
"start": "node lib/main.js",
28+
"dev": "ts-node src/main.ts",
29+
"test": "jest",
30+
"test:coverage": "jest --coverage",
31+
"test:watch": "jest --watch --interactive",
32+
"release-rc": "standard-version --prerelease rc",
33+
"release": "standard-version"
34+
},
35+
"dependencies": {
36+
"commander": "8.0.0"
37+
},
38+
"devDependencies": {
39+
"@commitlint/cli": "13.1.0",
40+
"@commitlint/config-conventional": "13.1.0",
41+
"@types/node": "16.4.3",
42+
"husky": "7.0.1",
43+
"prettier": "2.3.2",
44+
"standard-version": "9.3.1",
45+
"ts-node": "10.1.0",
46+
"typescript": "4.3.5"
47+
}
48+
}

src/main.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello world!");

src/version.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "0.0.0"
3+
}

tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"declaration": true,
4+
"forceConsistentCasingInFileNames": true,
5+
"lib": ["ESNext"],
6+
"module": "CommonJS",
7+
"moduleResolution": "Node",
8+
"noEmit": false,
9+
"noErrorTruncation": true,
10+
"noFallthroughCasesInSwitch": true,
11+
"noImplicitReturns": true,
12+
"noUnusedLocals": true,
13+
"noUnusedParameters": true,
14+
"outDir": "lib",
15+
"resolveJsonModule": true,
16+
"skipLibCheck": true,
17+
"sourceMap": true,
18+
"strict": true,
19+
"target": "es6"
20+
},
21+
"include": ["node_modules/@types", "src/**/*"],
22+
"exclude": ["node_modules"]
23+
}

0 commit comments

Comments
 (0)