@start/plugin-rename
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

🔠 plugin-rename

Rename files.

Install

$ yarn add --dev @start/plugin-rename

Usage

Signature

rename(callback: (file: string) => string)

Example

import sequence from '@start/plugin-sequence'
import find from '@start/plugin-find'
import read from '@start/plugin-read'
import babel from '@start/plugin-lib-babel'
import rename from '@start/plugin-rename'
import write from '@start/plugin-write'

const babelConfig = {
  // …
  babelrc: false,
  sourceMap: true,
}

export const task = () =>
  sequence(
    find('src/*.ts'),
    read,
    babel(babelConfig),
    rename((file) => file.replace(/\.ts$/, '.js')),
    write('build/')
  )

/@start/plugin-rename/

    Package Sidebar

    Install

    npm i @start/plugin-rename

    Weekly Downloads

    18

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.68 kB

    Total Files

    5

    Last publish

    Collaborators

    • fosimus
    • psxcode
    • deepsweet