aotds-docks/_templates/story/new/index.js

14 lines
378 B
JavaScript
Raw Normal View History

2022-03-26 17:10:11 +00:00
const path = require('path');
module.exports = {
params: ({ args }) => {
const storypath = args.path.replace( '.svelte', '.stories.svelte' );
2022-03-26 18:04:24 +00:00
const component = path.basename(args.path.replace('/index.svelte','')).replace('.svelte','');
const to = path.join(path.dirname(args.path), component + '.stories.svelte' );
return { storypath, component, to}
2022-03-26 17:10:11 +00:00
}
}