UNPKG

cevuel-cli

Version:

Create element-ui project with vue<br/> Help you build a new project faster with configuration and title

23 lines (19 loc) 429 B
#!/usr/bin/env node const os = require('os'); function getOsType() { switch (os.platform()) { case 'win32': return 'win'; default: return 'mac'; } } function getFileName(path) { const splitF = getOsType() === 'win' ? '\\' : '/'; const arr = path.split(splitF); return arr[arr.length - 1]; } module.exports = { getFileName, getOsType }