Skip to content

Commit

Permalink
Merge 19573bb into 56edb92
Browse files Browse the repository at this point in the history
  • Loading branch information
Val-istar-Guo committed Jul 5, 2019
2 parents 56edb92 + 19573bb commit 814df96
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,13 @@
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"ava": "^2.1.0",
"awesome-typescript-loader": "^5.2.1",
"commitizen": "^3.1.1",
"coveralls": "^3.0.4",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^6.0.1",
"husky": "^2.7.0",
"lint-staged": "^8.2.1",
"npm": "^6.9.2",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"proxyquire": "^2.1.0",
"rollup": "^1.16.3",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-json": "^4.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export { default as extractArea } from './extract-area'
export { default as mustache } from './mustache'
export { default as ignoreWhen } from './ignore-when'
export { default as deleteWhen } from './delete-when'
export { default as rename } from './rename'
15 changes: 15 additions & 0 deletions src/handlers/rename.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Handler, FileGenerator, PathGenerator } from '@/internal'
import { parse, format } from 'path'


const genFile: FileGenerator = async() => {}

export default newName => {
const genPath: PathGenerator = async path => {
const p = parse(path)
p.base = newName
return format(p)
}

new Handler(genFile, genPath)
}

0 comments on commit 814df96

Please sign in to comment.