Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std: add ignore parser for std/prettier #3399

Merged
merged 2 commits into from
Nov 26, 2019
Merged

std: add ignore parser for std/prettier #3399

merged 2 commits into from
Nov 26, 2019

Conversation

axetroy
Copy link
Contributor

@axetroy axetroy commented Nov 24, 2019

ignore parser to parse ignore files like .gitignore/.npmignore/.prettierignore

Because it parses .prettierignore in the std/prettier

deno/std/prettier/main.ts

Lines 479 to 486 in c6bb3d5

async function resolveIgnoreFile(filepath: string): Promise<string[]> {
const raw = new TextDecoder().decode(await Deno.readFile(filepath));
return raw
.split("\n")
.filter((v: string) => !!v.trim() && v.trim().indexOf("#") !== 0)
.map(v => v);
}

so I think it can be isolated

std/encoding/ignore.ts Outdated Show resolved Hide resolved
@axetroy axetroy changed the title std: add encoding/ignore parser std: add ignore parser for std/prettier Nov 25, 2019
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 2a34814 into denoland:master Nov 26, 2019
@axetroy axetroy deleted the encoding_ignore branch November 26, 2019 16:08
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Dec 28, 2019
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants