Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

start-runner/rename

Repository files navigation

start-rename

npm linux build windows build coverage deps

Rename task for Start.

Install

npm install --save-dev start-rename
# or
yarn add --dev start-rename

Usage

import start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import clean from 'start-clean';
import less from 'start-less';
import rename from 'start-rename';
import write from 'start-write';

export const build = () => start(reporter())(
  files('build/'),
  clean(),
  files('lib/**/*.less'),
  less(),
  rename((file) => file.replace(/\.less$/, '.css')),
  write('build/')
);

This task relies on [{ path, data, map }] input and provides the same, see documentation for details.

Arguments

rename(callback)

  • callback(file) – function called with an absolute file path. Must return new (modified) absolute file path or a Promise with it.