<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>htsign</author_name>
  <author_url>https://blog.hatena.ne.jp/htsign/</author_url>
  <blog_title>htsign's blog</blog_title>
  <blog_url>https://htsign.hateblo.jp/</blog_url>
  <categories>
    <anon>nodejs</anon>
  </categories>
  <description>npm scriptsに clean ってコマンドを登録しようとしたんですよ。 普通なら rimraf を使うところなんですが、 cleanの過程で node_modules ディレクトリも削除して綺麗にしたい。 かと言って npm i -g rimraf など、環境依存になるので以ての外。 rm コマンドは *NIX 環境に依存してしまう。 rd コマンドは Windows環境に依存してしまう。 さて困った。 そこで閃きました。 &quot;scripts&quot;: { &quot;clean&quot;: &quot;node -e \&quot;process.exit(process.platform === 'win32' ^ 1)\&quot; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtsign.hateblo.jp%2Fentry%2F2019%2F01%2F07%2F170013&quot; title=&quot;npm scripts で OS ごとに処理を分ける - htsign&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-01-07 17:00:13</published>
  <title>npm scripts で OS ごとに処理を分ける</title>
  <type>rich</type>
  <url>https://htsign.hateblo.jp/entry/2019/01/07/170013</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
