Upgrade to Pro — share decks privately, control downloads, hide ads and more …

サクッと簡単!お手軽 Scaffold

サクッと簡単!お手軽 Scaffold

KeitaroOkamura

March 08, 2019
Tweet

More Decks by KeitaroOkamura

Other Decks in Technology

Transcript

  1. αΫοͱ؆୯ʂ͓खܰ4DBGGPME ( & & , 4  8 ) 0

     % 3 * / ,  * /  ' 6 , 6 0 , "   ' 3 0 / 5  & / %  & % * 5 * 0 /             
  2. ΍Γ͍ͨ͜ͱ ‣ ίϯϙʔωϯτͷ4DBGGPMEΛίϚϯυ͔Βੜ੒͍ͨ͠ʂ ‣ ੜ੒ϩδοΫςϯϓϨʔτ͕ϝϯςφϯε͠΍͍͢͜ͱ ‣ ίϯϙʔωϯτϑΝΠϧ WVF ͕࡞ΒΕΔ ‣

    ςετʢ+FTUʣϑΝΠϧ͕࡞ΒΕΔ ‣ 4UPSZCPPLͷϑΝΠϧ͕࡞ΒΕΔ ‣ "UPNJD%FTJHOͷཻ౓͕1BHFTͷ৔߹ɺϧʔςΟϯά͕௥Ճ͞ΕΔ
  3. ΍Γ͍ͨ͜ͱ ‣ ίϯϙʔωϯτͷ4DBGGPMEΛίϚϯυ͔Βੜ੒͍ͨ͠ʂ ‣ ੜ੒ϩδοΫςϯϓϨʔτ͕ϝϯςφϯε͠΍͍͢͜ͱ ‣ ίϯϙʔωϯτϑΝΠϧ WVF ͕࡞ΒΕΔ ‣

    ςετʢ+FTUʣϑΝΠϧ͕࡞ΒΕΔ ‣ 4UPSZCPPLͷϑΝΠϧ͕࡞ΒΕΔ ‣ "UPNJD%FTJHOͷཻ౓͕1BHFTͷ৔߹ɺϧʔςΟϯά͕௥Ճ͞ΕΔ )ZHFOͳΒ؆୯ʹͰ͖Δʂ
  4. 5FNQMBUF --- to: "src/components/<%= category %>/<%= name %>/index.vue" --- <template>

    <div/> </template> <script lang="ts"> import Vue from “vue"; export default Vue.extend({ name: "<%= name %>" }); </script> ‣ ςϯϓϨʔτ͸FKTܗࣜͰهड़ɹྫɿίϯϙʔωϯτϑΝΠϧ
  5. 5FNQMBUF --- to: "src/components/<%= category %>/<%= name %>/index.vue" --- <template>

    <div/> </template> <script lang="ts"> import Vue from “vue"; export default Vue.extend({ name: "<%= name %>" }); </script> ‣ ςϯϓϨʔτ͸FKTܗࣜͰهड़ɹྫɿίϯϙʔωϯτϑΝΠϧ IFBE෦෼ʢZBNMܗࣜʣ CPEZ෦෼ʢFKTܗࣜʣ
  6. 1SPNQU ‣ QSPNQUKTʹ഑ྻܗࣜͰJORVJSFSͷϑΥʔϚοτΛॻ͖·͢ ‣ όϦσʔγϣϯͰϢʔβʔͷޡͬͨೖྗΛ๷͙͜ͱ΋Մೳ module.exports = [ { type:

    "input", name: "name", message: "ίϯϙʔωϯτ໊:", validate(value) { if (!value.length) { return "ίϯϙʔωϯτ໊Λೖྗ͍ͯͩ͘͠͞ɻ"; } return true; } },