Skip to content

Commit d0ed656

Browse files
committed
chore: minor updates
1 parent 846a874 commit d0ed656

File tree

4 files changed

+164
-132
lines changed

4 files changed

+164
-132
lines changed

CODE-OF-CONDUCT.md

+40-11
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and
9+
expression, level of experience, education, socio-economic status, nationality,
10+
personal appearance, race, religion, or sexual identity and orientation.
611

712
## Our Standards
813

9-
Examples of behavior that contributes to creating a positive environment include:
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
1016

1117
- Using welcoming and inclusive language
1218
- Being respectful of differing viewpoints and experiences
@@ -16,31 +22,54 @@ Examples of behavior that contributes to creating a positive environment include
1622

1723
Examples of unacceptable behavior by participants include:
1824

19-
- The use of sexualized language or imagery and unwelcome sexual attention or advances
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
2027
- Trolling, insulting/derogatory comments, and personal or political attacks
2128
- Public or private harassment
22-
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
- Other conduct which could reasonably be considered inappropriate in a professional setting
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
2433

2534
## Our Responsibilities
2635

27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
2839

29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
40+
Project maintainers have the right and responsibility to remove, edit, or reject
41+
comments, commits, code, wiki edits, issues, and other contributions that are
42+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
43+
contributor for other behaviors that they deem inappropriate, threatening,
44+
offensive, or harmful.
3045

3146
## Scope
3247

33-
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
3454

3555
## Enforcement
3656

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project admin at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project admin at [email protected]. All complaints
59+
will be reviewed and investigated and will result in a response that is deemed
60+
necessary and appropriate to the circumstances. The project team is obligated to
61+
maintain confidentiality with regard to the reporter of an incident. Further
62+
details of specific enforcement policies may be posted separately.
3863

39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
4067

4168
## Attribution
4269

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
71+
version 1.4, available at
72+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
4473

4574
[homepage]: https://www.contributor-covenant.org
4675

CONTRIBUTING.md

+29-31
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,69 @@
11
# Contributing
22

3-
Thanks for reaching the project and wanting to improve the extension! This file has few guidelines that will help you along the way.
3+
Thanks for reaching the project and wanting to improve the extension! This file
4+
has few guidelines that will help you along the way.
45

56
## Code of Conduct
67

7-
Please, make sure you read the [Code of Conduct](CODE-OF-CONDUCT.md) file before contributing! It is short, it will not take you much time :wink:!
8+
Please, make sure you read the [Code of Conduct](CODE-OF-CONDUCT.md) file before
9+
contributing! It is short, it will not take you much time :wink:!
810

911
## How to
1012

1113
### Issue
1214

13-
The first thing would be to create an issue, which would notify the contributors. Furthermore, it gives more visibility to the problem or feature and may attract other people on helping. You can propose a solution to the issue by creating a pull request. If you do not feel like contributing, no worries, a maintainer will come to help!
15+
The first thing would be to create an issue, which would notify the
16+
contributors. Furthermore, it gives more visibility to the problem or feature
17+
and may attract other people on helping. You can propose a solution to the issue
18+
by creating a pull request. If you do not feel like contributing, no worries, a
19+
maintainer will come to help!
1420

1521
### Developing
1622

1723
When developing, make sure to following the below steps:
1824

1925
1. Fork the repository.
20-
2. Clone the repository to your local machine, adding the original repo as an upstream remote:
26+
2. Clone the repository to your local machine, adding the original repo as an
27+
upstream remote:
2128

22-
```sh
23-
git clone git@github:<your-name>/dartBarrelFileGenerator.git
24-
# You can also use https
25-
# git clone https://github.com/<your-name>/dartBarrelFileGenereator.git
26-
cd dartBarrelFileGenerator
27-
git remote add upstream https://github.com/mikededo/dartBarrelFileGenerator.git
28-
```
29+
````sh git clone git@github:<your-name>/dartBarrelFileGenerator.git # You can
30+
also use https # git clone
31+
https://github.com/<your-name>/dartBarrelFileGenereator.git cd
32+
dartBarrelFileGenerator git remote add upstream
33+
https://github.com/mikededo/dartBarrelFileGenerator.git ```
2934
3035
3. Synchronize the branch:
3136
32-
```sh
33-
git checkout main
34-
git pull upstream main
35-
```
37+
```sh git checkout main git pull upstream main ```
3638
3739
4. Install all the dependencies:
3840
39-
```sh
40-
yarn
41-
```
41+
```sh yarn ```
4242
4343
5. Create the new branch:
4444
45-
```sh
46-
git checkout -b branch-with-sense
47-
```
45+
```sh git checkout -b branch-with-sense ```
4846
4947
6. Save changes and push to your fork:
5048
51-
```sh
52-
git push -u origin HEAD
53-
```
49+
```sh git push -u origin HEAD ```
5450
55-
7. Create a pull request with your changes. Make sure that your base branch is set to `next`, not `main`.
51+
7. Create a pull request with your changes.
5652
5753
#### Commits
5854
59-
The repository uses semantic commits, since it generates the changelog automatically. Whenever you commit your changes, husky will run the git hooks which will:
55+
Make sure to commit using semantic commits. Also, its recommended to:
6056
61-
1. Check for the linting, using ESLint (see the [config file](.eslintrc.json)).
62-
2. Check for the style and fixing it, using Prettier (see the [config file](.prettierrc)).
63-
3. Prompt you with the commitizen CLI tool. See the semantic commits [documentation](https://www.conventionalcommits.org/en/v1.0.0/) for more info.
57+
- Check for the linting and formatting, using ESLint (see the [config file](.eslintrc.json)).
58+
- Add a changeset to your changes, with `bun changeset`.
6459
6560
#### Merging a PR
6661
67-
After your code has been reviewed and approved, one of the administrators will squash the changes to the base branch.
62+
After your code has been reviewed and approved, one of the administrators will
63+
squash the changes to the base branch.
6864
6965
## License
7066
71-
By contributing your code to this repository, you agree to license your contribution under the [MIT License](LICENSE).
67+
By contributing your code to this repository, you agree to license your
68+
contribution under the [MIT License](LICENSE).
69+
````

README.md

+2-90
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,5 @@
11
# Dart Barrel File Generator
22

3-
VSCode extension that generate barrel files for folders containing dart files.
3+
![Logo](./packages/vscode/assets/logo.png)
44

5-
## Installation
6-
7-
Dart Barrel File Generator either by
8-
[searching for the extension in VSCode](https://code.visualstudio.com/docs/editor/extension-gallery#_search-for-an-extension)
9-
or from the [marketplace](https://marketplace.visualstudio.com/).
10-
11-
## Overview
12-
13-
It can create barrel files only two the selected folder
14-
15-
![this-folder](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-only.gif)
16-
17-
It creates a barrel file for the selected folder and all the nested folders from
18-
the selected. Likewise, it also adds the nested folder barrel file to its parent
19-
barrel file.
20-
21-
![folders-recursive](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-and-nested.gif)
22-
23-
Alternatively, the extension can create a barrel file with all the names of the
24-
nested folders (for each subfolder), without creating additional barrel files.
25-
26-
![folders-files-recursive](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-with-subfolders.gif)
27-
28-
## Commands
29-
30-
| Command | Description |
31-
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------ |
32-
| `GDBF: This folder` | Creates a barrel file for the selected folder |
33-
| `GDBF: Folders (recursive)` | Creates a barrel file for the selected and its nested folders |
34-
| `GDBF: Folders' files (recursive)` | Creates a barrel file for the selected exporting all files with the entire path |
35-
| `GDBF: Focused (parent)` | Through the command palette and when focusing the editor, generates a barrel file to the focused file parent |
36-
37-
Both commands can be used by typing in the command palette. It will then ask you to
38-
choose a folder. If it is done from the folder tree, it will use the selected
39-
folder as the root folder.
40-
41-
## Options
42-
43-
### Excluding files
44-
45-
You can also exclude `.freezed.dart` and `.g.dart` (generated) files by modifying the
46-
following options in your settings:
47-
48-
- `dartBarrelFileGenerator.excludeFreezed: false` (by default).
49-
- `dartBarrelFileGenerator.excludeGenerated: false` (by default).
50-
51-
It is also possible to exclude glob patterns:
52-
53-
- For files, you can add a list of file globs in the `dartBarrelFile.excludeFileList`
54-
option.
55-
- For directories, you can add a list of directories globs in the
56-
`dartBarrelFile.excludeDirList` option.
57-
58-
### Default barrel file name
59-
60-
The extension will create a barrel file with the `<folder-name>.dart` by default. This
61-
behaviour can be changed if the `dartBarrelFileGenerator.defaultBarrelName` option is
62-
set. By changing this option, whenever a barrel file is created, it will use the name
63-
set in the configuration instead of the default.
64-
65-
> **Note**: If the name contains any white-space, such will be replaced by `_`.
66-
67-
### Custom file name
68-
69-
By default, the extension will create a new file named as the folder name, appended by
70-
the `.dart` extension. However, if you want to set the name, you can activate the
71-
following option:
72-
73-
- `dartBarrelFileGenerator.promptName: false` (by default).
74-
75-
Whenever you create a new barrel file, a prompt will appear to ask for the file name.
76-
It can be used for both options.
77-
78-
> **Note**: When entering the name, the `.dart` extension is not required.
79-
80-
### Other options
81-
82-
- Skipping empty folders: by default, `dartBarrelFileGenerator` will not
83-
generate a barrel file for a folder that does not have any file to export. You
84-
can change this behaviour by setting `dartBarrelFileGenerator.skipEmpty` to
85-
`false`.
86-
- Exporting as `package:<app-name>/` if the extension is executed in the `./lib`
87-
folder. Enable it by setting
88-
`dartBarrelFileGenerator.prependPackageLibToExport` to `true`. Disabled by
89-
default.
90-
91-
## Attributions
92-
93-
Extension icon made by [Freepik](https://www.flaticon.com/authors/freepik) from [flaticon](www.flaticon.com).
5+
Monorepo for the VSCode and (WIP) cli to generate and maintain Dart barrel files

packages/vscode/README.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Dart Barrel File Generator
2+
3+
VSCode extension that generate barrel files for folders containing dart files.
4+
5+
## Installation
6+
7+
Dart Barrel File Generator either by
8+
[searching for the extension in VSCode](https://code.visualstudio.com/docs/editor/extension-gallery#_search-for-an-extension)
9+
or from the [marketplace](https://marketplace.visualstudio.com/).
10+
11+
## Overview
12+
13+
It can create barrel files only two the selected folder
14+
15+
![this-folder](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-only.gif)
16+
17+
It creates a barrel file for the selected folder and all the nested folders from
18+
the selected. Likewise, it also adds the nested folder barrel file to its parent
19+
barrel file.
20+
21+
![folders-recursive](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-and-nested.gif)
22+
23+
Alternatively, the extension can create a barrel file with all the names of the
24+
nested folders (for each subfolder), without creating additional barrel files.
25+
26+
![folders-files-recursive](https://raw.githubusercontent.com/mikededo/dartBarrelFileGenerator/master/assets/current-with-subfolders.gif)
27+
28+
## Commands
29+
30+
| Command | Description |
31+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------ |
32+
| `GDBF: This folder` | Creates a barrel file for the selected folder |
33+
| `GDBF: Folders (recursive)` | Creates a barrel file for the selected and its nested folders |
34+
| `GDBF: Folders' files (recursive)` | Creates a barrel file for the selected exporting all files with the entire path |
35+
| `GDBF: Focused (parent)` | Through the command palette and when focusing the editor, generates a barrel file to the focused file parent |
36+
37+
Both commands can be used by typing in the command palette. It will then ask you to
38+
choose a folder. If it is done from the folder tree, it will use the selected
39+
folder as the root folder.
40+
41+
## Options
42+
43+
### Excluding files
44+
45+
You can also exclude `.freezed.dart` and `.g.dart` (generated) files by modifying the
46+
following options in your settings:
47+
48+
- `dartBarrelFileGenerator.excludeFreezed: false` (by default).
49+
- `dartBarrelFileGenerator.excludeGenerated: false` (by default).
50+
51+
It is also possible to exclude glob patterns:
52+
53+
- For files, you can add a list of file globs in the `dartBarrelFile.excludeFileList`
54+
option.
55+
- For directories, you can add a list of directories globs in the
56+
`dartBarrelFile.excludeDirList` option.
57+
58+
### Default barrel file name
59+
60+
The extension will create a barrel file with the `<folder-name>.dart` by default. This
61+
behaviour can be changed if the `dartBarrelFileGenerator.defaultBarrelName` option is
62+
set. By changing this option, whenever a barrel file is created, it will use the name
63+
set in the configuration instead of the default.
64+
65+
> **Note**: If the name contains any white-space, such will be replaced by `_`.
66+
67+
### Custom file name
68+
69+
By default, the extension will create a new file named as the folder name, appended by
70+
the `.dart` extension. However, if you want to set the name, you can activate the
71+
following option:
72+
73+
- `dartBarrelFileGenerator.promptName: false` (by default).
74+
75+
Whenever you create a new barrel file, a prompt will appear to ask for the file name.
76+
It can be used for both options.
77+
78+
> **Note**: When entering the name, the `.dart` extension is not required.
79+
80+
### Other options
81+
82+
- Skipping empty folders: by default, `dartBarrelFileGenerator` will not
83+
generate a barrel file for a folder that does not have any file to export. You
84+
can change this behaviour by setting `dartBarrelFileGenerator.skipEmpty` to
85+
`false`.
86+
- Exporting as `package:<app-name>/` if the extension is executed in the `./lib`
87+
folder. Enable it by setting
88+
`dartBarrelFileGenerator.prependPackageLibToExport` to `true`. Disabled by
89+
default.
90+
91+
## Attributions
92+
93+
Extension icon made by [Freepik](https://www.flaticon.com/authors/freepik) from [flaticon](www.flaticon.com).

0 commit comments

Comments
 (0)