Skip to content

Commit

Permalink
Remove files.copy() shared task
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 12, 2023
1 parent d037f4a commit 41dcb24
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions shared/tasks/files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { mkdir, writeFile } from 'fs/promises'
import { dirname, join, parse } from 'path'

import config from '@govuk-frontend/config'
import cpy from 'cpy'
import slash from 'slash'

/**
* Write `packages/govuk-frontend/package.json` version to file
Expand Down Expand Up @@ -42,17 +40,6 @@ export async function write(assetPath, { destPath, filePath, fileContents }) {
await writeFile(assetDestPath, `${await fileContents()}\n`)
}

/**
* Copy files task
* Copies files to destination
*
* @param {string} pattern - Minimatch pattern
* @param {Pick<AssetEntry[1], "srcPath" | "destPath">} options - Asset options
*/
export async function copy(pattern, { srcPath, destPath }) {
await cpy([slash(join(srcPath, pattern))], destPath, { cwd: srcPath })
}

/**
* @typedef {import('./assets.mjs').AssetEntry} AssetEntry
*/

0 comments on commit 41dcb24

Please sign in to comment.