2.0.1 • Published 5 years ago

the-refactor v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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

2.0.1

5 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago