<?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: Neto Ukpong</title>
    <description>The latest articles on DEV Community by Neto Ukpong (@nsilva1).</description>
    <link>https://dev.to/nsilva1</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%2F825838%2Fcc39a2a3-067b-4ff8-9044-859aefc22b0c.jpeg</url>
      <title>DEV Community: Neto Ukpong</title>
      <link>https://dev.to/nsilva1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nsilva1"/>
    <language>en</language>
    <item>
      <title>How to solve git not ignoring files in .gitignore</title>
      <dc:creator>Neto Ukpong</dc:creator>
      <pubDate>Mon, 28 Aug 2023 13:51:50 +0000</pubDate>
      <link>https://dev.to/nsilva1/gitignore-does-not-ignore-folder-1n4o</link>
      <guid>https://dev.to/nsilva1/gitignore-does-not-ignore-folder-1n4o</guid>
      <description>&lt;p&gt;Git is the number one version control system that has made the software development process faster and collaboration on projects much easier.&lt;/p&gt;

&lt;p&gt;When working on a project, there will be some files that don't need to be committed and shared with other developers. Such files include configuration files that are specific to your development environment(.env), IDE config files, log files and node_modules folders.&lt;/p&gt;

&lt;p&gt;There are 3 main states of files in a git repository:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;tracked&lt;/strong&gt;: These are files/folders that git is aware of and keeps track of any changes made to them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;untracked&lt;/strong&gt;: These are new files/folders in the working directory that are yet to be staged and committed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ignored&lt;/strong&gt;: These are files/folders that git avoids. No tracking, no staging, no commits on these files/folders.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All ignored files are clearly stated in a &lt;code&gt;.gitignore&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to create a &lt;code&gt;.gitignore&lt;/code&gt; file
&lt;/h2&gt;

&lt;p&gt;On Windows, run this command in the command line:&lt;br&gt;
&lt;code&gt;cd . &amp;gt; .gitignore&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;on Mac/Linux&lt;br&gt;
&lt;code&gt;touch .gitignore&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Both commands are run from the root directory of the project.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to correct files/folders not ignored by Git
&lt;/h2&gt;

&lt;p&gt;After creating our &lt;code&gt;.gitignore&lt;/code&gt; file and stating the files we want to ignore. Sometimes, they don't get ignored and are committed and pushed to the remote repository. This usually happens when we commit a file/folder either by mistake or otherwise into git before realising the error and then adding the file/folder to &lt;code&gt;.gitignore&lt;/code&gt;. In such cases, we run the following commands after committing any changes made:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rm -r --cached .
git add .
git commit -m "&amp;lt;commit message&amp;gt;"
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git rm -r --cached .&lt;/code&gt; - removes all files from the git index and refreshes the git repository&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt; - stages all files/folders not stated in the &lt;code&gt;.gitignore&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git commit -m "&amp;lt;commit message&amp;gt;"&lt;/code&gt; - commits all files that have been staged&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; - push to remote repository&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The files stated in &lt;code&gt;.gitignore&lt;/code&gt; have been left alone by git and all other files uploaded to the remote repository&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>How to Integrate Tailwind CSS into a React app</title>
      <dc:creator>Neto Ukpong</dc:creator>
      <pubDate>Wed, 19 Oct 2022 16:20:02 +0000</pubDate>
      <link>https://dev.to/nsilva1/how-to-integrate-tailwind-css-into-a-react-app-456o</link>
      <guid>https://dev.to/nsilva1/how-to-integrate-tailwind-css-into-a-react-app-456o</guid>
      <description>&lt;h2&gt;
  
  
  Step 1: Create your react project
&lt;/h2&gt;

&lt;p&gt;For this post, we will be using &lt;code&gt;create-react-app&lt;/code&gt; to create our react project. This sets up everything we need so that we can start coding relatively quickly. Open the command line and use the following commands.&lt;/p&gt;

&lt;p&gt;npm&lt;br&gt;
&lt;code&gt;npx create-react-app react-app-with-tailwind&lt;/code&gt;&lt;br&gt;
&lt;code&gt;cd react-app-with-tailwind&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;yarn&lt;br&gt;
&lt;code&gt;yarn create react-app react-app-with-tailwind&lt;/code&gt;&lt;br&gt;
&lt;code&gt;cd react-app-with-tailwind&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: Install Tailwind CSS
&lt;/h2&gt;

&lt;p&gt;After creating our react project, and change the directory to the project folder. This is where we will install tailwind and it's dependencies.&lt;/p&gt;

&lt;p&gt;npm&lt;br&gt;
&lt;code&gt;npm install -D tailwindcss postcss autoprefixer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;yarn&lt;br&gt;
&lt;code&gt;yarn add -D tailwindcss postcss autoprefixer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will install tailwindcss postcss and autoprefixer in dev dependencies.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Generate Config files
&lt;/h2&gt;

&lt;p&gt;The next step is to generate the configuration files that tailwind css needs. The files can be generated with the following command&lt;/p&gt;

&lt;p&gt;npm&lt;br&gt;
&lt;code&gt;npx tailwindcss init -p&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;yarn&lt;br&gt;
&lt;code&gt;yarn tailwindcss init -p&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will generate two files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;tailwind.config.js&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;postcss.config.js&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The files generated will have the default config already set-up.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 4: Configure path to files
&lt;/h2&gt;

&lt;p&gt;Inside &lt;code&gt;tailwind.config.js&lt;/code&gt; we need to specify the path to our React files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
   content: [
     "./src/**/*.{js,jsx,ts,tsx}",
   ],
   theme: {
     extend: {},
   },
   plugins: [],
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will tell tailwind the path to look for its class names and apply the styling associated with those class names.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Add Tailwind Directives
&lt;/h2&gt;

&lt;p&gt;Add the following lines to index.css:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind base;
@tailwind components;
@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it!&lt;br&gt;
Tailwind CSS has been successfully setup in our React app. We can now use the utility classes in our project.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>tailwindcss</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Render an SVG Image in Flutter</title>
      <dc:creator>Neto Ukpong</dc:creator>
      <pubDate>Tue, 22 Mar 2022 12:43:40 +0000</pubDate>
      <link>https://dev.to/nsilva1/how-to-render-an-svg-image-in-flutter-4dl2</link>
      <guid>https://dev.to/nsilva1/how-to-render-an-svg-image-in-flutter-4dl2</guid>
      <description>&lt;p&gt;By default, Flutter does not support SVG images. &lt;br&gt;
You would need an external package to render the images. &lt;/p&gt;

&lt;p&gt;In comes &lt;strong&gt;flutter_svg&lt;/strong&gt; to the rescue.&lt;/p&gt;

&lt;p&gt;Here's a link to the &lt;a href="https://pub.dev/packages/flutter_svg"&gt;pub.dev&lt;/a&gt; page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding the plugin
&lt;/h2&gt;

&lt;p&gt;To add the package, run:&lt;br&gt;
&lt;code&gt;flutter pub add flutter_svg&lt;/code&gt;&lt;br&gt;
This adds the package to your pubspec.yaml file. Afterwards, you will need to install it, run:&lt;br&gt;
&lt;code&gt;flutter pub get&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using flutter_svg in your app
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import:'package:flutter_svg/flutter_svg.dart'

@override
Widget build(BuildContext context) {
 return SafeArea(
    child: Center(
      child: SvgPicture.asset('assets/image.svg')
    ),
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>flutter</category>
      <category>svg</category>
      <category>dart</category>
    </item>
  </channel>
</rss>
