<?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[Stories by Shamin Meerankutty on Medium]]></title>
        <description><![CDATA[Stories by Shamin Meerankutty on Medium]]></description>
        <link>https://medium.com/@shamin616?source=rss-806439b3ce7a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jPPvrMUoXCpZBGg9l0OzEw.jpeg</url>
            <title>Stories by Shamin Meerankutty on Medium</title>
            <link>https://medium.com/@shamin616?source=rss-806439b3ce7a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 01:02:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shamin616/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[webpack.config.js — Explained]]></title>
            <link>https://medium.com/@shamin616/webpack-config-js-explained-a9b4fda117ea?source=rss-806439b3ce7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9b4fda117ea</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webpack4]]></category>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[bundler]]></category>
            <category><![CDATA[webpack]]></category>
            <dc:creator><![CDATA[Shamin Meerankutty]]></dc:creator>
            <pubDate>Sat, 01 Sep 2018 08:24:52 GMT</pubDate>
            <atom:updated>2018-09-01T08:24:52.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWh3-MPgcBeXxLozfQv_4w@2x.png" /></figure><p>A lot of people have confusions using webpack configuration file. They usualy copy it from some sources and will end up having configuration errors or will not work as expected. Webpack configuration file is a bit confusing at first but when you understand what all those lines do it will be easier to change it as per your requirement.</p><p>A webpack configuration file can be divided into four parts.</p><ul><li>Entry</li><li>Loaders</li><li>Plugins</li><li>Output</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f62cdee9839c63954171e3c82596419d/href">https://medium.com/media/f62cdee9839c63954171e3c82596419d/href</a></iframe><h4>Entry</h4><p>Entry is the place where webpack starts. Most commonly this will be your index.js file. Webpack will start processing from your index.js file and then processes all those files included in your index.js file.</p><blockquote><em>webpack will only process the files imported in your index and the files they have imported.</em> Any files not used in index.js file is neglected.</blockquote><pre>entry: &#39;./src/index.js&#39;</pre><h4>Loaders</h4><p>Now webpack will process index.js and the files specified in the index.js. Wepack have a lot of loaders for processing and will now search for the respective loader for a file. These loaders are specified in the rules array. If it is a css file it will look for css-loader, if it is an image file it will look for file-loader. Similarly there are a lot of loaders available in webpack documentation. Select the suitable loader required for your file.</p><p>Each object of the rules have a <strong>test</strong> key and <strong>use</strong> key. test key specifies the extensions of the files for a loader to be used and the loader is specified as use key. <strong>use</strong> can have multiple keys. Look at the case of css files here css-loader is used to generate css from the files included and style-loader is used to append it to the head of index.html file.</p><pre>module: {    <br>   rules: [<br>      {<br>        test: /\.(js|jsx)$/,<br>        exclude: /node_modules/,<br>        use: [&#39;babel-loader&#39;]<br>      },<br>      {        <br>        test: /\.css$/,<br>        include: /node_modules/,<br>        use: [&#39;style-loader&#39;, &#39;css-loader&#39;]<br>      }<br>    ]<br>  }</pre><h4>Plugins</h4><p>After processing files using loaders webpack will now look if there are any plugins. There are a lot of plugins in webpack having different functions. One of them is UglifyJsPlugin. This plugin uglifies your bundle js file. ie, It will remove all those comments and changes all the variable names and also minify them. That is why when you inspect scripts in some websites you will see this ugly javascript file and will wonder how they read this. That is done by UglifyJsPlugin. There are a lot of similar plugins having different functions and find the one suitable for your needs.</p><pre>new MiniCssExtractPlugin({  filename: &#39;app.css&#39;    })</pre><p>Here we are using <strong>MiniCssExtractPlugin</strong> to<strong> extract the css</strong> generated by webpack loaders and save it to app.css file</p><h4>Output</h4><p>This is the last process of webpack it saves the output file after processing thorough loaders and plugins and will be saved in the filename and path specified. It usually contains a path key which specifies the path to which webpack generated css and js files to be saved. filename key specifies to filename of the final javascript output file.</p><pre>output: {    <br>  path: `${__dirname}/dist`,    <br>  publicPath: &#39;/&#39;,    <br>  filename: &#39;bundle.js&#39;  <br>}</pre><p>These are a lot of other keys in webpack. You can find it in <a href="https://gist.github.com/shaminmeerankutty/7697085d03c28117546113affbb753d0.js">webpack documentation</a>. If I need to explain more terms feel free to ask for it in comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9b4fda117ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use ::after and ::before pseudo-elements in CSS?]]></title>
            <link>https://medium.com/mr-devops-blog/https-medium-com-mr-devops-blog-how-to-use-after-and-before-pseudo-elements-in-css-dd76ed17b7f0?source=rss-806439b3ce7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd76ed17b7f0</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Shamin Meerankutty]]></dc:creator>
            <pubDate>Tue, 27 Feb 2018 03:36:02 GMT</pubDate>
            <atom:updated>2018-02-28T02:44:19.794Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xLvfZLNOWl0JgQHYkeAXNA.jpeg" /></figure><p>As we know in css while we apply a style to an element it applies completely to the element so, <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements">Pseudo-elements</a> are introduced in css to style specific parts of elements. Two most widely used pseudo-elements in css are ::after and ::before. These two elements are hard to understand at first. We can see many applications of these elements in web.</p><p>By understanding how these elements work we can easily use these elements in various design and animation effects. ::after and ::before where introduced in css to append contents to an element with css. But we know these elements are used in designing for what they are not intended to do and that is the main problem why most of the people don’t even know how to use these elements.</p><p>At first, I am going to tell about what these where actualy intended to do then I will show you how to use these elements other than what they are intended to do.</p><h3>What are ::after and ::before pseudo elements?</h3><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::before">::before</a> is a pseudo element used to append data infront of the element where style is applied and <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::after">::after</a> is used to append data to end of the element.</p><pre>&lt;p class=&quot;data&quot;&gt;Element&lt;/p&gt;</pre><pre>.data::before { content: &quot;&lt; &quot;; color: red; } .data::after { content: &quot; &gt;&quot;; color: green; }</pre><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/0*NZWlRKw7M3TTfxP4.png" /></figure><p>As seen in the example a red “&lt; “ is appended before the element text and a green “ &gt;” is appended after the element text. The content given in the style is appended to the text. This was what ::after and ::before were intended to do when they were introduced to css.</p><h3>What can we do with ::before and ::after pseudo-elements?</h3><p>We can do many designs and animations with pseudo elements. These are basicaly done by setting our element to a relative positioning position:relative and our pseudo-elements to an absolute positioning position:absolute</p><p>As an example we can create a nav icon using these method. Consider an element with background black and a height of 4px and width of 30px and set it with a relative postioning so that our pseudo-elements will be positioned relative to this element.</p><pre>&lt;div class=&quot;nav-icon&quot;&gt;&lt;/div&gt;</pre><pre>.nav-icon { position:relative; width: 30px; height: 4px; background: #000; }</pre><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/115/0*z14_KK0BLozI7xpw.png" /></figure><p>Now we have got one small rectangle for our nav icon. We need two more rectangle for the nav icon to be completed and we can add this using pseudo-elements. To do this create a ::before and ::after pseudo-element for .nav-icon class and give them absolute postion position: absolute. Please don&#39;t forget to give a content to the pseudo-element otherwise it won&#39;t work. Give an empty content to our pseudo-elements content: &quot;&quot;.</p><pre>.nav-icon::before,.nav-icon::after { position: absolute; content: &quot;&quot;; width: 30px; height: 4px; background: #000; }</pre><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/115/0*liZC49nQ_eHU2Q-g.png" /></figure><p>Don’t worry if you don’t see our pseudo-elements actualy they are present but is not visible as they are drawn above our element. To make them visible we need to translate our ::before element a little bit upwards and our ::after element little bit downwards. We can achive this by transform: translateY().</p><pre>.nav-icon::before { transform: translateY(-10px); } .nav-icon::after { transform: translateY(10px); }</pre><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/133/0*MZh_UHHZXNziL3mP.png" /></figure><p>Now we have got a nav icon with css and pseudo elements. What if we need to make it a cross. Just hide our ::before element and transform: rotate() our ::after and main element.</p><pre>&lt;div class=&quot;nav-icon crossed&quot;&gt;&lt;/div&gt;</pre><pre>.crossed { transform:rotate(45deg) } .crossed::before { opacity: 0; } .crossed::after { transform:rotate(-90deg) }</pre><p><strong>Result:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/0*2Vfjuigi2kBYkwgA.png" /></figure><p>This was just an intro you can do many designs using the pseudo-elements. Just try to do something different and post your designs as comments so that it will help someone.</p><p>All the code is available in <a href="https://codepen.io/shamin616/pen/xYyaew">Codepen</a>.</p><p><em>Originally published at </em><a href="https://mrdevops.xyz/how-to-use-after-and-before-in-css/"><em>mrdevops.xyz</em></a><em> on February 27, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd76ed17b7f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mr-devops-blog/https-medium-com-mr-devops-blog-how-to-use-after-and-before-pseudo-elements-in-css-dd76ed17b7f0">How to use ::after and ::before pseudo-elements in CSS?</a> was originally published in <a href="https://medium.com/mr-devops-blog">Mr Devops Blog</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 setup google maps with react-native-maps in React Native in ios]]></title>
            <link>https://medium.com/@shamin616/how-to-setup-google-maps-with-react-native-maps-in-react-native-in-ios-c5dd95f00a2c?source=rss-806439b3ce7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5dd95f00a2c</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[google-maps]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Shamin Meerankutty]]></dc:creator>
            <pubDate>Fri, 01 Sep 2017 18:00:26 GMT</pubDate>
            <atom:updated>2017-09-01T18:00:26.317Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dn0IZ_uSRS3PKg0LqKDlQw.png" /></figure><p>I found it very hard to implement google maps with react-native-maps in React Native. The documentation they have provided for installation is hard to understand and is a little bit tricky to implement. So I thought about sharing my way of implementing google maps in ios. By default when you are using react-native-maps in ios Apple Map is loading. So if you wan’t to use google maps you can use my method.</p><p>Even if you don’t have any previous experience in ios developement this method is easy to implement. In this method we use cocoapods. Cocoapods is a dependency manager for Swift and Objective-C. If you don’t have cocoapods installed you should install it. You can easily install it by,</p><pre>sudo gem install cocoapods</pre><p>Now go to the root folder of your react native project and install react-native-maps by,</p><pre>npm install react-native-maps --save</pre><p>Now open ios folder in your react-native-project and setup your podfile. To initialize pod file run,</p><pre>pod init</pre><p>Then open Podfile in your editor such as vim, nano, atom etc. and paste the given data. Make sure you replace ‘<em>app_name</em>’ with your App’s name</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/31f0296e8721a8aabdd5f9f823c60b77/href">https://medium.com/media/31f0296e8721a8aabdd5f9f823c60b77/href</a></iframe><p>Now back in the terminal you can install the dependencies specified in the Podfile by using</p><pre>pod install</pre><p>Now open the project in your xcode by using the command</p><pre>open projectname.xcworkspace</pre><p>Drag the folder <strong>AirGoogleMaps</strong> from</p><p><strong>Y<em>ourproject/node_modules/react-native-maps/lib/ios/AirGoogleMaps/</em></strong></p><p>into your xcode project.</p><p>Open <em>AppDelegate.m</em> file in the folder with name of your project and add</p><pre>@import GoogleMaps;</pre><p>before “<em>@implementation AppDelegate</em>” and In the function <em>(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions </em>add just after the <em>“NSURL *jsCodeLocation;”</em> line</p><pre>[GMSServices provideAPIKey:@”YOUR_GOOGLE_MAP_API_KEY”];</pre><p>Replace YOUR_GOOGLE_MAP_API_KEY with your API key if you don’t have an API key you can get it from the link below.</p><p><a href="https://developers.google.com/maps/documentation/ios-sdk/get-api-key">Maps SDK for iOS | Google Developers</a></p><p>Now you should link the react-native-maps to the ios project. You can do it by calling react-native link command in your terminal.</p><pre>react-native link react-native-maps</pre><p>Now open your index.ios.js and use the mapview by,</p><pre>import MapView, { PROVIDER_GOOGLE } from &#39;react-native-maps&#39;</pre><pre>// ...<br><br>&lt;MapView<br>  provider={PROVIDER_GOOGLE}<br>  initialRegion={{<br>      latitude: 37.78825,<br>      longitude: -122.4324,<br>      latitudeDelta: 0.0922,<br>      longitudeDelta: 0.0421,<br>    }}<br>/&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5dd95f00a2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>