<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Townes &#187; Notepad++</title>
	<atom:link href="https://thetownes.coolpage.biz/?feed=rss2&#038;tag=notepad" rel="self" type="application/rss+xml" />
	<link>https://thetownes.coolpage.biz</link>
	<description>本站已转移至：http://www.thetownes.info</description>
	<lastBuildDate>Thu, 01 Aug 2013 11:49:56 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>用 Notepad++ 编译 CoffeeScript</title>
		<link>https://thetownes.coolpage.biz/?p=364</link>
		<comments>https://thetownes.coolpage.biz/?p=364#comments</comments>
		<pubDate>Sat, 13 Jul 2013 14:45:33 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[零碎的资料]]></category>
		<category><![CDATA[CoffeeScript]]></category>
		<category><![CDATA[Notepad++]]></category>

		<guid isPermaLink="false">http://thetownes.coolpage.biz/?p=364</guid>
		<description><![CDATA[Notepad++ 是我最喜爱的一款代码编辑器，没有之一，就好像 JS 库中的  &#8230; <a href="https://thetownes.coolpage.biz/?p=364">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div itemprop="articleBody">
<p><a title="Notepad++ 代码编辑器的不二之选" href="http://wange.im/notepad-plus.html">Notepad++ 是我最喜爱的一款代码编辑器</a>，没有之一，就好像 JS 库中的 jQuery，小巧、开源且功能全面，而且有丰富的插件支持，甚至可以和一些体积庞大的 IDE 编辑器相媲美而毫不逊色。</p>
<p>最近这段时间爱上了 CoffeeScript 的简洁之美，尤其是声明一个 Javascript 类和扩展类仅仅用 class 和 extends 关键词即可，不得不让人感叹 CoffeeScript 的优雅。不过今天不是要介绍 CoffeeScript，只是为配置 CoffeeScript 的环境做个笔记。</p>
<p>在 Windows 下搭建 CoffeeScript 的环境其实并没有网上传言的那么复杂，只是配置完以后，每次编辑 coffee 后会有一个编译的过程，才能解析成 JavaScript 文件，当然，我们可以开一个 cmd 窗口运行编译脚本，但是我希望的是把这个编译的过程融合到 Notepad++ 编辑器中，事实上这是可以做到的。</p>
<p>首先，在 Notepad++ 插件管理器上找到并下载一个叫作 NppExec 的插件，安装重启 Notepad++ 后生效。</p>
<p>然后，按 F6 或者在菜单上找到 插件 -&gt; NppExec -&gt; Execute&#8230; 选项，弹出命令输入框，输入如下命令：</p>
<pre>"C:/Program Files/nodejs/node.exe" "D:/coffee-script/bin/coffee" -wcb $(CURRENT_DIRECTORY) $(FULL_CURRENT_PATH)
npp_console off
npp_open $(CURRENT_DIRECTORY)\$(NAME_PART).js</pre>
<p>注意，其中一个是 nodejs 的安装路径，另一个是 CoffeeScript 的安装路径，替换成对应的路径即可。另外，-wcb 是 CoffeeScript 编译命令的参数选项，这个就根据各位的实际需求写就行了。</p>
<p>这样，就可以完成在编辑器里编写、编译、调试的所有操作了，可以说，Notepad++ 和 CoffeeScript 的组合堪称绝配。</p>
</div>
<div>
<div><ins><ins id="aswift_1_anchor"><iframe id="aswift_1" name="aswift_1" height="60" width="468" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></ins></ins></div>
<div id="post_copyright">
<p><i></i>转载请注明出处：<a title="用 Notepad++ 编译 CoffeeScript" href="http://wange.im/compile-coffeescript-with-notepad-plus.html" rel="bookmark">用 Notepad++ 编译 CoffeeScript</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>https://thetownes.coolpage.biz/?feed=rss2&#038;p=364</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
