<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Justin Wash</title>
    <description>The latest articles on DEV Community by Justin Wash (@justinwash).</description>
    <link>https://dev.to/justinwash</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F168360%2F33bf2526-e7f3-46b0-88a4-e02c262e42ed.jpeg</url>
      <title>DEV Community: Justin Wash</title>
      <link>https://dev.to/justinwash</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/justinwash"/>
    <language>en</language>
    <item>
      <title>Client-side Vue.js for Node-less SPAs</title>
      <dc:creator>Justin Wash</dc:creator>
      <pubDate>Tue, 21 May 2019 14:30:52 +0000</pubDate>
      <link>https://dev.to/justinwash/client-side-vue-js-for-node-less-spas-1dap</link>
      <guid>https://dev.to/justinwash/client-side-vue-js-for-node-less-spas-1dap</guid>
      <description>&lt;p&gt;This is the structure I'm using for my most recent project, &lt;a href="https://www.perpetualshred.com/"&gt;Perpetual Shred&lt;/a&gt;. It's fast, easy to use, and allows for the front-end to be hosted as a static site.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://client-side-vue.herokuapp.com"&gt;Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/justinwash/client-side-vue"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure of the project:
&lt;/h2&gt;

&lt;h4&gt;
  
  
  client-side-vue/
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;index.html&lt;/strong&gt; - The entry-point for your Single Page App. Global dependencies via script tags (Vue, Vue-Router, Http-Vue-Loader, Axios) and a single #App element where the vue instance will be rendered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;index.js&lt;/strong&gt; - Where Vue.js, Vue-Router are instantiated, where you'll import and assign your services to the Vue instance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;index.css&lt;/strong&gt; - Global styles for your Single Page App.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;index.php&lt;/strong&gt; - Trick Heroku into hosting a static site.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  client-side-vue/dependencies/
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;vue.js&lt;/strong&gt; - Vue.js itself and all the built-in features that come with it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;vue-router.js&lt;/strong&gt; - The official router for Vue.js, allows you to navigate your Single Page App. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;http-vue-loader.js&lt;/strong&gt; - Client-side .vue component loader.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;axios.js&lt;/strong&gt; - Promise based HTTP client for making ajax/http calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  client-side-vue/services
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;store.service.js&lt;/strong&gt; - A (very, extremely) simple state-management service with only three methods: 

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;get(key)&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;set(key, value)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;clear(key)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's with the weird &lt;code&gt;Object.assignProperty&lt;/code&gt; stuff in index.js?:
&lt;/h2&gt;

&lt;p&gt;see &lt;a href="https://vuejsdevelopers.com/2017/04/22/vue-js-libraries-plugins/"&gt;this great article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>node</category>
    </item>
  </channel>
</rss>
