Skip to content

Commit 097c52d

Browse files
Merge pull request #122 from MaksymStoianov/max/next
Max/next
2 parents e8da8f1 + 89e0eeb commit 097c52d

200 files changed

Lines changed: 4685 additions & 2730 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.sln
2323
*.sw?
2424

25+
coverage
26+

.idea/appsscript-utils.iml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.junie/guidelines.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
### Development Guidelines for `apps-script-utils`
2+
3+
#### 1. Build and Configuration
4+
5+
This project is a TypeScript-based utility library for Google Apps Script.
6+
7+
- **Prerequisites**: Node.js and npm installed.
8+
- **Installation**: Run `npm install` to install all dependencies.
9+
- **Building**: Use `npm run build` to compile the TypeScript source into the `dist` directory. This script performs
10+
cleanup of the `dist` folder before running `tsc`.
11+
- **Linting and Formatting**:
12+
- `npm run lint`: Runs ESLint with auto-fix enabled.
13+
- `npm run format`: Runs Prettier to format all files in the project.
14+
15+
#### 2. Testing
16+
17+
The project uses [Vitest](https://vitest.dev/) for unit testing.
18+
19+
- **Running Tests**:
20+
- `npm test`: Runs all tests once.
21+
- `npm run dev`: Starts Vitest in watch mode for interactive development.
22+
- **Adding New Tests**:
23+
- Tests should be placed in the `test/` directory, mirroring the structure of the `src/` directory.
24+
- Test files must follow the naming convention `*.test.ts`.
25+
- Use the `@/` alias to import from the `src/` directory (configured in `vitest.config.ts`).
26+
- **Example Test**:
27+
28+
```typescript
29+
import { describe, expect, it } from "vitest";
30+
import { isString } from "@/lang/base/isString";
31+
32+
describe("isString", () => {
33+
it("should return true for strings", () => {
34+
expect(isString("hello")).toBe(true);
35+
});
36+
37+
it("should return false for non-strings", () => {
38+
expect(isString(123)).toBe(false);
39+
});
40+
});
41+
```
42+
43+
#### 3. Code Style and Development
44+
45+
- **Consistency**: Follow the existing code style. The project uses Prettier and ESLint to enforce formatting and best
46+
practices.
47+
- **CHANGELOG**: Do not modify `CHANGELOG.md` manually. It is updated automatically during the release process.
48+
- **Documentation**: Use JSDoc/KDoc comments for all exported functions. Include `@param`, `@returns`, `@since`, and
49+
`@version` tags where applicable.
50+
- **Modules**: The project is organized into logical modules:
51+
- `appsscript/`: Utilities specifically for Google Apps Script environments (Sheets, Drive, etc.).
52+
- `lang/`: General JavaScript/TypeScript language utilities (type checks, array/object helpers).
53+
- `net/`: Network and path-related utilities.
54+
- `exception/`, `html/`, `json/`, `time/`: Other specialized utility groups.
55+
- **Types**: Use strict TypeScript typing. Avoid `any` where possible. Prefer interface or type definitions for complex
56+
objects.
57+
- **Git Hooks**: The project uses `husky` for pre-commit and pre-push hooks to ensure code quality before pushing.

.prettierignore

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
1-
# Ignore artifacts:
2-
dist
3-
build
4-
coverage
5-
6-
**/.git
7-
**/.svn
8-
**/.hg
9-
**/node_modules
10-
1+
# This file specifies which files and directories should be ignored by Prettier.
2+
# It helps prevent formatting of generated files, dependencies, and artifacts.
3+
#
4+
# Reference: https://prettier.io/docs/en/ignore.html
5+
# Ignore compilation results and build artifacts
6+
dist/
7+
build/
8+
out/
9+
package-lock.json
10+
yarn.lock
11+
pnpm-lock.yaml
12+
# Ignore external libraries and modules
13+
node_modules/
14+
vendor/
15+
# Ignore test coverage reports
16+
coverage/
17+
.coverage
18+
.nyc_output/
19+
# Ignore VCS-specific files
20+
.git/
21+
.svn/
22+
.hg/
23+
# Ignore files that shouldn't be formatted to maintain their original style
24+
CHANGELOG.md
25+
LICENSE
26+
CODE_OF_CONDUCT.md
27+
.github/
28+
# Minified files and project-specific ignores
1129
*.min.js
12-
**/output.css
30+
*.min.css
31+
**/output.css
32+
.eslintcache
33+
.stylelintcache

0 commit comments

Comments
 (0)