<?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: JavaScriptErika</title>
    <description>The latest articles on DEV Community by JavaScriptErika (@javascripterika).</description>
    <link>https://dev.to/javascripterika</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%2F22936%2F6b901acf-88e7-4b50-8f2f-4352d651a656.PNG</url>
      <title>DEV Community: JavaScriptErika</title>
      <link>https://dev.to/javascripterika</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/javascripterika"/>
    <language>en</language>
    <item>
      <title>Cascading Coder's Creative Code Challenge: Emojis</title>
      <dc:creator>JavaScriptErika</dc:creator>
      <pubDate>Fri, 15 Mar 2019 04:48:57 +0000</pubDate>
      <link>https://dev.to/javascripterika/cascading-coders-creative-code-challenge-emojis-1715</link>
      <guid>https://dev.to/javascripterika/cascading-coders-creative-code-challenge-emojis-1715</guid>
      <description>&lt;p&gt;Hello all!&lt;/p&gt;

&lt;p&gt;I invite you to participate in Cascading Coder's new creative code challenge! &lt;br&gt;
&lt;em&gt;What up pure CSS? I'm looking at you.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;All the details you need are below:&lt;/p&gt;

&lt;p&gt;🍇🙈❤️🥨🔥😅🐐🚀🐯🥑🏀🚖🕹️🛵🥕🐛🐌🍌🗑️🎉🐶🐱🐭🐰🐻&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1106390901004357633-915" src="https://platform.twitter.com/embed/Tweet.html?id=1106390901004357633"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1106390901004357633-915');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1106390901004357633&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1106390901805498370-925" src="https://platform.twitter.com/embed/Tweet.html?id=1106390901805498370"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1106390901805498370-925');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1106390901805498370&amp;amp;theme=dark"
  }



&lt;br&gt;
🍇🙈❤️🥨🔥😅🐐🚀🐯🥑🏀🚖🕹️🛵🥕🐛🐌🍌🗑️🎉🐶🐱🐭🐰🐻&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you're curious about who, what, why, huh.... details are below (but should you want to stop reading, that's cool, everything you need to join in on the creative code challenge fun is above).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;🌌&lt;strong&gt;Inspiration:&lt;/strong&gt;🌌 &lt;/p&gt;

&lt;p&gt;One of the first reasons I began coding (2013) was because I wanted to animate and create interactive experiences! I thought anything that moved on the screen was awesome!&lt;/p&gt;

&lt;p&gt;You have to admit, when you visit websites that have cute, subtle animations or full-immersive experiences with 3D objects - you may find yourself smiling, wow'd, amazed...all of the above? I certainly do. And if you haven't come across anything, let's fix that, check out anything from &lt;a href="https://www.awwwards.com/" rel="noopener noreferrer"&gt;awwwards&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're like me, when you see these sites, you wonder, how in the hell did anyone make this. Digging around you find that maybe these sites use canvas, &lt;a href="https://threejs.org/" rel="noopener noreferrer"&gt;three.js&lt;/a&gt;, &lt;a href="http://www.pixijs.com/" rel="noopener noreferrer"&gt;pixiJS&lt;/a&gt;, &lt;a href="https://greensock.com/docs" rel="noopener noreferrer"&gt;Greensock&lt;/a&gt;, or maybe a combination of them all. Still, to jump into something like an experimental site takes time, trial-and-error, experience, planned thought, and can feel daunting. I have also found that there is a steep learning curve and not a whole ton of resources (besides documentation)! Though, folks like 🚂&lt;a href="https://www.youtube.com/user/shiffman" rel="noopener noreferrer"&gt;Dan Shiffman from The Coding Train&lt;/a&gt;🚂 sure do break barriers by teaching fundamentals, having fun, and create interesting and creative projects with &lt;a href="https://p5js.org/" rel="noopener noreferrer"&gt;P5.js&lt;/a&gt;.🦄&lt;/p&gt;

&lt;p&gt;By taking small steps towards the bigger picture, can you make progress. Creative code can be exhilarating experiences for the user. And, as a developer, creative code projects will absolutely assist you in your growth - CSS and JavaScript, all while demystifying that sector a bit, or taking the steps to have the courage to.&lt;/p&gt;

&lt;p&gt;🎨&lt;strong&gt;Cascading Coders&lt;/strong&gt;🎨&lt;/p&gt;

&lt;p&gt;I founded a group called Cascading Coders back when I was enrolled in Udacity's Google Scholarship 2018 program. At this point, I had been developing for a few years now and knew that I would be among new developers who more than likely had not heard about creative code or what that is. I found it an opportunity to share and give back, and that's important to me because I wouldn't have the career that I do if it weren't for our community and producing tutorials for free.  During that time, creative code challenges were often voted on from suggested topics from the community. There was quite a bit of momentum within that group! We held everything from dino to taco challenges with CSS and/or SVG, and it was a blast! &lt;/p&gt;

&lt;p&gt;When the first phase of the scholarship ended, I brought Cascading Coders out into the world! Oooh look, on March 5th 2018! 'Ello World! &lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-970743175454347265-109" src="https://platform.twitter.com/embed/Tweet.html?id=970743175454347265"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-970743175454347265-109');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=970743175454347265&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;In June 2018, I landed my first developer job after 3 years of learning from non-traditional sources online! During that time (and really up until now) Cascading Coders took the back burner, because I needed to adjust to full-time work life and gym life (I began powerlifting around that time too...&lt;em&gt;do you even lift bro? why yes, yes I do&lt;/em&gt;). &lt;/p&gt;

&lt;p&gt;It's my goal now to grow the community and help developers to expand their portfolio...and just &lt;em&gt;have fun&lt;/em&gt; while gaining more skills along the way. When is the last time you created something out of pure joy, with no motives other than to code for fun? I know with dev jobs, it can be the last thing you want to do when you get home or off of work. So I do hope, that this group can serve as a way to fall in love with code again, or pick up a new skill. I hope it can respark joy to learn in public, and that you explore an area fearlessly and make mistakes, and come out with something to share with the world.💜&lt;/p&gt;

&lt;p&gt;&lt;em&gt;About Cascading Coders:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We're a welcoming community of developers of all skill levels who have a love or interest in creative code. Even if you've never heard of it before or it sounds intimidating - this is the place for you!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;From CSS web animation to experimenting with HTML5 Canvas, code is art and a means of self-expression that can be translated into effective UI/UX and bring about unforgettable experiences and interaction to the web. We curate content/resources, hold CSS/SVG art (creative code) challenges, and inspire each other to become better Cascading Coders!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Join us on &lt;a href="https://twitter.com/CascadingCoders" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and/or &lt;a href="https://www.facebook.com/groups/1752972351391061/" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Deploy a React App as a Github User Page with Yarn</title>
      <dc:creator>JavaScriptErika</dc:creator>
      <pubDate>Tue, 29 May 2018 04:31:55 +0000</pubDate>
      <link>https://dev.to/javascripterika/deploy-a-react-app-as-a-github-user-page-with-yarn-3fka</link>
      <guid>https://dev.to/javascripterika/deploy-a-react-app-as-a-github-user-page-with-yarn-3fka</guid>
      <description>&lt;p&gt;&lt;em&gt;tldr; see Solution&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I've been working on redoing my portfolio site, it's still a WIP - that being said &lt;a href="https://javascripterika.github.io/" rel="noopener noreferrer"&gt;here it is so far&lt;/a&gt;. I need to polish my portfolio section functionality in mobile view and some other tasks, and I need to refactor the code yet. I'd say it's about 90% done.&lt;/p&gt;

&lt;p&gt;It needed a huge change from what it originally was to better reflect my skills since last year. I'm thinking a new redesign every year or so is a good time to keep reiterating and updating a portfolio. I went from using Foundation and jQuery to React, Flexbox, and p5js!&lt;/p&gt;

&lt;p&gt;Speaking of React, before I began my portfolio, I wanted to make sure I could easily publish my project as a Github User Page! You know the one's where you can access a site as: &lt;code&gt;https://yourUserName.github.io/&lt;/code&gt; as opposed to a Project Page: &lt;code&gt;https://yourUserName.github.io/yourProjectRepo&lt;/code&gt;. I always get the naming of those confused and forget them. Thankfully &lt;strong&gt;you can&lt;/strong&gt; deploy as a user page or project page with the &lt;code&gt;gh-pages&lt;/code&gt; package! &lt;/p&gt;

&lt;p&gt;I got to the point of needing to test my site on mobile and had to do some digging around to find out how to deploy a &lt;code&gt;create-react-app&lt;/code&gt; project as a User Page. If you're looking to deploy a Project Page with via &lt;code&gt;create-react-app&lt;/code&gt;, &lt;a href="https://github.com/gitname/react-gh-pages" rel="noopener noreferrer"&gt;check this documentation out here&lt;/a&gt; - there are a few subtle differences between deploying as a user page and project page that aren't completely covered for a project page.&lt;/p&gt;

&lt;p&gt;I made the mistake of going through the above steps, not realizing there would be differences. I deployed my project!! My project was not showing up on &lt;code&gt;https://javascripterika.github.io/&lt;/code&gt;, and my &lt;code&gt;master&lt;/code&gt; branch had all of the build code. I wanted to push changes to my &lt;code&gt;master&lt;/code&gt; branch, but of course, I'm not going to pull in the build code with 5k changes, and I can't push changes without pulling. Whoa, and now I have a random &lt;code&gt;gh-pages&lt;/code&gt; branch? And my master is just showing up as all HTML (that big long red bar). WTF! Noooooo! Where is my JavaScripts??! 😭&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsfuxkeoh4q3vm7lq8bu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvsfuxkeoh4q3vm7lq8bu.PNG" alt="react-master" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This tutorial assumes you have a working project and created your repo as &lt;code&gt;username/username.github.io&lt;/code&gt;, are using &lt;code&gt;create-react-app&lt;/code&gt;, and yarn&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;While in the current directory of your project:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ yarn add gh-pages&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;package.json&lt;/code&gt; file, add&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"homepage": "https://yourUserName.github.io/",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;I added this right above &lt;code&gt;"dependencies"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still in your &lt;code&gt;package.json&lt;/code&gt; file, add the following INSIDE of &lt;code&gt;"scripts"&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"predeploy": "yarn run build",
"deploy": "gh-pages -b master -d build",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, let's create a new branch...since &lt;code&gt;master&lt;/code&gt; will contain our build files pretty soon and minifiy, bundle and get weird, we need a new branch that will serve as our source code - so we can make changes and we don't lose our beautiful human-able readable code.&lt;/p&gt;

&lt;p&gt;While in the &lt;code&gt;master&lt;/code&gt; branch, let's create our &lt;code&gt;source&lt;/code&gt; branch... you can name it whatever you want. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git checkout -b source&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ git push origin source&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Yay! Our &lt;code&gt;source&lt;/code&gt; branch is a direct copy of our &lt;code&gt;master&lt;/code&gt;. Now, on Github we need to update our Default branch, &lt;code&gt;master&lt;/code&gt;, to our &lt;code&gt;source&lt;/code&gt; branch...and that's also &lt;em&gt;why&lt;/em&gt; we pushed it (so Github knows it exists).&lt;/p&gt;

&lt;p&gt;Navigate to your repo on Github, and select "Settings".&lt;br&gt;
On the left-side panel, click on "Branches".&lt;br&gt;
Next, you're able to select your &lt;code&gt;source&lt;/code&gt; branch and update it under the Default branch heading.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ut1hnz6bub9jgtcmakb.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ut1hnz6bub9jgtcmakb.PNG" alt="setdefaultbranch" width="753" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now while you're in your &lt;code&gt;source&lt;/code&gt; branch via your terminal, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ yarn deploy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;AND! That's it! Your master branch will contain the build code. Give it a couple of minutes and visit your site at &lt;code&gt;https://yourUserName.github.io/&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Making Changes
&lt;/h3&gt;

&lt;p&gt;Let's say you want to make changes, your &lt;code&gt;source&lt;/code&gt; branch acts like your &lt;code&gt;master&lt;/code&gt;. So branch away using &lt;code&gt;source&lt;/code&gt;, and merge your branches into &lt;code&gt;source&lt;/code&gt; as needed. Other than what's mentioned below, you don't need to do anything else with &lt;code&gt;master&lt;/code&gt; now.&lt;/p&gt;

&lt;p&gt;Let's say I make some "testing" changes in &lt;code&gt;source&lt;/code&gt;. I push it as usual to github: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ git push origin source&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Switch to &lt;code&gt;master&lt;/code&gt; in the terminal, &lt;code&gt;git merge source&lt;/code&gt; or whatever branch you want, switch to your &lt;code&gt;source&lt;/code&gt; branch and and run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ yarn deploy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There you go! Those changes are published and deployed. &lt;/p&gt;

&lt;h3&gt;
  
  
  A Quick SideNote
&lt;/h3&gt;

&lt;p&gt;I ended up deleting my &lt;code&gt;gh-pages&lt;/code&gt; branch and retried the deploy, and it works just fine! I no longer have the big red bar of HTML as my Default branch is &lt;code&gt;source&lt;/code&gt; and my changes work! All is good with the world now!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If a &lt;code&gt;gh-pages&lt;/code&gt; branch is created via Github after you deploy, go ahead and delete it! According to Github, "User pages must be built from the master branch." If you navigate to your repo under Settings, and scroll down to the "Github Pages" section, you will see a grayed out option there under Source!&lt;/em&gt; &lt;/p&gt;




&lt;h3&gt;
  
  
  Update and Edit 5/30
&lt;/h3&gt;

&lt;p&gt;I was working on my project and realized a MAJOR issue! More than likely MOST of us will use the user page as a portfolio page and link to our project pages via Github.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you are using React Router&lt;/strong&gt;, the Service Worker will cache your project pages &amp;amp; they won't direct correctly (all of my project pages appeared as a blank page a part of my portfolio only with its menu)...this will happen whether or not you click on the links to your project pages in your app or copy and paste it in your browser. Even if you do not use a project page in your user page, it will still be affected!&lt;/p&gt;

&lt;p&gt;To fix this, you have to delete the service worker file and any references to it in your &lt;code&gt;index.js&lt;/code&gt; file... &amp;amp; remember to clear your browser cache (a hard refresh doesn't suffice).&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>react</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
