@feizheng/next-path-parse

1.0.2 • Public • Published

next-path-parse

Parse path for next.

version license size download

installation

npm install -S @feizheng/next-path-parse

usage

import '@feizheng/next-path-parse';


const res = nx.pathParse('/User/feizheng/github/test/build/static/css/8.f96cc274.chunk.css', {
  cwd: '/User/feizheng/github/test/',
  context:'build'
});

/*
{
  cwd: '/User/feizheng/github/test/',
  context: 'build',
  root: '/',
  dir: '/User/feizheng/github/test/build/static/css',
  base: '8.f96cc274.chunk.css',
  ext: '.css',
  name: '8.f96cc274.chunk',
  full: '/User/feizheng/github/test/build/static/css/8.f96cc274.chunk.css',
  parent: 'build/static/css/8.f96cc274.chunk.css',
  relative: 'static/css/8.f96cc274.chunk.css'
}
*/

resources

license

Code released under the MIT license.

/@feizheng/next-path-parse/

    Package Sidebar

    Install

    npm i @feizheng/next-path-parse

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.48 kB

    Total Files

    6

    Last publish

    Collaborators

    • afeiship