Skip to content

Commit

Permalink
generate v0.0.1 (#1)
Browse files Browse the repository at this point in the history
* Transferred initial source from Dengen.

Context: <EthanThatOneKid/dengen#2 (review)>.

* Print help text.

* Add `check.yaml` workflow

* Line/column numbers from `bigint` to `number`

Relevant: <#1 (comment)>.

- Add `examples/embedder`.
- Fix README.md typos.
- Add new FAQ section.
- Add sections from denoland/deno#19176: "Use cases", "Conventions", "Examples".

* Update examples and README.

- Add `examples/embedder`.
- Move docs example to `examples/docs`.
- Fix README.md typos.
- Add new FAQ section.
- Add sections from denoland/deno#19176: "Use cases", "Conventions", "Examples".

* Update `check.yaml` script

* `examples/docs`: Target `with_generate_docs.ts`.

* Replace `examples/docs` with `examples/typescript`

* Add contributing guidelines inspired by Deno

Inspired by: https://deno.com/manual/references/contributing.

* Fix README typos

* Update .gitattributes
  • Loading branch information
EthanThatOneKid authored Jun 3, 2023
1 parent 7ad9f65 commit 1a310e7
Show file tree
Hide file tree
Showing 28 changed files with 1,281 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
examples/embedder_static/* linguist-generated
examples/typescript/generated.ts linguist-generated
28 changes: 28 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check:
runs-on: ubuntu-latest

strategy:
matrix:
deno-version: [canary]

steps:
- uses: actions/checkout@v2

- uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: Check
run: |
deno task generate
deno task all
git diff --exit-code
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"deno.enable": true,
"deno.config": "./deno.jsonc",
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
}
107 changes: 107 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Contributing

Thank you for considering contributing to the `deno_generate` repository. We
appreciate your interest and efforts in making this project better. This
document will guide you on how to contribute effectively.

## Project

The `deno_generate` repository is part of the Deno ecosystem
(<https://deno.land/x/generate>) but is not an official Deno project at this
time. It aims to provide a code generation tool for Deno projects.

## Getting Started

To get started with contributing to `deno_generate`, follow these steps:

1. Read the
[contribution guidelines](https://deno.com/manual/references/contributing)
for Deno. Although this project is not an official Deno project, the
contribution guidelines provide valuable information on how to contribute
effectively.

2. Fork the `deno_generate` repository to your GitHub account.

3. Clone the forked repository to your local machine.

4. Make the necessary changes or additions to the codebase.

5. Ensure that your changes adhere to the style guide provided in the
repository.

6. Write descriptive commit messages for your changes.

7. Push your changes to your forked repository.

8. Submit a pull request (PR) to the `deno_generate` repository, describing the
changes you have made.

## General Guidelines

Here are some general guidelines to keep in mind while contributing to
`deno_generate`:

- Maintain a professional and respectful attitude in all interactions related to
this project. Refer to the
[Rust's code of conduct](https://www.rust-lang.org/policies/code-of-conduct)
for guidance.

- If you encounter any issues or need help, feel free to ask for assistance in
the [community chat room](https://discord.gg/deno).

- Before working on an existing issue, comment on the issue to let others know
that you are going to work on it.

- For new features, create an issue first and discuss it with other
contributors. This step ensures that your proposed feature aligns with the
project's goals and increases the chances of its acceptance.

## Submitting a Pull Request

When submitting a pull request, ensure that you follow these guidelines:

1. Give your pull request a descriptive title summarizing the changes you have
made.

Good examples:
- feat: Add new code generation feature
- fix: Resolve issue with code formatting

Bad examples:
- fix #123
- update code

2. Reference the related issue(s) in the pull request description.

3. Include tests that cover the changes you have made. Tests help ensure the
stability and quality of the project.

## Additional Guidelines

If you are submitting a pull request specifically for the `deno_generate`
repository, make sure to follow these additional guidelines:

1. Ensure that the code passes the necessary tests. Run the appropriate testing
commands specific to this repository.

2. Format the code to adhere to the consistent style used in the repository. Use
the provided formatting tools or scripts.

3. Check the code for common mistakes and errors using linting tools specific to
this repository.

## Documentation

Proper documentation is crucial for maintaining the project and helping other
developers understand the codebase. Follow these guidelines for documenting
APIs:

### JavaScript and TypeScript

Use JSDoc comments to document publicly exposed APIs and types. Place the JSDoc
comments immediately before the statement they apply to. Refer to the
[JSDoc documentation](https://jsdoc.app/) for more information on writing
effective JSDoc comments.

Thank you for your interest in contributing to `deno_generate`! We appreciate
your contributions and look forward to reviewing your pull requests.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Ethan Davidson
Copyright (c) 2023 Ethan Davidson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 1a310e7

Please sign in to comment.