Skip to content

afeiship/next-path-parse

Repository files navigation

next-path-parse

Parse path for next.

version license size download

installation

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

usage

import '@jswork/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'
}
*/

license

Code released under the MIT license.

About

Parse path for next.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published