@mvxiv/scaffold
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -5,10 +5,9 @@ #!/usr/bin/env node | ||
import { resolve as pathResolve } from 'node:path'; | ||
import { pascalCaseToKebabCase } from './utils'; | ||
import { ComponentNameException } from './exceptions'; | ||
import { pascalCaseToKebabCase } from './lib/utils.js'; | ||
import { ComponentNameException } from './lib/exceptions.js'; | ||
import { COMPONENTS_PATH } from './lib/constants.js'; | ||
import { newVueBoilerPlate, newTestBoilerplate, newSCSSBoilerPlate } from './lib/templates.js'; | ||
const [componentName] = process.argv.slice(2); | ||
async function createComponent(componentName) { | ||
@@ -15,0 +14,0 @@ if(componentName === undefined) throw new ComponentNameException('Enter a component name!'); |
@@ -1,2 +0,2 @@ | ||
const newVueBoilerPlate = (componentName) => | ||
export const newVueBoilerPlate = (componentName) => | ||
`<script setup lang="ts"> | ||
@@ -16,3 +16,3 @@ | ||
const newTestBoilerplate = (componentName) => | ||
export const newTestBoilerplate = (componentName) => | ||
`import { describe, it } from 'vitest'; | ||
@@ -26,7 +26,7 @@ import { mount, VueWrapper } from '@vue/test-utils'; | ||
const newSCSSBoilerPlate = (componentName) => | ||
export const newSCSSBoilerPlate = (componentName) => | ||
`@import '@scss/utils.scss'; | ||
.${pascalCaseToKebabCase(componentName)} { | ||
.${componentName} { | ||
// | ||
}` |
{ | ||
"name": "@mvxiv/scaffold", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "scaffolding vue components", | ||
@@ -5,0 +5,0 @@ "type": "module", |
4307
56