JSPM

rename-path

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q39344F

Return a mapped dest for a src a filepath.

Package Exports

  • rename-path

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rename-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rename-path NPM version

Return a mapped dest for a src a filepath.

Install

Install with npm:

npm i rename-path --save-dev

Usage

var rename = require('rename-paths');
var filepath = 'a/b/c.js';

console.log(rename(filepath, {ext: '.min.js'}));
//=> 'a/b/c.min.js'

console.log(rename(filepath, {destBase: 'dist', ext: '.min.js'}));
//=> 'dist/a/b/c.min.js'

console.log(rename(filepath, {flatten: true, ext: '.min.js'}));
//=> 'c.min.js'

See the tests for more examples.

Tests

In the command line, run:

mocha

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on June 28, 2014.