Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
fix test filenames and directories
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Oct 22, 2017
1 parent 6c9c8a1 commit b6fd05e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
"complete": function(data, {logger}) {
// Rename to be compatible with styleguide configuration
const cmpDir = data.inPlace?'src/Component':path.resolve(data.destDirName, 'src/Component');
const testDir = data.inPlace?'test':path.resolve(data.destDirName, 'test');
fs.renameSync(
path.resolve(cmpDir, 'Component.vue'),
path.resolve(cmpDir, data.name + '.vue')
Expand All @@ -35,6 +36,10 @@ module.exports = {
cmpDir,
path.resolve(cmpDir, '../', data.name)
);
fs.renameSync(
path.resolve(testDir, 'specs/Component.spec.js'),
path.resolve(testDir, 'specs/' + data.name + '.spec.js')
);

logger.log("To get started:");
if (!data.inPlace) logger.log("cd " + data.destDirName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Vue from 'vue';
import Component from '@/components/{{ name }}';
import Component from '@/src/{{ name }}/{{ name }}';

describe('{{ name }}.vue', () => {
it('should render correct contents', () => {
Expand Down

0 comments on commit b6fd05e

Please sign in to comment.