1.0.0 • Published 5 years ago

@jswork/next-path-parse v1.0.0

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

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.