This package has been deprecated

Author message:

move to @the-/refactor ( https://github.com/the-labo/the/tree/master/packages/refactor#readme )

the-refactor

2.0.1 • Public • Published

the-refactor

Build Status npm Version JS Standard

Refactoring tool for the-components

Installation

$ npm install the-refactor --save

Usage

'use strict'
 
const {TheRefactor} = require('the-refactor')
 
async function tryExample () {
  const refactor = new TheRefactor()
 
  // Example to rename "src/controllers/foo.js" into "src/serverside/fooCtrl.mjs"
  await refactor.rename('src/controllers/*.js', ({
                                                   basename,
                                                   dirname,
                                                   extname,
                                                 }) => ({
      dirname: 'src/serverside',
      basename: /Ctrl$/.match(basename) ? basename : `${basename}Ctrl`,
      extname: '.mjs',
    })
  )
}
 
tryExample().catch((err) => console.error(err))
 

API Guide

License

This software is released under the MIT License.

Links

/the-refactor/

    Package Sidebar

    Install

    npm i the-refactor

    Weekly Downloads

    16

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    119 kB

    Total Files

    36

    Last publish

    Collaborators

    • okunishinishi