-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
254 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ export { load } from "https://deno.land/[email protected]/dotenv/mod.ts"; | |
export { Secret } from "https://deno.land/x/[email protected]/prompt/secret.ts"; | ||
import dir from "https://deno.land/x/[email protected]/mod.ts"; | ||
export { dir }; | ||
export { walkSync } from "https://deno.land/std@0.208.0/fs/walk.ts"; | ||
export { walkSync, walk } from "https://deno.land/std@0.210.0/fs/walk.ts"; | ||
export type { WalkEntry } from "https://deno.land/[email protected]/fs/walk.ts"; | ||
export { | ||
BlobReader, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
import { | ||
walkSync, | ||
ZipWriter, | ||
BlobWriter, | ||
brightGreen, | ||
wait, | ||
} from "../../deps.ts"; | ||
import { walk, ZipWriter, BlobWriter, brightGreen, wait } from "../../deps.ts"; | ||
import { isLogged, getAccessToken } from "../utils.ts"; | ||
import { validatePackage, validateConfigFiles } from "../validate.ts"; | ||
import "https://deno.land/x/[email protected]/mod.ts"; | ||
|
@@ -23,7 +17,7 @@ const publish = async () => { | |
|
||
const accessToken = getAccessToken(); | ||
|
||
const entries = walkSync(".", { | ||
const entries = walk(".", { | ||
skip: parseIgnoredFiles(), | ||
}); | ||
const paths = []; | ||
|
@@ -94,15 +88,17 @@ const publish = async () => { | |
|
||
const parseIgnoredFiles = () => { | ||
let ignoredFilesArray: RegExp[] = [ | ||
new RegExp(".git"), | ||
new RegExp(".fluentci"), | ||
new RegExp("\\.git"), | ||
new RegExp("\\.fluentci"), | ||
]; | ||
try { | ||
// verify if .fluentciignore exists | ||
if (Deno.statSync(".fluentciignore").isFile) { | ||
const ignoredFiles = Deno.readTextFileSync(".fluentciignore"); | ||
ignoredFilesArray = ignoredFilesArray.concat( | ||
ignoredFiles.split("\n").map((file) => new RegExp(file)) | ||
ignoredFiles | ||
.split("\n") | ||
.map((file) => new RegExp(file.replace(".", "\\."))) | ||
); | ||
} | ||
} catch (_e) { | ||
|