{"id":240539,"date":"2014-10-18T14:45:03","date_gmt":"2014-10-18T10:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=240539"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=240539","title":{"rendered":"<span class=\"post_title\">Duo.js \u2014 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0434\u043b\u044f \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       Duo \u2014 \u044d\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043b\u0443\u0447\u0448\u0438\u0435 \u0438\u0434\u0435\u0438 Component, Browserify \u0438 Go. \u041e\u043d \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0440\u043e\u043d\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/post\/240539\/\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/31c\/074\/3f1\/31c0743f14fe478c81437c601de705c4.png\"\/><\/a><br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b> \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/duojs.org\/\">duojs.org<\/a>. \u0417\u0430\u0447\u0435\u043c \u043e\u043d \u0437\u0434\u0435\u0441\u044c? \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: Duo \u2014 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e. \u041c\u043d\u0435 \u043e\u043d \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c (\u043d\u0430 \u0445\u0430\u0431\u0440\u0435 Duo \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0441\u044f). \u0418\u2026 \u0418 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043c\u044b\u0441\u043b\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0441\u043a\u0440\u0443\u043f\u0443\u043b\u0435\u0437\u043d\u044b\u0439 \u0434\u043e\u043a\u043b\u0430\u0434 \u2014 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0441 Duo, \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c duojs.org \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0435\u0439 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  &nbsp;<\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Duo \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 npm<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\">$ npm install -g duo <\/code><\/pre>\n<p>  Duo \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0413\u0438\u0442\u0445\u0430\u0431 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043a\u0435\u0442\u0430\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b <code>~\/.netrc<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\">machine api.github.com   login &lt;username&gt;   password &lt;token&gt; <\/code><\/pre>\n<p>  <code>&lt;token&gt;<\/code> \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435: <a href=\"https:\/\/github.com\/settings\/tokens\/new\">github.com\/settings\/tokens\/new<\/a><\/p>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c<\/h2>\n<p>  \u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438\u0437 \u0413\u0438\u0442\u0445\u0430\u0431\u0430 \u0432 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 JavaScript, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"javascript\">var uid = require('matthewmueller\/uid'); var fmt = require('yields\/fmt');  var msg = fmt('Your unique ID is %s!', uid()); window.alert(msg); <\/code><\/pre>\n<p>  Duo \u0431\u0443\u0434\u0435\u0442 \u0442\u044f\u043d\u0443\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 <code>matthewmueller\/uid<\/code> \u0438 <code>yields\/fmt<\/code>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442-\u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"javascript\">var modal = require('.\/modal\/index.js'); <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>duo<\/code>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"bash\">$ duo index.js &gt; build.js <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0433 <code>&lt;script&gt;<\/code> \u0432 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443:<\/p>\n<pre><code class=\"html\">&lt;script src=&quot;build.js&quot;&gt;&lt;\/script&gt; <\/code><\/pre>\n<p>  \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0438 \u0441 CSS! \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0413\u0438\u0442\u0445\u0430\u0431\u0430 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"css\">@import 'necolas\/normalize.css'; @import '.\/layout\/layout.css';  body {   color: teal;   background: url('.\/background-image.jpg'); } <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0435\u0440\u0435\u043c CSS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Duo:<\/p>\n<pre><code class=\"bash\">$ duo index.css &gt; build.css <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0431\u0430\u043d\u0434\u043b \u0432 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443:<\/p>\n<pre><code class=\"html\">&lt;link rel=&quot;stylesheet&quot; href=&quot;build.css&quot;&gt; <\/code><\/pre>\n<h2>\u041e\u0441\u043e\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0436\u043a\u0430 JavaScript, HTML \u0438 CSS<\/li>\n<li>\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u044e\u043d\u0438\u043a\u0441-\u0441\u0438\u0441\u0442\u0435\u043c<\/li>\n<li>\u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043a\u043e\u0434 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u0413\u0438\u0442\u0430\u0445\u0431\u0430, \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u043e\u0441\u0442\u044c<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Coffescript \u0438\u043b\u0438 Sass<\/li>\n<li>\u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442-\u0444\u0430\u0439\u043b\u043e\u0432<\/li>\n<\/ul>\n<h2>\u0424\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u044f<\/h2>\n<p>  Duo \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 \u0442\u0440\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u043e\u0432 \u0438\u043b\u0438 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432<\/li>\n<li>\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/li>\n<li>\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f<\/h2>\n<p>  \u041a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043d\u0430\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e \u0442\u043e \u0438\u0434\u0435\u044e \u0438\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0433. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f: \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0431\u0435\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a package.json \u0438\u043b\u0438 component.json.<\/p>\n<p>  Duo \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b (\u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u0438) \u043f\u0440\u044f\u043c\u0438\u043a\u043e\u043c \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"javascript\">var events = require('component\/events'); var uid = require('matthewmueller\/uid'); <\/code><\/pre>\n<p>  \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438\u0438, \u0432\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c:<\/p>\n<pre><code class=\"javascript\">var reactive = require('component\/reactive@0.14.x'); var tip = require('component\/tip@master'); var shortcuts = require('yields\/shortcuts@0.0.1:\/index.js'); <\/code><\/pre>\n<p>  \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0434\u043b\u044f CSS, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>import<\/code>:<\/p>\n<pre><code class=\"javascript\">@import 'necolas\/normalize.css'; @import 'twbs\/bootstrap@v3.2.0:dist\/css\/bootstrap.css'; <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0438\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c <code>.html<\/code> \u0438\u043b\u0438 <code>.json<\/code> \u0444\u0430\u0439\u043b\u044b:<\/p>\n<pre><code class=\"javascript\">var template = require('.\/menu.html'); var schema = require('.\/schema.json'); <\/code><\/pre>\n<p>  Duo \u043f\u043e\u0437\u0430\u0431\u043e\u0438\u0442\u0441\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c <code>.html<\/code> \u0432 JavaScript \u0441\u0442\u043e\u043a\u0443, \u0430 <code>.json<\/code> \u0432 JavaScript \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0431\u0438\u043b\u0434\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<pre><code class=\"bash\">$ duo in.js &gt; out.js $ duo in.css &gt; out.css <\/code><\/pre>\n<h2>\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0431\u044b\u043b \u043f\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u043c, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435, Duo \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c.<\/p>\n<p>  Duo \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0437\u0430 \u0440\u0430\u0437. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043a\u043e\u0434\u0430 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u0440\u043e\u0449\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u043d\u0434\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u043d\u0434\u043b\u043e\u0432 \u0437\u0430 \u0440\u0430\u0437 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0438\u0445, \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <code>duo<\/code>:<\/p>\n<pre><code class=\"bash\">$ duo app\/home.js app\/about.js app\/admin.js <\/code><\/pre>\n<p>  \u0418 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u043c\u0438 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">$ duo app\/{home,about,admin}\/index.{js,css} <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, \u0435\u0441\u043b\u0438 Duo \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u0438\u043b\u0438 \u0448\u0440\u0438\u0444\u0442 \u2014 \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>build\/<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 CSS \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code class=\"css\">@import 'necolas\/normalize.css';  body {   background: url('.\/images\/duo.png'); } <\/code><\/pre>\n<p>  Duo \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0441\u0438\u043c\u043b\u0438\u043d\u043a <code>build\/images\/duo.png<\/code>. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>build\/<\/code> \u2014 \u0432 \u043d\u0435\u0439 \u0443\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0434\u0435\u043f\u043b\u043e\u044e \u043f\u0440\u043e\u0435\u043a\u0442.<br \/>  &nbsp;<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h2>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0438\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043b\u0435\u0436\u0430\u0442 \u0432 \u044d\u0442\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/duojs\/duojs.org\">duojs\/duojs.org<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/duojs\/logo\">duojs\/logo<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/segmentio\/analytics.js\">segmentio\/analytics.js<\/a><\/li>\n<\/ul>\n<h2>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e<\/h2>\n<p>  \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/duojs\/duo\">GitHub Repository<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/duojs\/duo\/blob\/master\/docs\/cli.md\">Command Line Usage<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/duojs\/duo\/blob\/master\/docs\/api.md\">Javascript API<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/duojs\/duo\/blob\/master\/docs\/faq.md\">FAQ<\/a><\/li>\n<li><a href=\"https:\/\/groups.google.com\/forum\/#!forum\/duojs\">Mailing List<\/a><\/li>\n<li><code>#duojs<\/code> on freenode<\/li>\n<\/ul>\n<p>  <b>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043e:<\/b><br \/>  \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u043e\u0434\u0431\u0440\u043e\u0441\u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"http:\/\/webpack.github.io\/\">http:\/\/webpack.github.io\/<\/a>.<br \/>  Duo \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u044b <a href=\"https:\/\/github.com\/duojs\/duo\/issues\/193\">npm<\/a> \u0438 <a href=\"https:\/\/github.com\/duojs\/duo\/issues\/228\">bower<\/a>. \u0415\u0441\u0442\u044c <a href=\"https:\/\/github.com\/duojs\/duo\/blob\/master\/docs\/api.md\">JavaScript API<\/a>, <a href=\"http:\/\/www.npmjs.org\/package\/duo-gulp\">duo-gulp<\/a>, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0431\u0438\u043b\u0434\u0430 <a href=\"http:\/\/github.com\/duojs\/watch\">watch<\/a>.   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/240539\/\"> http:\/\/habrahabr.ru\/post\/240539\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       Duo \u2014 \u044d\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043b\u0443\u0447\u0448\u0438\u0435 \u0438\u0434\u0435\u0438 Component, Browserify \u0438 Go. \u041e\u043d \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0440\u043e\u043d\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/post\/240539\/\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/31c\/074\/3f1\/31c0743f14fe478c81437c601de705c4.png\"\/><\/a>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-240539","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/240539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=240539"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/240539\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=240539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=240539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=240539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}