<?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 3846masa on Medium]]></title>
        <description><![CDATA[Stories by 3846masa on Medium]]></description>
        <link>https://medium.com/@3846masa?source=rss-37789873927a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X9hTVcYuJEh33kBwtRSL6A.jpeg</url>
            <title>Stories by 3846masa on Medium</title>
            <link>https://medium.com/@3846masa?source=rss-37789873927a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:33:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@3846masa/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[MEMI, a smart task-runner for JSer]]></title>
            <link>https://medium.com/@3846masa/memi-a-smart-task-runner-for-jser-de97df75607f?source=rss-37789873927a------2</link>
            <guid isPermaLink="false">https://medium.com/p/de97df75607f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[task-runners]]></category>
            <dc:creator><![CDATA[3846masa]]></dc:creator>
            <pubDate>Thu, 13 Sep 2018 04:10:55 GMT</pubDate>
            <atom:updated>2018-09-13T06:07:20.352Z</atom:updated>
            <content:encoded><![CDATA[<h3>TL;DR</h3><figure><a href="https://www.npmjs.com/package/memi"><img alt="" src="https://cdn-images-1.medium.com/max/290/0*CP_XsihwaX4T02NA" /></a></figure><ul><li><a href="https://github.com/3846masa/memi">https://github.com/3846masa/memi</a></li><li><strong>A smart task-runner for JSer</strong></li><li>Write tasks as ES module</li><li><strong>Auto-install dependencies!!</strong></li></ul><h3>Why create a new task-runner?</h3><p>Inspired by <a href="https://github.com/mimorisuzuko/memi">mimorisuzuko/memi</a> (Japanese).</p><p>This requires the following:</p><ul><li><strong>The new task-runner allows users to write write the tasks in JavaScript;</strong> it is difficult for me to write Shell Script and Makefiles.</li><li><strong>Can use it anywhere;</strong> I would like to avoid putting node_modules or package.json in a non-Node.js working directory.</li><li><strong>Put the dependencies in a directory except </strong><strong>npm root -g;</strong> it is not cool to install them globally.</li></ul><h3>Issues of existing task-runners</h3><p><strong>Makefile<br></strong>Shell Script is difficult, e.g. in Windows, it is troubling to install a make command.</p><p><strong>npm scripts<br></strong>I hate to put package.json in a non-Node.js working directory.</p><p><strong>gulp<br></strong>Although dependencies of gulp should be installed globally or locally, I hate to put node_modules in a non-Node.js working directory and to install dependencies to npm root -g.</p><h3>MEMI, a smart task-runner</h3><p>First, you define tasks via Memifile.js.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e09c083f042a1d4c730d897d6268fc7/href">https://medium.com/media/4e09c083f042a1d4c730d897d6268fc7/href</a></iframe><p>Or, you can use a named exports.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85bd0bf9bbac289a9b03b94fe96a3553/href">https://medium.com/media/85bd0bf9bbac289a9b03b94fe96a3553/href</a></iframe><p>Also, you can write as CommonJS．</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a203e90e53e054bf640bddfcf2eb65d/href">https://medium.com/media/0a203e90e53e054bf640bddfcf2eb65d/href</a></iframe><p>Typing memi &lt;taskname&gt; allows you to run the task. For example, if you would like to run a build task, you should type memi build.</p><p>Then, MEMI finds up Memifile.js recursively. So MEMI can work on subdirectories.</p><p><strong>In the other words, if you want to run MEMI anywhere, you should put </strong><strong>Memifile.js in a home directory.</strong></p><p>When you pass arguments as memi &lt;taskname&gt; arg1 arg2 ..., the task function receives as function arguments. Also, MEMI allows you to use node modules for CLI (e.g. <a href="https://github.com/SBoudrias/Inquirer.js/">Inquirer</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2fad805e48917f21989a01b2c28d4c1/href">https://medium.com/media/d2fad805e48917f21989a01b2c28d4c1/href</a></iframe><p><strong>It is notable that MEMI will install dependencies automatically!</strong> For example, when you write Memifile.js as the above, MEMI installs fs-extra and execa.</p><p>A directory whre the dependencies are installed by MEMI is $HOME/.memi or %USERPROFILE%\.memi, and thus you don&#39;t have to install the dependencies globally nor locally.</p><p>In summary, you can write the tasks in JavaScript easily, and if you putting Memifile.js in the home directory, you can use MEMI anywhere.</p><p><strong>MIME is the task-runner that can be used casually and in full swing.</strong></p><p><a href="https://www.npmjs.com/package/memi"><strong>Please try to use MEMI once!</strong></a></p><h3>BTW: Medium API and MEMI</h3><p>I wrote this article in markdown via VSCode, and I posted it from Medium API via Memifile.js.</p><p>When I type memi medium filename.md, the article is posted via Medium API, and then the draft URL opens.</p><p><strong>This is very simple code, but re-usable thanks to MEMI.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa3cd2dcd66ba9527c883b85694dd5cc/href">https://medium.com/media/fa3cd2dcd66ba9527c883b85694dd5cc/href</a></iframe><h3>BTW: What’s MEMI?</h3><p>MEMI was named after <a href="http://stage48.net/wiki/index.php/Kakizaki_Memi">Memi Kakizaki</a> (柿崎芽実), who is a member of <a href="https://en.wikipedia.org/wiki/Keyakizaka46">Keyakizaka46</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de97df75607f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>