<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[st-sanyanee - Medium]]></title>
        <description><![CDATA[Developer Blog - Medium]]></description>
        <link>https://medium.com/st-sanyanee?source=rss----ca1de7e9ee2e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>st-sanyanee - Medium</title>
            <link>https://medium.com/st-sanyanee?source=rss----ca1de7e9ee2e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:36:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/st-sanyanee" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[How to] วิธี deploy website ขึ้น web hosting ด้วย Firebase ฟรี !]]></title>
            <link>https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5-deploy-website-%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-web-hosting-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-firebase-%E0%B8%9F%E0%B8%A3%E0%B8%B5-113c11cc7455?source=rss----ca1de7e9ee2e---4</link>
            <guid isPermaLink="false">https://medium.com/p/113c11cc7455</guid>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[st.nann]]></dc:creator>
            <pubDate>Sat, 19 Aug 2017 08:35:15 GMT</pubDate>
            <atom:updated>2017-08-19T08:34:31.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qkTKmvomK6oYgUxXJt4Yuw.png" /></figure><p><em>เมื่อเราเขียน website แล้ว หลายคนก็อยากที่จะ deploy website ขึ้นไปยัง web hosting เพื่อให้คนอื่นสามารถเข้าถึง website ได้ วันนี้เราเลยจะมาแนะนำให้รู้จักกับ </em><strong><em>Firebase</em></strong><em> ซึ่ง Firebase นั้นมี feature ให้ชาว Dev ทั้งหลาย ได้ deploy website ขึ้นไปยัง web hosting กันแบบ</em><strong><em>ฟรีๆ</em></strong><em> แต่ก่อนที่เราจะไปถึงขั้นตอนนั้น เรามาทำความรู้จักกับ Firebase ก่อนดีกว่า ว่ามีสามารถทำอะไรบ้าง</em></p><blockquote><strong><em>Firebase</em></strong> เป็นบริการใหม่จาก Google ซึ่งจะมี tools ต่างๆมากมาย เพื่อให้ชาว developer ได้ใช้งานกัน (แต่ในที่นี้จะขอพูดถึงแต่ hosting เท่านั้น) ซึ่งตัว hosting นี้จะเหมาะกับ Front-end Developer เนื่องจาก website ที่จะสามารถ deploy ขึ้น web hosting ได้นั้น จะต้องเป็น website แบบ static (HTML, Java script, CSS) ไม่สามารถนำ website ที่เป็นฝั่ง server (php, script, …) ขึ้นไปใช้งานได้</blockquote><blockquote><strong><em>Web Hosting</em></strong> <em>คือผู้ให้บริการในส่วนของการเช่าพื้นที่บน server ในการฝาก website ซึ่งจะ online ตลอด 24 ชม. เพื่อให ้end user เข้าชม website online ได้ตลอดเวลา</em></blockquote><h3>ขั้นตอนการ deploy website ขึ้น web hosting ด้วย Firebase</h3><ol><li><strong>สมัคร</strong> Account ของ Google ด้วย E-mail “…@gmail.com” (<a href="https://accounts.google.com/SignUp?hl=en"><strong>https://accounts.google.com/SignUp?hl=en</strong></a>)</li><li>เมื่อสมัครเรียบร้อยแล้วให้ทำการ <strong>Login</strong> เข้าสู่ระบบ</li><li>เข้าหน้า Website ของ <strong>Firebase</strong> (<a href="https://firebase.google.com/"><strong>https://firebase.google.com/</strong></a>) คลิก <strong>GET STARTED</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tDGy9BpIpWfWdhX-8m2LQQ.png" /></figure><p>4. คลิก <strong>Add Project</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sV9szEBeDPAqq1l3H8CkNA.png" /></figure><p>5. ทำการ<strong> Create Project</strong> โดยกรอกชื่อ Project และประเทศของผู้ใช้งาน แล้วคลิก <strong>CREATE PROJECT</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lfbvgz65-3im4lMBljAm4A.png" /></figure><p>6. จะเข้ามาสู่หน้า <strong>Overview</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2cCo8pls791-dTMhgSTUQ.png" /></figure><p>7. เลือก <strong>Hosting</strong> ทาง tab ด้านซ้าย แล้วคลิก <strong>GET STARTED</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qMv9SGay_RumosTqy3BzMA.png" /></figure><p>8. จะแสดงหน้า Command ในการ <strong>Setup hosting</strong> ขึ้นมา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXAnP7TcBg_mQOvVCz-FLg.png" /></figure><p>9. พิมพ์ Command ที่แสดงบน website firebase เพื่อ<strong>ติดตั้ง tool firebase</strong> ใน project ของเรา</p><blockquote>$ npm install -g firebase-tools</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*MOFEjxzaj09sAqdq4avh1w.jpeg" /></figure><p>10. ทำการ<strong> build project</strong> โดยพิมพ์ Command ด้านล่าง เมื่อ build เมื่อ build เรียบร้อยแล้วจาะมี <strong>folder dist</strong> เพิ่มขึ้นมาใน Project</p><blockquote>$ npm run build</blockquote><p>หรือ</p><blockquote>$ yarn build</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*-D5hp4KRBDkc3R7QHIuLHQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*qIiatvsZd26ML3STPwaqyA.jpeg" /></figure><p>11. หลังจากลง firebase tool และ build แล้ว ให้คลิก <strong>CONTINUE </strong>ที่หน้า website firebase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXklf2OlliPJw0HEPLT4pw.png" /></figure><p>12. ทำการ <strong>Login Google Account</strong> ใน Project โดยพิมพ์ Command ตามที่แสดงบน website firebase</p><blockquote>$ firebase login</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*m-lXlqQBhP631CqpAK_X5A.jpeg" /></figure><p>พิมพ์ <strong>Y </strong>แล้วกด <strong>Enter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ea-8_n3oqZ6qHQBe5XIigw.jpeg" /></figure><p>จะแสดงหน้า <strong>website</strong> ให้ login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bKRU0ntVcteM4SvEt-XJbA.png" /></figure><p>หลังจาก Login เรียบร้อยแล้ว จะแสดง ui ให้คลิก<strong> ALLOW</strong> firebase</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QdzQrkgMfYCIeDZtnfzWOA.png" /></figure><p>ถ้าแสดงหน้า website ตามรูปด้านล่าง แสดงว่า Login ได้สำเร็จ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxLlLbp51QZblxeEsWl_bA.png" /></figure><p>และ Command ใน project แสดงตามรูปด้านล่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0eTRG6HoWG3nB7obN9zWA.jpeg" /></figure><p>13. หลังจากนั้น ให้ทำการสร้าง <strong>project init firebase</strong> ใน Project โดยพิมพ์ Command</p><blockquote>$ firebase init</blockquote><p>เลือก <strong>Hosting: Configure and deploy Firebase Hosting site</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*VHAafD9my-gref7GO-pO-g.jpeg" /></figure><p>เลือก<strong>ชื่อ Project</strong> ตามที่ได้สร้างไว้ในข้อ 5 ในที่นี้คือ my-portfolio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*NeRKbkvXz9BM-iBS3GJudg.jpeg" /></figure><p>จากนั้นรอ ให้ firebase สร้าง file เมื่อเสร็จเรียบร้อยแล้วจะได้มา 2 file คือ <strong>firebase.json </strong>และ <strong>.firebaserc</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZqT5-qOQKsm7NSPXg_kqw.jpeg" /></figure><p>14. Double click <strong>firebase.json</strong> file เพื่อแก้ไข configuration ในการ deploy ตามด้านล่าง</p><pre>{<br>  &quot;hosting&quot;: {<br>    &quot;public&quot;: &quot;./dist&quot;,<br>    &quot;ignore&quot;: [<br>      &quot;firebase.json&quot;,<br>      &quot;**/.*&quot;,<br>      &quot;**/node_modules/**&quot;<br>    ],<br>    &quot;rewrites&quot;: [ {<br>      &quot;source&quot;: &quot;**&quot;,<br>      &quot;destination&quot;: &quot;/index.html&quot;<br>    } ]<br>  }<br>}</pre><p>โดย</p><blockquote><strong><em>public</em></strong> คือ path folder ที่ต้องการ deploy (ในที่นี้คือ folder dist ที่ได้จากการ build Project)</blockquote><blockquote><strong><em>ignore</em></strong> คือ ไฟล์ที่ไม่ต้องการนำขึ้นไปัง server</blockquote><blockquote><strong><em>rewrites</em></strong> คือ ส่วนที่ใช้ในการ config หน้า website 404 (Page not found)</blockquote><p>14. หลังจากนั้น ทำการ deploy project ขึ้น website โดยใช้ command</p><blockquote>$ firebase deploy</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*bmgCPFaExeLMiiSkd-hSQg.jpeg" /></figure><p>15. หาก deploy สำเร็จ ให้ตรวจสอบที่หน้า website จะมี <strong>link project</strong> ที่ deploy ขึ้นไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-dmv3QJ1kdRB-ICfjfniw.png" /></figure><p>16. คลิกที่ <strong>link Domain</strong> จะแสดงหน้า website ของเรา เป็นอันเสร็จเรียบร้อย เช่น <a href="https://my-portfolio-ef29f.firebaseapp.com/"><strong>https://my-portfolio-ef29f.firebaseapp.com/</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TAFfSRCHlDfcjcvhl0A9Vw.jpeg" /></figure><p><strong>Note</strong>: วิธี <strong>logout</strong> Google Account ให้พิมพ์ Command</p><blockquote>$ firebase logout</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*jyHYkeApOuYGY_Rixxm39Q.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113c11cc7455" width="1" height="1" alt=""><hr><p><a href="https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5-deploy-website-%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-web-hosting-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-firebase-%E0%B8%9F%E0%B8%A3%E0%B8%B5-113c11cc7455">[How to] วิธี deploy website ขึ้น web hosting ด้วย Firebase ฟรี !</a> was originally published in <a href="https://medium.com/st-sanyanee">st-sanyanee</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[How to] วิธีการใช้งาน Vue.js ร่วมกับ Vuetify]]></title>
            <link>https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-vue-js-%E0%B8%A3%E0%B9%88%E0%B8%A7%E0%B8%A1%E0%B8%81%E0%B8%B1%E0%B8%9A-vuetify-318e41071ca0?source=rss----ca1de7e9ee2e---4</link>
            <guid isPermaLink="false">https://medium.com/p/318e41071ca0</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[user-interface-design]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[frontend-developer]]></category>
            <category><![CDATA[vuetify]]></category>
            <dc:creator><![CDATA[st.nann]]></dc:creator>
            <pubDate>Mon, 14 Aug 2017 04:53:30 GMT</pubDate>
            <atom:updated>2017-10-05T14:35:47.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dA0K8ZQ4yQn1Ld4JQBG4ug.png" /></figure><p><em>ก่อนที่เราจะรู้วิธีการใช้งาน เรามาทำความรู้จักกับ VueJs และ Vuetify กันก่อนดีกว่าค่ะ (หากใครรู้แล้วข้ามส่วนนี้ได้เลยนะคะ)</em></p><blockquote><strong><em>VueJs หรือ Vue.js</em></strong> เป็น Javascript Framework สำหรับ Front-end ที่ใช้ในการเขียน User Interface (UI) เพื่อแสดงผลให้กับผู้ใช้งาน สามารถเขียนโดยแบ่งเ็น component แต่ละส่วนได้</blockquote><blockquote><strong><em>Vuetify</em></strong><em> </em>เป็น Material Design Component Framework สำหรับ Vue.js เพื่อใช้ในการปรับแต่งหน้า User Interface (UI) ให้สวยงาม</blockquote><p>หลังจากเราได้รู้จักกับ Framework ทั้ง 2 Framework ไปแล้ว เรามาเริ่มพูดถึงวิธีการใช้งานดีกว่าค่ะ</p><h3><strong>Installation VueJs</strong></h3><ol><li>Install <strong>vue-cli</strong> ของ Vue.js ซึ่งเป็นตัวช่วยสร้าง Project</li></ol><blockquote>$ npm install -g vue-cli</blockquote><p>2. Install <strong>Webpack</strong> ของ Vue.js ซึ่งเป็น Template ในการสร้าง Project โดยการ install webpack จะรวมการ install ส่วนต่างๆเอาไว้ ทำให้ไม่ต้องไป install ทีละตัว เช่น Webpack, vue-loader, ESLint, Unit test, end-to-end Test, SASS และอื่นๆอีกมากมาย ในที่นี้เลือก <strong>webpack-simple-2.0</strong> เนื่องจาก webpack-simple-2.0 <strong>สนับสนุน Vue.js 2.0</strong></p><blockquote>$ vue init webpack</blockquote><p><strong>หมายเหตุ</strong>: ในส่วนของ ESLint สามารถดูรายละเอียดเพิ่มเติมได้จาก<br><a href="https://stories.sellsuki.co.th/javascript-standard-style-%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0%E0%B8%84%E0%B8%A3%E0%B8%B1%E0%B8%9A-%E0%B8%88%E0%B8%B0%E0%B9%84%E0%B8%94%E0%B9%89%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A3%E0%B8%B0%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%84%E0%B8%99%E0%B8%AD%E0%B8%B7%E0%B9%88%E0%B8%99-a2622578631d">https://stories.sellsuki.co.th/javascript-standard-style-%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0%E0%B8%84%E0%B8%A3%E0%B8%B1%E0%B8%9A-%E0%B8%88%E0%B8%B0%E0%B9%84%E0%B8%94%E0%B9%89%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A3%E0%B8%B0%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%84%E0%B8%99%E0%B8%AD%E0%B8%B7%E0%B9%88%E0%B8%99-a2622578631d</a></p><p>ถึงขั้นตอนนี้ให้ทำการ run หน้า website เพื่อทดสอบการติดตั้ง Vue.js โดยใช้คำสั่ง</p><blockquote>$ npm install และ</blockquote><blockquote>$ npm run dev หรือ</blockquote><blockquote>$ yarn dev (หากทำการ install yarn แล้ว)</blockquote><p>ซึ่งจะแสดงหน้า website <a href="http://localhost:8080/">http://localhost:8080</a> ดังนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XkXNPKqaNXGh7vqPPv1unQ.png" /></figure><h3>Installation Vuetify และ Style</h3><ol><li>Install <strong>vuetify</strong> โดยทำการ save ลง dependencies</li></ol><blockquote>$ npm install vuetify --save หรือ</blockquote><blockquote>$ yarn add vuetify --dev (หากทำการ install yarn แล้ว)</blockquote><p>2. Install <strong>Stylus, CSS</strong> เพื่อให้ใช้งาน style component ต่างๆของ vuetify ได้</p><blockquote>$ npm i stylus stylus-loader style-loader css-loader --save-dev</blockquote><p><strong>Note</strong>: <em>หากใครต้องการใช้งาน SASS ให้ทำการ Install ตามคำสั่ง ด้านล่าง</em></p><blockquote>$ npm install sass-loader node-sass webpack --save-dev</blockquote><p><strong>Problem</strong>: <em>หากใครพบปัญหาว่า หา babel-preset-env ไม่พบ ให้ทำการ install ตามคำสั่งด้านล่าง (ถ้าใครไม่พบปัญา สามารถข้ามขั้นตอนนี้ได้เลยค่ะ)</em></p><blockquote>$ npm install babel-preset-env --save-dev หรือ</blockquote><blockquote>$ yarn add babel-preset-env --save-dev (หากทำการ instal้l yarn แล้ว)</blockquote><h3>Import Vuetify</h3><ol><li>ทำการ import vuetify โดยเพิ่ม code ใน <strong>src &gt; main.js</strong> เพื่อกำหนด style ตามด้านล่าง</li></ol><pre><strong>import </strong>Vuetify <strong>from </strong>&#39;vuetify&#39;</pre><pre>Vue.<em>use</em>(Vuetify)</pre><h3>Import Style</h3><p>1. ทำการสร้างไฟล์ <strong>main.styl</strong> ใน Project โดยสร้างใน <strong>src &gt; styles &gt; main.styl</strong> เพื่อกำหนด style component ต่างๆ และพิมพ์ code ตามด้านล่าง</p><pre>@import &#39;../../node_modules/vuetify/src/stylus/settings/_colors&#39;<br><br>$theme := {<br>  primary: $red.darken-2<br>  accent: $red.accent-2<br>  secondary: $grey.lighten-1<br>  info: $blue.lighten-1<br>  warning: $amber.darken-2<br>  error: $red.accent-4<br>  success: $green.lighten-2<br>}<br><br>@import &#39;../../node_modules/vuetify/src/stylus/main&#39;</pre><p>2.ทำการ import style ในไฟล์ <strong>App.vue</strong></p><pre>&lt;style lang=&quot;stylus&quot;&gt;<br>  @import &#39;./styles/main&#39;<br>&lt;/style&gt;</pre><p>3. ไปที่ Folder <strong>build &gt; webpack.base.conf.js</strong> เพื่อทำการ config ให้ใช้ style ได้ โดยภายในไฟล์จะมี code ดังนี้</p><pre><strong>var </strong>path = require(&#39;path&#39;)<br><strong>var </strong>utils = require(&#39;./utils&#39;)<br><strong>var </strong>config = require(&#39;../config&#39;)<br><strong>var </strong>vueLoaderConfig = require(&#39;./vue-loader.conf&#39;)<br><br><strong>function </strong>resolve (dir) {<br>  <strong>return </strong>path.join(__dirname, &#39;..&#39;, dir)<br>}<br><br>module.exports = {<br>  entry: {<br>    app: &#39;./src/main.js&#39;<br>  },<br>  output: {<br>    path: config.build.assetsRoot,<br>    filename: &#39;[name].js&#39;,<br>    publicPath: process.env.NODE_ENV === &#39;production&#39;<br>      ? config.build.assetsPublicPath<br>      : config.dev.assetsPublicPath<br>  },<br>  resolve: {<br>    extensions: [&#39;.js&#39;, &#39;.vue&#39;, &#39;.json&#39;],<br>    alias: {<br>      &#39;vue$&#39;: &#39;vue/dist/vue.esm.js&#39;,<br>      &#39;@&#39;: resolve(&#39;src&#39;)<br>    }<br>  },<br>  module: {<br>    rules: [<br>      {<br>        test: /\.(js|vue)$/,<br>        loader: &#39;eslint-loader&#39;,<br>        enforce: &#39;pre&#39;,<br>        include: [resolve(&#39;src&#39;), resolve(&#39;test&#39;)],<br>        options: {<br>          formatter: require(&#39;eslint-friendly-formatter&#39;)<br>        }<br>      },<br>      {<br>        test: /\.vue$/,<br>        loader: &#39;vue-loader&#39;,<br>        options: vueLoaderConfig<br>      },<br>      {<br>        test: /\.js$/,<br>        loader: &#39;babel-loader&#39;,<br>        include: [resolve(&#39;src&#39;), resolve(&#39;test&#39;)]<br>      },<br>      {<br>        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,<br>        loader: &#39;url-loader&#39;,<br>        options: {<br>          limit: 10000,<br>          name: utils.assetsPath(&#39;img/[name].[hash:7].[ext]&#39;)<br>        }<br>      },<br>      {<br>        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,<br>        loader: &#39;url-loader&#39;,<br>        options: {<br>          limit: 10000,<br>          name: utils.assetsPath(&#39;fonts/[name].[hash:7].[ext]&#39;)<br>        }<br>      },<br>      {<br>        test: /\.styl$/,<br>        loader: [&#39;style&#39;, &#39;css&#39;, &#39;stylus&#39;]<br>      }<br>    ]<br>  }<br>}</pre><p>เมื่อทำถึงขั้นตอนนี้ จะสามารถใช้งาน component ต่างๆของ vuetify ได้แล้ว เช่น button, dialog, select และอื่นๆเป็นต้น แต่หากลองทำ icon material หรือ font awesome มาใช้งานจะยังไม่สามารถใช้งานได้ จึงต้งทำการสร้างไฟล์ และ import ก่อน</p><h3>Import front style</h3><p>1. ทำการสร้างไฟล์ <strong>font.scss</strong> ใน Project โดยสร้างใน <strong>src &gt; styles &gt; font.scss</strong> เพื่อกำหนด font หรือ icon style ต่างๆ และพิมพ์ code ตามด้านล่าง</p><pre><em>/* fallback */<br></em>@font-face {<br>  font-family: &#39;Material Icons&#39;;<br>  font-style: normal;<br>  font-weight: 400;<br>  src: local(&#39;/static/fonts/Material Icons&#39;), url(https://medium.com/&#39;/static/fonts/MaterialIcons-Regular.woff2&#39;) format(&#39;woff2&#39;);<br>}<br>.material-icons {<br>  font-family: &#39;Material Icons&#39;;<br>  font-weight: normal;<br>  font-style: normal;<br>  font-size: 22px;<br>  line-height: 1;<br>  letter-spacing: normal;<br>  text-transform: none;<br>  display: inline-block;<br>  white-space: nowrap;<br>  word-wrap: normal;<br>  direction: ltr;<br>  -webkit-font-feature-settings: &#39;liga&#39;;<br>  -webkit-font-smoothing: antialiased;<br>}</pre><p>2. ทำการ import font style ในไฟล์ <strong>App.vue</strong></p><pre>&lt;style lang=&quot;scss&quot;&gt;<br>  @import &#39;./styles/font.scss&#39;;<br>&lt;/style&gt;</pre><p>3. Download file <strong>font-awesome.min.css</strong> มาวางใน Folder <strong>static &gt; css</strong></p><blockquote>Link: <a href="http://fontawesome.io/get-started/">http://fontawesome.io/get-started/</a></blockquote><p>4. เรียกใช้งาน font awesome ใน file <strong>index.html</strong></p><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;/static/css/font-awesome.min.css&quot;&gt;</pre><h3><strong>ตัวอย่างหน้า Website</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wN8Y7uALmmSdT-6CjaAjGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQgxWLXVgds0iyJoAUbu-Q.png" /></figure><h3>Reference:</h3><p>## Vue.js (<a href="https://vuejs.org/">https://vuejs.org/</a>)</p><p>## Vuetify (<a href="https://vuetifyjs.com/">https://vuetifyjs.com/</a>)</p><p>## SASS (<a href="https://github.com/webpack-contrib/sass-loader">https://github.com/webpack-contrib/sass-loader</a>)</p><p>## BABEL-PRESET-ENV (<a href="https://github.com/babel/babel-preset-env">https://github.com/babel/babel-preset-env</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=318e41071ca0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-vue-js-%E0%B8%A3%E0%B9%88%E0%B8%A7%E0%B8%A1%E0%B8%81%E0%B8%B1%E0%B8%9A-vuetify-318e41071ca0">[How to] วิธีการใช้งาน Vue.js ร่วมกับ Vuetify</a> was originally published in <a href="https://medium.com/st-sanyanee">st-sanyanee</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[How to] วิธีใช้ Git กับ PhpStorm]]></title>
            <link>https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B9%83%E0%B8%8A%E0%B9%89-git-%E0%B8%81%E0%B8%B1%E0%B8%9A-phpstorm-b6c89390cac2?source=rss----ca1de7e9ee2e---4</link>
            <guid isPermaLink="false">https://medium.com/p/b6c89390cac2</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[phpstorm]]></category>
            <dc:creator><![CDATA[st.nann]]></dc:creator>
            <pubDate>Sat, 12 Aug 2017 04:56:11 GMT</pubDate>
            <atom:updated>2017-08-13T03:07:38.681Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*x6reJHM9emdxcjDkpTOKsw.png" /></figure><p><em>ก่อนอื่นต้องขอบอกก่อนว่า Blog นี้เป็น Blog แรกที่เขียน ถ้าผิดพลาดอะไรติชมกันได้เลยนะคะ……</em></p><p><em>วันนี้เราจะมาพูดถึง วิธีการใช้ Git กับ PhpStorm นะคะ แต่ก่อนที่จะพูดถึงวิธีการใช้ จะขออธิบายก่อนว่า Git กับ Phpstorm คืออะไร (สำหรับใครที่ยังไม่รู้นะคะ ใครรู้แล้วข้ามได้เลยค่ะ :)*)</em></p><blockquote><strong>Git </strong>คือ Version Control ซึ่งทำหน้าที่ในการจัดการ backup version ต่างๆ ให้กับโปรเจค เมื่อมีการ commit ไฟล์ โดยจะสามารถ restoreโปรเจคกลับไปได้ ณ จุดเวลาที่เราต้องการ และหากมีการ upload โปรเจค ขึ้นไปบน Git ก็สามารถแชร์โปรเจคนั้นๆ ให้กับคนในทีมได้ โดยหากคนในทีมมีการแก้ไขโปรเจค ก็จะสามารถขอ merge request เพื่อที่จะให้ผู้ที่มีสิทธิ์ merge code เข้าด้วยการได้</blockquote><blockquote>PhpStorm คือ Editor ที่ใช้สำหรับในการเขียน Code</blockquote><p>ต่อไปจะเป็นการอธิบายขั้นตอน<em>วิธีการใช้ Git กับ PhpStorm นะคะ โดยมีขั้นตอน ดังนี้</em></p><ol><li>สมัครสมาชิก Git โดย Git ที่สมัครจะเป็นอะไรก็ เช่น GitLab, GitHub หรืออื่นๆเป็นต้น<br><a href="https://github.com/"><strong><em>https://github.com/</em></strong></a><br><a href="https://about.gitlab.com/"><strong><em>https://about.gitlab.com/</em></strong></a></li><li>Download Git จาก <a href="https://git-scm.com/download"><strong><em>https://git-scm.com/download</em></strong></a><strong><em> และทำการ Install</em></strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7lv6AnBmFEZFPXporrqvw.png" /></figure><p>3. Download Phpstorm จาก <a href="https://www.jetbrains.com/phpstorm/download/#section=windows"><strong><em>https://www.jetbrains.com/phpstorm/download/#section=windows</em></strong></a> และทำการ Install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-YLYC5cvHbCXYY39ETFKQ.png" /></figure><h3>กรณี ใช้ GitLab</h3><p>4.1 จากนั้นเข้า PhpStorm Click <strong>Configure &gt; Setting &gt; Git</strong> แล้วกรอก Path to Git Executable โดย Path จะเป็นที่อยู่ไฟล์ที่เราทำการ install Git</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yrd4ixWcb44_RVj94WhZmg.jpeg" /></figure><h3>กรณี ใช้ GitHub</h3><p>4.2 จากนั้นเข้า PhpStorm Click <strong>Configure &gt; Setting &gt; GitHub</strong> แล้วกรอกรายละเอียด ดังนี้<br><strong><em>Host:</em></strong><em> Website ของ GitHub<br></em><strong><em>Login:</em></strong><em> username ที่ใช้เข้า GitHub<br></em><strong><em>Password:</em></strong><em> password ที่ใช้เข้า GitHub</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AAxksToPM4hgtyENggXGxA.jpeg" /></figure><p>5. หลังจากนั้น ให้ทำการทดลองสร้าง Project ในหน้า Website ของ Git</p><p>6. เมื่อทำการสร้างแล้ว ให้กลับมาที่ PhpStorm เพื่อที่จะเชื่อมต่อไปยัง Git server โดยจะทำการเชื่อมต่อ โดย</p><blockquote><em>$ git remote -vvv</em></blockquote><p>7. ทำการ Remote ไปยัง Git โดย</p><blockquote><em>$ git remote add origin [Path url ssh Git ที่ต้องการเชื่อมต่อ]</em></blockquote><p><strong>Note</strong>: Path SSH สามารถหาได้จาก Website Git ในโปรเจคที่เราสมัคร ตัวอย่าง path git@gitlab.nipa.cloud:st.nann/Git-Test.git</p><p>8. เมื่อ Remote แล้วให้ทำการตรวจสอบว่า Remote สำเร็จหรือไม่ โดยการพิมพ์ Command</p><blockquote>$ git remote -vvv</blockquote><p>Note: หากสำเร็จจะแสดง ดังนี้<br><em>origin git@gitlab.nipa.cloud:st.nann/Git-Test.git (fetch)<br>origin git@gitlab.nipa.cloud:st.nann/Git-Test.git (push)</em></p><p>9. หลังจากนั้น ให้ทำการทำ <strong>Authentication</strong> เพื่อใช้ในการเข้าใช้งาน Git โดยทั่วไปแล้วจะมี 2 วิธี คือ<br>- ใช้ Username และ Password<br>- ใช้ Generate Key (นิยมกว่า)</p><p>10. ในส่วนนี้จะขอยกตัวอย่างการใช้ Generate Key เนื่องจาก วิธีการใช้ Username และ Password ได้แสดงในข้อ 4.2 แล้ว เราจะทำการใช้ Generate Key โดยเข้าไปที่โปรแกรม git.exe ที่ Download มาในข้อ 2 แล้วพิมพ์ Command</p><blockquote>$ ssh-keygen.exe</blockquote><p>11. ทำการกด Enter ไปเรื่อยๆจนสิ้นสุด ดังรูป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*YKt2RrkUXAQsNlgTQvKf7A.png" /></figure><p>12. Copy path <strong>public key</strong> ตั้งแต่หลัง in ถึงคำว่า pub <strong>(ไม่เอาจุด)</strong> แล้วพิมพ์ Command</p><blockquote>$ cat [Path Public Key ที่ได้]</blockquote><p>13. ขั้นตอนสุดท้าย จะได้ key ที่ถูก Generate มา เพื่อนำไปกรอกในหน้า Website Git (ในที่นี้จะขอยกตัวอย่างรูปภาพของ GitLab นะคะ) ให้เข้าไปที่ <strong>Profile setting &gt; SSH</strong> แล้ว<strong> paste public Key</strong> ที่ copy มา พร้อมตั้งชื่อ key นั้นๆ โดยจะเป็นชื่ออะไรก็ได้ เพื่อบ่งบอกให้เรารู้ว่าเป็น key ของอะไร แล้วทำการกด <strong>Add key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*e-2K-boOtU8t_WJ78XgwCQ.png" /></figure><p><em>เพียงเท่านี้ก็สามารถใช้ Git โปรเจคต่างๆได้แล้วนะคะ สำหรับบางคนอาจจะสงสัยว่า แล้วจะใช้งาน Git อย่างไร หากมีการแก้ไขไฟล์ต่างๆ ซึ่งก็ไม่ยากเลยค่ะ มีขั้นตอน ดังนี้ ค่ะ</em></p><ol><li>ให้ตรวจสอบดูสีของไฟล์ก่อนว่า ไฟล์นั้นๆเป็นสีอะไร หากเป็น<strong>สีแดง</strong> แสดงว่าไฟล์นั้นยังไม่ถูก add เข้า repository (ส่วนเก็บไฟล์) ของ Git ให้ <strong>click ขวา &gt; add &gt; git</strong> เพื่อ add เข้า repository ก่อน</li><li>เมื่อไฟล์เป็น<strong>สีเขียว</strong>แล้ว ให้ทำการ <strong>Create new branch</strong> โดยจะสร้าง branch ใหม่สำหรับการ commit ไฟล์ เพื่อไม่ให้ข้อมูลไปทับกับไฟล์เดิม โดยการ <strong>click ที่มุมขวาล่างที่มีคำว่า Git: master &gt; New Branch</strong></li><li>เมื่อสร้าง branch ใหม่แล้ว <strong>Click ขวา</strong> ไฟล์ที่ต้องการเก็บ version ณ จุดเวลานั้นๆให้ทำการ <strong>Commit</strong> ไฟล์</li><li>จะแสดงหน้าต่างขึ้นมาให้ทำการ <strong>push</strong> ไฟล์ขึ้นไปยัง server โดยต้อง<strong>กรอกรายละเอียด comment</strong> ก่อน ซึ่งอาจจะเป็นรายละเอียดของการทำงานไฟล์ก็ได้</li><li>เมื่อ push ไฟล์ไปยัง server แล้ว ให้ไปที่<strong>หน้า website </strong>เพื่อทำการ<strong>ขอ merge request</strong> ไปยังผู้ที่มีสิทธิ์รวมไฟล์ โดยการ <strong>click create new merge request</strong></li><li>หลังจากนั้น <strong>ผู้ที่มีสิทธิ์</strong>จะทำการรวมข้อมูลในไฟล์ โดยการ <strong>merge</strong> ไฟล์นั้นๆ โดยอาจจะลบ branch ที่ merge ไปแล้วทิ้ง ให้เหลือเเต่ branch master ซึ่งเป็น branch หลักก็ได้</li><li>หากต้องการให้<strong>ข้อมูล</strong>ในโปรเจคใน PhpStorm เป็น<strong>ปัจจุบัน</strong> ก็สามารถที่จะ pull ลงมาได้ ซึ่งอาจจะทำการ <strong>fetch</strong> ข้อมูลก่อน เพื่อให้ข้อมูลเป็นปัจจุบัน โดยการ <strong>click VCS &gt; Git &gt; Fetch</strong></li><li>เมื่อ fetch แล้ว ให้ทำการ <strong>pull</strong> โดยการ <strong>click VCS &gt; Git &gt;Pull</strong></li></ol><p><strong>Problem</strong>: หากมีการ <em>conflict</em> ซึ่งเกิดจากการแก้ไขไฟล์เดียวกันของคนในทีม ให้ทำการแก้ไขไฟล์นั้น หรือ <em>revert</em> ไฟล์กลับไปก่อน แล้วทำการ <em>pull ใหม่</em></p><p><strong>Note:</strong> หากต้องการ<strong>แชร์</strong>ให้คนอื่น มาแก้ไขงานในโปรเจคของเราให้ทำการ <strong>clone</strong> โปรเจคมา โดย <strong>click VCS &gt; Git &gt; Clone </strong>แล้ว<strong> copy SSH Path Repository </strong>มาใส่ในช่อง <strong>Git Repository url </strong>เช่น<strong> </strong><a href="/service/mailto:git@github.com">git@github.com</a>:st-nann/my-portfolio.git</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6c89390cac2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/st-sanyanee/how-to-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B9%83%E0%B8%8A%E0%B9%89-git-%E0%B8%81%E0%B8%B1%E0%B8%9A-phpstorm-b6c89390cac2">[How to] วิธีใช้ Git กับ PhpStorm</a> was originally published in <a href="https://medium.com/st-sanyanee">st-sanyanee</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>