Skip to content

Commit

Permalink
feat: Support packaging directories (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz authored Apr 10, 2024
1 parent e8f2266 commit 712c803
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 21 deletions.
4 changes: 1 addition & 3 deletions dist/build-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128454,9 +128454,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await promises_.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => external_path_.resolve(external_path_.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => external_path_.resolve(external_path_.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions dist/build-crates-standalone-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128453,9 +128453,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await promises_.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => external_path_.resolve(external_path_.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => external_path_.resolve(external_path_.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions dist/publish-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128476,9 +128476,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await fs.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => path.resolve(path.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => path.resolve(path.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions dist/publish-crates-eclipse-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128473,9 +128473,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await fs.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => path.resolve(path.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => path.resolve(path.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions dist/publish-crates-github-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128454,9 +128454,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await fs.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => path.resolve(path.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => path.resolve(path.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions dist/publish-crates-homebrew-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128475,9 +128475,7 @@ async function dumpTOML(path, obj) {

async function fromDirectory(output, dir, pattern) {
const dirents = await fs.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => path.resolve(path.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => path.resolve(path.join(d.path, d.name)));
fromFiles(output, ...files);
}
function fromFiles(output, ...files) {
Expand Down
4 changes: 1 addition & 3 deletions src/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { sh } from "./command";

export async function fromDirectory(output: string, dir: string, pattern: RegExp) {
const dirents = await fs.readdir(dir, { withFileTypes: true });
const files = dirents
.filter(d => d.isFile() && pattern.test(d.name))
.map(d => path.resolve(path.join(d.path, d.name)));
const files = dirents.filter(d => pattern.test(d.name)).map(d => path.resolve(path.join(d.path, d.name)));

fromFiles(output, ...files);
}
Expand Down

0 comments on commit 712c803

Please sign in to comment.