online
(deming factor)
November 17, 2020, 7:57am
1
New slices created with $ prismic sm --create-slice
show up as <Index>
in Vue Dev Tools.
And the user needs to add name: "SliceName"
within Index.vue to address this.
Since the --create-slice literally gathers the slice name as part of the process, the request is to improve the outputted template code so it auto sets a name based on the slice name provided.
See related question:
Before slicemachine when I made files in /components they show niceley with their names.
And automatic slices provided by you folks also show nice names.
Why do my slices that I create with $ prismic sm --create-slice show as <Index>?
How can I name them?
[Brave_Energy_Systems]
(I'm using Nuxt)
Phil
(Phil Snow)
November 17, 2020, 12:03pm
3
Hey @online ,
I brought this up with the team today and they're already working on updating this template in the CLI:
<template>
<section class="section">
<prismic-rich-text :field="slice.primary.title" class="title" />
<prismic-rich-text :field="slice.primary.description" />
</section>
</template>
<script>
export default {
props: {
slice: {
type: Object,
required: true,
default() {
return {}
}
}
},
}
</script>
<style scoped>
This file has been truncated. show original
Thanks.
1 Like
online
(deming factor)
November 17, 2020, 7:29pm
6
Awesome! Pass on big thanks to the team
1 Like
Phil
(Phil Snow)
closed , flag & select 'Something Else' to reopen.
November 18, 2020, 9:56am
7
This is being tracked as an open feature request.
If you have another use-case for this feature, you can 'Flag' this topic to reopen . Please use the button to show your support for the feature and check out our Feature Request Guidelines .