22 changed files with 8490 additions and 122 deletions
@ -0,0 +1,643 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>API · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../cli/" /> |
|||
|
|||
|
|||
<link rel="prev" href="../presets/creating-presets.md" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../customization/"> |
|||
|
|||
<a href="../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../customization/simple.html"> |
|||
|
|||
<a href="../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../customization/advanced.html"> |
|||
|
|||
<a href="../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.8" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../contributing/"> |
|||
|
|||
<a href="../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../contributing/development.html"> |
|||
|
|||
<a href="../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >API</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="neutrino-api">Neutrino API</h1> |
|||
<p>When using Neutrino via the <a href="../cli">CLI</a>, it creates an instance of the Neutrino API which picks up |
|||
any presets and arguments passed on the command line. If you desire, you can also create your own |
|||
instance of the Neutrino API and interact with it programmatically.</p> |
|||
<h2 id="instantiation">Instantiation</h2> |
|||
<p>In order to access the Neutrino API, you must require or import it and instantiate it, passing in any |
|||
preset names or paths you wish to load:</p> |
|||
<p>Using <code>require</code>:</p> |
|||
<pre class="language-"><code class="lang-js"><span class="token keyword">const</span> Neutrino <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'neutrino'</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
<span class="token keyword">const</span> api <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Neutrino</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'neutrino-preset-react'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<p>Using ES imports:</p> |
|||
<pre class="language-"><code class="lang-js"><span class="token keyword">import</span> Neutrino <span class="token keyword">from</span> <span class="token string">'neutrino'</span><span class="token punctuation">;</span> |
|||
|
|||
<span class="token keyword">const</span> api <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Neutrino</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'neutrino-preset-react'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h2 id="environment">Environment</h2> |
|||
<p>When using the CLI, environment variables are automatically set based on the command you are using. |
|||
When using the API this is not the case, and you <strong>must</strong> set it prior to calling any build commands or |
|||
loading any presets.</p> |
|||
<pre class="language-"><code class="lang-js">process<span class="token punctuation">.</span>env<span class="token punctuation">.</span>NODE_ENV <span class="token operator">=</span> <span class="token string">'production'</span><span class="token punctuation">;</span> |
|||
|
|||
<span class="token keyword">const</span> api <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Neutrino</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
api<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h2 id="api">API</h2> |
|||
<h3 id="constructor">Constructor</h3> |
|||
<p>When creating a Neutrino instance, you have the option of providing an array of presets for the API to attempt |
|||
to load and merge configurations for. Each preset will attempt to be loaded from the current working directory's |
|||
<code>node_modules</code>, nested within, by name, or relative file path. If it cannot be found, an exception will be thrown.</p> |
|||
<p>In addition to any provided presets, Neutrino will also attempt to load configuration data from the package.json |
|||
residing in the current working directory. If this package.json contains an object at <code>config.neutrino</code>, this data |
|||
will be merged.</p> |
|||
<h3 id="config"><code>.config</code></h3> |
|||
<p>When constructing a Neutrino instance, a property of <code>.config</code> is set to be a new instance of |
|||
<a href="https://github.com/mozilla-rpweb/webpack-chain" target="_blank">webpack-chain</a>. This property is then available to all presets, which |
|||
subsequently augment it with their specific options. Every preset added uses this single <code>.config</code> to store their data, |
|||
meaning that preset load order has an effect on which config values take precedence. Presets loaded later will override |
|||
values set by earlier presets.</p> |
|||
<h3 id="startargs"><code>start(args)</code></h3> |
|||
<p>The <code>start()</code> method is responsible for creating a development bundle, and when possible, starting a development |
|||
server or source watcher. Prior to starting this process, Neutrino will trigger and wait for <code>prestart</code> events to |
|||
finish. After it is complete, Neutrino will trigger and wait for <code>start</code> events to finish.</p> |
|||
<p>If the Neutrino config contains options for <code>devServer</code>, then a webpack-dev-server will be started. If it is |
|||
configured for Node.js, then a build will be created, otherwise a Webpack source watcher will be started.</p> |
|||
<p>Currently any <code>args</code> passed to <code>start()</code> have no effect and will be passed through to any event handlers.</p> |
|||
<p>The <code>start</code> method will return a Promise which resolves after the build is done or development watcher has stopped, |
|||
and all <code>start</code> events have finished.</p> |
|||
<pre class="language-"><code class="lang-js">api |
|||
<span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Exiting!'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h3 id="buildargs"><code>build(args)</code></h3> |
|||
<p>The <code>build()</code> method is responsible for creating a bundle typically used for production. Prior to starting this process, |
|||
Neutrino will trigger and wait for <code>prebuild</code> events to finish. After it is complete, Neutrino will trigger and wait for |
|||
<code>build</code> events to finish.</p> |
|||
<p>Currently any <code>args</code> passed to <code>build()</code> have no effect and will be passed through to any event handlers.</p> |
|||
<p>The <code>build</code> method will return a Promise which resolves after the build is done and all <code>build</code> events have finished, or |
|||
will reject if there was a failure during building.</p> |
|||
<pre class="language-"><code class="lang-js">api |
|||
<span class="token punctuation">.</span><span class="token function">build</span><span class="token punctuation">(</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Saved to build/'</span><span class="token punctuation">)</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token keyword">catch</span><span class="token punctuation">(</span>err <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h3 id="testargs"><code>test(args)</code></h3> |
|||
<p>The <code>test()</code> method is responsible for gathering args needed for testing and triggering relevant events as a signal to |
|||
test presets that they may run. Using the <code>test</code> method does nothing other than triggering these events; without a |
|||
preset listening for these events, nothing will happen. Prior to starting this process, Neutrino will trigger and wait |
|||
for <code>pretest</code> events to finish. After it is complete, Neutrino will trigger and wait for |
|||
<code>test</code> events to finish, in which test runners will do their work.</p> |
|||
<p>Any <code>args</code> passed to <code>test()</code> are passed on to the event handles and typically have properties for an array of |
|||
<code>files</code> to test, as well as a property for <code>watch</code>ing and rerunning tests.</p> |
|||
<p>The <code>test</code> method will return a Promise which resolves after all <code>test</code> events have finished, or |
|||
will reject if there was a failure during testing.</p> |
|||
<pre class="language-"><code class="lang-js">api |
|||
<span class="token punctuation">.</span><span class="token function">test</span><span class="token punctuation">(</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'all passed'</span><span class="token punctuation">)</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token keyword">catch</span><span class="token punctuation">(</span>err <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
|
|||
api |
|||
<span class="token punctuation">.</span><span class="token function">test</span><span class="token punctuation">(</span><span class="token punctuation">{</span> |
|||
files<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token comment" spellcheck="true">/* ... */</span><span class="token punctuation">]</span><span class="token punctuation">,</span> |
|||
watch<span class="token punctuation">:</span> <span class="token boolean">true</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'all passed'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h3 id="getwebpackoptions"><code>getWebpackOptions()</code></h3> |
|||
<p>While tools like webpack-chain provide a convenient API for creating Webpack configurations, this is not a format that |
|||
is understandable by Webpack. With <code>getWebpackOptions()</code>, the webpack-chain instance at <code>.config</code> will be converted to |
|||
an options object readable directly by Webpack. This call is cached, so subsequent calls to <code>getWebpackOptions</code> will |
|||
result in the config being rendered only once, but the cached value returned afterwards.</p> |
|||
<pre class="language-"><code class="lang-js">api<span class="token punctuation">.</span><span class="token function">getWebpackOptions</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment" spellcheck="true">// -> { ... }</span> |
|||
</code></pre> |
|||
<h3 id="emitforalleventname-payload"><code>emitForAll(eventName, payload)</code></h3> |
|||
<p>Trigger a Promise-dependent event. For example, calling <code>emitForAll('build')</code> will trigger an event named build, and |
|||
each event handler can return a Promise denoting when it is finished. When all events have finished, this call will |
|||
resolve.</p> |
|||
<p>This method returns a Promise which resolves when all event handlers have also resolved.</p> |
|||
<pre class="language-"><code class="lang-js">api |
|||
<span class="token punctuation">.</span><span class="token function">emitForAll</span><span class="token punctuation">(</span><span class="token string">'custom-event'</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'All custom-events have resolved!'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<h3 id="handleerrorserr-stats"><code>handleErrors(err, stats)</code></h3> |
|||
<p>This method is used primarily internally to create a consistent console output when errors occur in the build. It will |
|||
log the <code>err</code> property and any errors from <code>stats</code> if applicable, and return <code>true</code> or <code>false</code> depending on if there |
|||
<em>were</em> errors.</p> |
|||
<p>This method returns a Boolean.</p> |
|||
<pre class="language-"><code class="lang-js"><span class="token keyword">const</span> failed <span class="token operator">=</span> api<span class="token punctuation">.</span><span class="token function">handleErrors</span><span class="token punctuation">(</span>err<span class="token punctuation">,</span> stats<span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
|
|||
<span class="token keyword">if</span> <span class="token punctuation">(</span>failed<span class="token punctuation">)</span> <span class="token punctuation">{</span> |
|||
console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'The build failed!'</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="devserver"><code>_devServer</code></h3> |
|||
<p>This method is used internally to generate an instance of webpack-dev-server during <code>start()</code>. It returns a promise that |
|||
resolves when the process received a <code>SIGINT</code> event to stop.</p> |
|||
<pre class="language-"><code class="lang-js">api |
|||
<span class="token punctuation">.</span><span class="token function">_devServer</span><span class="token punctuation">(</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Exiting process...'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../presets/creating-presets.md" class="navigation navigation-prev " aria-label="Previous page: Creating presets"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../cli/" class="navigation navigation-next " aria-label="Next page: CLI"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"API","level":"1.8","depth":1,"next":{"title":"CLI","level":"1.9","depth":1,"path":"cli/README.md","ref":"cli/README.md","articles":[]},"previous":{"title":"Creating presets","level":"1.7","depth":1,"path":"presets/creating-presets.md","ref":"presets/creating-presets.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"api/README.md","mtime":"2017-02-15T14:17:44.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,589 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>CLI · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../contributing/" /> |
|||
|
|||
|
|||
<link rel="prev" href="../api/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../customization/"> |
|||
|
|||
<a href="../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../customization/simple.html"> |
|||
|
|||
<a href="../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../customization/advanced.html"> |
|||
|
|||
<a href="../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.9" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../contributing/"> |
|||
|
|||
<a href="../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../contributing/development.html"> |
|||
|
|||
<a href="../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >CLI</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="neutrino-cli">Neutrino CLI</h1> |
|||
<p>Using the command-line interface is the preferred way of interacting with Neutrino. Let's take a look at its usage.</p> |
|||
<h2 id="-help"><code>--help</code></h2> |
|||
<p>Using <code>neutrino --help</code> will bring up the following help guide:</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino --help |
|||
Commands: |
|||
start Build a project <span class="token keyword">in</span> development mode |
|||
build Compile the <span class="token function">source</span> directory to a bundled build |
|||
<span class="token function">test</span> <span class="token punctuation">[</span>files<span class="token punctuation">..</span><span class="token punctuation">]</span> Run all suites from the <span class="token function">test</span> directory or provided files |
|||
|
|||
Options: |
|||
--presets A list of Neutrino presets used to configure the build <span class="token punctuation">[</span>array<span class="token punctuation">]</span> <span class="token punctuation">[</span>default: <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">]</span> |
|||
--version Show version number <span class="token punctuation">[</span>boolean<span class="token punctuation">]</span> |
|||
--help Show <span class="token function">help</span> <span class="token punctuation">[</span>boolean<span class="token punctuation">]</span> |
|||
</code></pre> |
|||
<h2 id="-version"><code>--version</code></h2> |
|||
<p>Using <code>--version</code> will output the current version of the Neutrino CLI to the console and exit.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino --version |
|||
4.0.0 |
|||
</code></pre> |
|||
<h2 id="-presets"><code>--presets</code></h2> |
|||
<p>The <code>--presets</code> flag can be used in conjunction with any of the top-level commands to specify a collection of |
|||
presets to load. These can be an npm package or a relative path to a module to load as a preset.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino start --presets neutrino-preset-react neutrino-preset-karma |
|||
</code></pre> |
|||
<p>The Neutrino CLI will still attempt to load any presets defined in the project's package.json located at |
|||
<code>config.presets</code>. Presets passed via the CLI <code>--presets</code> will take precedence over presets defined in |
|||
<code>config.presets</code>, meaning that options set by package.json presets can have their values overridden by |
|||
<code>--presets</code> presets.</p> |
|||
<h2 id="neutrino-start">neutrino start</h2> |
|||
<p>Using the command <code>neutrino start</code> builds a project in development mode, also starting a development server or source |
|||
watcher depending on the preset or config options used. This command sets the <code>NODE_ENV</code> environment variable to |
|||
<code>development</code>.</p> |
|||
<h2 id="neutrino-build">neutrino build</h2> |
|||
<p>Using the command <code>neutrino build</code> builds a project in production mode, rendering static assets to the configured build |
|||
output destination. This command sets the <code>NODE_ENV</code> environment variable to <code>production</code>.</p> |
|||
<h2 id="neutrino-test">neutrino test</h2> |
|||
<p>Using the command <code>neutrino test</code> passes execution onto a test runner preset. It is up to the preset being used to |
|||
determine how source files are built or provided to tests. See your particular test preset for details. This |
|||
command sets the <code>NODE_ENV</code> environment variable to <code>test</code>.</p> |
|||
<p>Looking at the <code>--help</code> for <code>neutrino test</code>:</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino <span class="token function">test</span> --help |
|||
neutrino <span class="token function">test</span> <span class="token punctuation">[</span>files<span class="token punctuation">..</span><span class="token punctuation">]</span> |
|||
|
|||
Options: |
|||
--presets A list of Neutrino presets used to configure the build <span class="token punctuation">[</span>array<span class="token punctuation">]</span> <span class="token punctuation">[</span>default: <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">]</span> |
|||
--version Show version number <span class="token punctuation">[</span>boolean<span class="token punctuation">]</span> |
|||
--help Show <span class="token function">help</span> <span class="token punctuation">[</span>boolean<span class="token punctuation">]</span> |
|||
--watch Watch <span class="token function">source</span> files <span class="token keyword">for</span> changes and re-run tests <span class="token punctuation">[</span>boolean<span class="token punctuation">]</span> <span class="token punctuation">[</span>default: false<span class="token punctuation">]</span> |
|||
</code></pre> |
|||
<p>Using the command <code>neutrino test</code> will execute every test file located in your |
|||
<a href="../project-layout#Testing">testing directory</a>. You may also provide to this command the specific test files you wish |
|||
to run individually. It is important to note that when combined with the <code>--presets</code> parameter, you should use two |
|||
dashes after the last preset to denote the end of the presets and the beginning of the test files.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino <span class="token function">test</span> a_test.js b_test.js |
|||
</code></pre> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino <span class="token function">test</span> --presets neutrino-preset-react neutrino-preset-karma -- a_test.js b_test.js |
|||
</code></pre> |
|||
<p>You can also pass a flag <code>--watch</code> to watch source files for changes and re-run tests, if your preset supports it.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ neutrino <span class="token function">test</span> --watch |
|||
</code></pre> |
|||
<h2 id="exit-codes">Exit codes</h2> |
|||
<p>When the CLI creates an instance of Neutrino, it waits for all commands to either resolve or reject their Promise. |
|||
If the command succeeded, the CLI will exit with code <code>0</code>. If there was an error, the CLI will log the error |
|||
to the console and exit with code <code>1</code>. This makes it easier to use Neutrino commands for status reasons, such |
|||
as failing a pull request on continuous integration if any tests fail or if there are linter errors.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../api/" class="navigation navigation-prev " aria-label="Previous page: API"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../contributing/" class="navigation navigation-next " aria-label="Next page: Contributing"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"CLI","level":"1.9","depth":1,"next":{"title":"Contributing","level":"1.10","depth":1,"path":"contributing/README.md","ref":"contributing/README.md","articles":[{"title":"Code of Conduct","level":"1.10.1","depth":2,"path":"contributing/code-of-conduct.md","ref":"contributing/code-of-conduct.md","articles":[]},{"title":"Development Process","level":"1.10.2","depth":2,"path":"contributing/development.md","ref":"contributing/development.md","articles":[]}]},"previous":{"title":"API","level":"1.8","depth":1,"path":"api/README.md","ref":"api/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"cli/README.md","mtime":"2017-02-15T15:58:51.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,581 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Code of Conduct · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="development.html" /> |
|||
|
|||
|
|||
<link rel="prev" href="./" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../customization/"> |
|||
|
|||
<a href="../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../customization/simple.html"> |
|||
|
|||
<a href="../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../customization/advanced.html"> |
|||
|
|||
<a href="../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter active" data-level="1.10.1" data-path="code-of-conduct.html"> |
|||
|
|||
<a href="code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="development.html"> |
|||
|
|||
<a href="development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Code of Conduct</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="contributor-covenant-code-of-conduct">Contributor Covenant Code of Conduct</h1> |
|||
<h2 id="our-pledge">Our Pledge</h2> |
|||
<p>In the interest of fostering an open and welcoming environment, we as |
|||
contributors and maintainers pledge to making participation in our project and |
|||
our community a harassment-free experience for everyone, regardless of age, body |
|||
size, disability, ethnicity, gender identity and expression, level of experience, |
|||
nationality, personal appearance, race, religion, or sexual identity and |
|||
orientation.</p> |
|||
<h2 id="our-standards">Our Standards</h2> |
|||
<p>Examples of behavior that contributes to creating a positive environment |
|||
include:</p> |
|||
<ul> |
|||
<li>Using welcoming and inclusive language</li> |
|||
<li>Being respectful of differing viewpoints and experiences</li> |
|||
<li>Gracefully accepting constructive criticism</li> |
|||
<li>Focusing on what is best for the community</li> |
|||
<li>Showing empathy towards other community members</li> |
|||
</ul> |
|||
<p>Examples of unacceptable behavior by participants include:</p> |
|||
<ul> |
|||
<li>The use of sexualized language or imagery and unwelcome sexual attention or |
|||
advances</li> |
|||
<li>Trolling, insulting/derogatory comments, and personal or political attacks</li> |
|||
<li>Public or private harassment</li> |
|||
<li>Publishing others' private information, such as a physical or electronic |
|||
address, without explicit permission</li> |
|||
<li>Other conduct which could reasonably be considered inappropriate in a |
|||
professional setting</li> |
|||
</ul> |
|||
<h2 id="our-responsibilities">Our Responsibilities</h2> |
|||
<p>Project maintainers are responsible for clarifying the standards of acceptable |
|||
behavior and are expected to take appropriate and fair corrective action in |
|||
response to any instances of unacceptable behavior.</p> |
|||
<p>Project maintainers have the right and responsibility to remove, edit, or |
|||
reject comments, commits, code, wiki edits, issues, and other contributions |
|||
that are not aligned to this Code of Conduct, or to ban temporarily or |
|||
permanently any contributor for other behaviors that they deem inappropriate, |
|||
threatening, offensive, or harmful.</p> |
|||
<h2 id="scope">Scope</h2> |
|||
<p>This Code of Conduct applies both within project spaces and in public spaces |
|||
when an individual is representing the project or its community. Examples of |
|||
representing a project or community include using an official project e-mail |
|||
address, posting via an official social media account, or acting as an appointed |
|||
representative at an online or offline event. Representation of a project may be |
|||
further defined and clarified by project maintainers.</p> |
|||
<h2 id="enforcement">Enforcement</h2> |
|||
<p>Instances of abusive, harassing, or otherwise unacceptable behavior may be |
|||
reported by contacting the project lead at eli@mozilla.com. All |
|||
complaints will be reviewed and investigated and will result in a response that |
|||
is deemed necessary and appropriate to the circumstances. The project team is |
|||
obligated to maintain confidentiality with regard to the reporter of an incident. |
|||
Further details of specific enforcement policies may be posted separately.</p> |
|||
<p>Project maintainers who do not follow or enforce the Code of Conduct in good |
|||
faith may face temporary or permanent repercussions as determined by other |
|||
members of the project's leadership.</p> |
|||
<h2 id="attribution">Attribution</h2> |
|||
<p>This Code of Conduct is adapted from the <a href="http://contributor-covenant.org" target="_blank">Contributor Covenant</a>, version 1.4, |
|||
available at <a href="http://contributor-covenant.org/version/1/4/" target="_blank">http://contributor-covenant.org/version/1/4</a></p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="./" class="navigation navigation-prev " aria-label="Previous page: Contributing"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="development.html" class="navigation navigation-next " aria-label="Next page: Development Process"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Code of Conduct","level":"1.10.1","depth":2,"next":{"title":"Development Process","level":"1.10.2","depth":2,"path":"contributing/development.md","ref":"contributing/development.md","articles":[]},"previous":{"title":"Contributing","level":"1.10","depth":1,"path":"contributing/README.md","ref":"contributing/README.md","articles":[{"title":"Code of Conduct","level":"1.10.1","depth":2,"path":"contributing/code-of-conduct.md","ref":"contributing/code-of-conduct.md","articles":[]},{"title":"Development Process","level":"1.10.2","depth":2,"path":"contributing/development.md","ref":"contributing/development.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"contributing/code-of-conduct.md","mtime":"2017-02-15T17:19:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,560 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Development Process · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
|
|||
<link rel="prev" href="code-of-conduct.html" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../customization/"> |
|||
|
|||
<a href="../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../customization/simple.html"> |
|||
|
|||
<a href="../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../customization/advanced.html"> |
|||
|
|||
<a href="../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="code-of-conduct.html"> |
|||
|
|||
<a href="code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.10.2" data-path="development.html"> |
|||
|
|||
<a href="development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Development Process</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="developing-neutrino">Developing Neutrino</h1> |
|||
<p>Developing and contributing to Neutrino and its core presets is done through our monorepo located at |
|||
<a href="https://github.com/mozilla-neutrino/neutrino-dev" target="_blank">https://github.com/mozilla-neutrino/neutrino-dev</a>. The code is broken up into a couple different sections: |
|||
packages and documentation.</p> |
|||
<p><em>Note: In this guide, commands executable from the command line are prepended with <code>❯</code>. Lines not starting |
|||
with this symbol show sample console output from running the previous command.</em></p> |
|||
<h2 id="getting-started">Getting started</h2> |
|||
<p>The first step to start developing neutrino-dev is forking the repository to your own GitHub account.</p> |
|||
<p><a href="https://github.com/mozilla-neutrino/neutrino-dev/fork" target="_blank">Fork mozilla-neutrino/neutrino-dev on GitHub</a></p> |
|||
<p>Once that is done, you can clone your copy of the repository on your computer, replacing <code>USER</code> with the username |
|||
of the account you forked the repository to:</p> |
|||
<pre class="language-"><code class="lang-bash">❯ <span class="token function">git</span> clone git@github.com:USER/neutrino-dev.git |
|||
❯ <span class="token function">cd</span> neutrino-dev |
|||
</code></pre> |
|||
<h2 id="making-changes">Making changes</h2> |
|||
<p>When you make changes to neutrino-dev, you should make them in a branch separate from <code>master</code>. Start from the |
|||
master branch and create a new branch for your changes.</p> |
|||
<p><em>Example: You want to create a core preset for JavaScript Standard Style. You need a new branch for this work.</em></p> |
|||
<pre class="language-"><code class="lang-bash">❯ <span class="token function">git</span> checkout -b standard-style |
|||
Switched to a new branch <span class="token string">'standard-style'</span> |
|||
</code></pre> |
|||
<p>While making changes, be sure to test your code out for expected operation. If possible or applicable, write a |
|||
test that can verify these changes in the future.</p> |
|||
<h2 id="submitting-a-pull-request">Submitting a pull request</h2> |
|||
<p>Once you are satisified with your changes, you should commit them and submit a pull request. Use <code>git add</code> |
|||
in order to add files that should be commited. Give your changes a descriptive but not overly verbose message.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ <span class="token function">git</span> add <span class="token keyword">.</span> |
|||
❯ <span class="token function">git</span> commit -m <span class="token string">"Feature: Adding new core preset for JavaScript Standard Style"</span> |
|||
❯ <span class="token function">git</span> push origin standard-style |
|||
</code></pre> |
|||
<p>Now if you open the GitHub page for your repository, GitHub should display a button to open a pull request for |
|||
the branch and commit you just pushed. When filling out the details of the pull request, try to be as descriptive |
|||
as possible, following our detailed <a href="./">contribution guidelines</a>.</p> |
|||
<h2 id="receiving-updates">Receiving updates</h2> |
|||
<p>If you need to update your local copy of neutrino-dev to be in sync with the main neutrino-dev repository, you |
|||
will want to fetch upstream changes. Add the main neutrino-dev repo as an upstream to your local copy, then fetch |
|||
the latest changes from the master branch.</p> |
|||
<pre class="language-"><code class="lang-bash">❯ <span class="token function">git</span> checkout master |
|||
❯ <span class="token function">git</span> remote add upstream https://github.com/mozilla-neutrino/neutrino-dev.git |
|||
❯ <span class="token function">git</span> pull upstream master |
|||
</code></pre> |
|||
<h2 id="congrats">Congrats!</h2> |
|||
<p>You just made a contribution to Neutrino! We are so happy to have your help! :tada:</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="code-of-conduct.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Code of Conduct"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Development Process","level":"1.10.2","depth":2,"previous":{"title":"Code of Conduct","level":"1.10.1","depth":2,"path":"contributing/code-of-conduct.md","ref":"contributing/code-of-conduct.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"contributing/development.md","mtime":"2017-02-15T19:19:59.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,601 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Contributing · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="code-of-conduct.html" /> |
|||
|
|||
|
|||
<link rel="prev" href="../cli/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../customization/"> |
|||
|
|||
<a href="../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../customization/simple.html"> |
|||
|
|||
<a href="../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../customization/advanced.html"> |
|||
|
|||
<a href="../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.10" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="code-of-conduct.html"> |
|||
|
|||
<a href="code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="development.html"> |
|||
|
|||
<a href="development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Contributing</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="contributing">Contributing</h1> |
|||
<h3 id="so-you-want-to-contribute-to-neutrino">So, you want to contribute to Neutrino?</h3> |
|||
<p>Thank you for wanting to help out with Neutrino! We are very happy that you want to contribute and have put together |
|||
this guide to help you get started. We want to do our best to help you make successful contribution and be part of our |
|||
team.</p> |
|||
<h3 id="participation-conduct">Participation Conduct</h3> |
|||
<p>In order to ensure everyone has a fair, pleasant, and inclusive experience contributing to Neutrino, we ask that you |
|||
abide by our <a href="CODE_OF_CONDUCT.md">community participation guidelines</a>, based on the |
|||
<a href="http://contributor-covenant.org/" target="_blank">Contributor Covenant</a>. Please read and understand it for everyone's benefit.</p> |
|||
<p>Following these guidelines helps to communicate that you respect the time of the developers managing |
|||
and developing Neutrino. In return, we will show you respect in addressing your issue, assessing changes, |
|||
and helping you finalize your pull requests.</p> |
|||
<h3 id="what-we-need">What we need</h3> |
|||
<p>There is always room for improvement and expansion in Neutrino. Some things that could always help:</p> |
|||
<ul> |
|||
<li>Triaging and fixing bugs</li> |
|||
<li>Adding tests to Neutrino which can help ensure it functions properly with new contributions</li> |
|||
<li>Keeping core presets up to date with the best Webpack and Babel options</li> |
|||
<li>Expanding documentation, writing tutorials, and creating example projects</li> |
|||
<li>Something else, of course!</li> |
|||
</ul> |
|||
<h3 id="what-we-probably-dont-need">What we probably don't need</h3> |
|||
<p>While we are happy to review <strong>any</strong> contribution, there are some things that are best left as an external project:</p> |
|||
<ul> |
|||
<li><em>Additional presets</em>. While neutrino-dev does contain a number of core presets, we created and maintain these because |
|||
they were core to most of the projects we personally work on. If there are more presets you believe should be maintained |
|||
by the core, then feel free to raise an issue and we can discuss! Most likely though, additional presets can be |
|||
externally maintained and published to npm. It still has the same reach potential as bringing it into the core, without |
|||
raising the maintenance burden for Neutrino unnecessarily.</li> |
|||
<li><em>Scaffolding and boilerplates.</em> The goal of Neutrino is to remove over-reliance on boilerplates, instead opting to |
|||
push users into consuming presets. Neutrino itself will not add commands to scaffold out new projects or create |
|||
boilerplate repositories. We do keep a collection of examples-as-documentation for getting started with Neutrino |
|||
presets, but do not wish to govern project structure more than necessary. These types of projects can be maintained |
|||
externally.</li> |
|||
</ul> |
|||
<h2 id="support">Support</h2> |
|||
<p>Neutrino team members and contributors are here to help you! Should you need assistance or have questions in using |
|||
Neutrino or its core presets, please consider asking on Stack Overflow or other channel rather than filing issues. We |
|||
would prefer to keep our GitHub issues clear for bugs, feature requests, discussions, and relevant information related |
|||
to its development.</p> |
|||
<h2 id="guidelines">Guidelines</h2> |
|||
<ul> |
|||
<li>Please make a good-faith effort to ensure that code that goes into neutrino-dev follows the existing patterns and |
|||
quality that is already present in the repository.</li> |
|||
<li>Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get |
|||
community feedback.</li> |
|||
<li>Strive for code to be readable. Prefer following functional programming paradigms over object-oriented ones where |
|||
possible.</li> |
|||
<li>Keep feature versions as small as possible, preferably one new feature per version.</li> |
|||
</ul> |
|||
<h2 id="getting-started">Getting started</h2> |
|||
<p>Most contributions will involve working with the neutrino-dev codebase. Please refer to the <a href="development.html">development |
|||
documentation</a> for technical details on getting started.</p> |
|||
<h2 id="filing-bugs-and-issues">Filing bugs and issues</h2> |
|||
<p>When filing an issue, try to answer these questions:</p> |
|||
<ul> |
|||
<li>What version of Neutrino are you using?</li> |
|||
<li>Are you trying to use any presets? If so, which ones, and what versions?</li> |
|||
<li>Are you using the Yarn client or the npm client? What version?</li> |
|||
<li>What version of Node.js are you using?</li> |
|||
<li>What operating system are you using?</li> |
|||
<li>What did you do?</li> |
|||
<li>What did you expect to happen?</li> |
|||
<li>What actually happened, contrary to your expectations?</li> |
|||
</ul> |
|||
<h2 id="feature-requests-or-enhancements">Feature Requests or Enhancements</h2> |
|||
<p>Please file an issue describing your request in detail:</p> |
|||
<ul> |
|||
<li>What is the goal of the change?</li> |
|||
<li>What are the pros and cons of the change?</li> |
|||
<li>Could this dramatically improve the experience of our users?</li> |
|||
</ul> |
|||
<p>Please be open to discussion, and we will respect your time by fairly evaluating your request. In the event that your |
|||
request is deemed to not be acceptable to move forward, please understand that isn't a criticism of you as a person, |
|||
but rather that the idea in its present form may not be right at this time. We respect you and your ideas, and will |
|||
always encourage contributors to continue to make proposals.</p> |
|||
<h2 id="code-review-process">Code review process</h2> |
|||
<p>Code is reviewed by Neutrino team members for quality, conformance to existing patterns, and functionality.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../cli/" class="navigation navigation-prev " aria-label="Previous page: CLI"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="code-of-conduct.html" class="navigation navigation-next " aria-label="Next page: Code of Conduct"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Contributing","level":"1.10","depth":1,"next":{"title":"Code of Conduct","level":"1.10.1","depth":2,"path":"contributing/code-of-conduct.md","ref":"contributing/code-of-conduct.md","articles":[]},"previous":{"title":"CLI","level":"1.9","depth":1,"path":"cli/README.md","ref":"cli/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"contributing/README.md","mtime":"2017-02-15T19:16:01.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,156 @@ |
|||
# Creating Neutrino Presets |
|||
|
|||
Creating Neutrino presets can solve a number of use cases in a manner which captures all the necessary configuration |
|||
and dependencies necessary to accomplish those use cases: |
|||
|
|||
- You find yourself needing to make the same modifications to all the projects you work on. |
|||
- Your team wants to adopt a managed set of linting rules across projects. |
|||
- You want to add functionality to the build pipeline that has not yet been encapsulated by an existing preset. |
|||
- You want to support building for more platforms than existing presets support. |
|||
|
|||
## Getting Started |
|||
|
|||
Neutrino presets are Node.js modules or packages that export a function which accepts a Neutrino instance. You can use |
|||
this instance to modify the configuration, provide your own, expose custom options for your preset, listen for build |
|||
events, and execute functionality. |
|||
|
|||
At a bare minimum, let's start with our package boilerplate for an empty Neutrino preset: |
|||
|
|||
```js |
|||
module.exports = neutrino => { |
|||
// ... |
|||
}; |
|||
``` |
|||
|
|||
If you are using Babel or Neutrino to build your preset (so meta) with ES modules: |
|||
|
|||
```js |
|||
export default neutrino => { |
|||
// ... |
|||
}; |
|||
``` |
|||
|
|||
## Configuring |
|||
|
|||
The Neutrino instance provided to your custom configurator has a `config` property that is an instance of |
|||
[webpack-chain](https://github.com/mozilla-rpweb/webpack-chain). We won't go in-depth of all the configuration |
|||
possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your |
|||
particular use case. |
|||
|
|||
This `neutrino.config` is an accumulation of all configuration set up to this moment. Every Neutrino preset interacts |
|||
with and makes changes through this config, which is all available to your preset. |
|||
|
|||
## Events |
|||
|
|||
Neutrino exposes events for various stages of the build process your preset can hook into **if necessary**. |
|||
|
|||
- `prestart`: Triggered prior to creating a development bundle or launching a dev server. |
|||
- `start`: Triggered after the development bundle has finished or the dev server has been stopped. |
|||
- `prebuild`: Triggered prior to creating a production build. |
|||
- `build`: Triggered after the production build has completed. |
|||
- `pretest`: Triggered prior to invoking any test runners. |
|||
- `test`: Triggered when test runners can start, or after they have all completed. |
|||
|
|||
_Example: Log to the console when a build finishes._ |
|||
|
|||
```js |
|||
module.exports = neutrino => { |
|||
neutrino.on('build', () => console.log('whew!')); |
|||
}; |
|||
``` |
|||
|
|||
## Including and merging other presets |
|||
|
|||
If your preset depends on other Neutrino presets, or you are creating a preset that is a combination of multiple |
|||
presets, you can install them as dependencies and simply call them from your preset, providing them with your Neutrino |
|||
instance. When users install your preset, they will bring along your dependencies defined with your package without |
|||
needing to also include your extended presets in their own commands. |
|||
|
|||
_Example: Define a Neutrino preset which combines Node.js and Mocha presets._ |
|||
|
|||
```js |
|||
const node = require('neutrino-preset-node'); |
|||
const mocha = require('neutrino-preset-mocha'); |
|||
|
|||
module.exports = neutrino => { |
|||
node(neutrino); |
|||
mocha(neutrino); |
|||
|
|||
// neutrino.config now contains the accumulation of configuration from |
|||
// the Node.js and Mocha presets |
|||
}; |
|||
``` |
|||
|
|||
## Sample Preset: JavaScript Standard Style |
|||
|
|||
Let's create a preset from scratch which allows users to augment their project with |
|||
[JavaScript Standard Style](http://standardjs.com/). For this sample preset we are using |
|||
[Yarn](https://yarnpkg.com) for managing dependencies, but you may use the npm client if you desire. |
|||
|
|||
```bash |
|||
# Create a new directory for your project and change into it: |
|||
mkdir neutrino-preset-standard-style && cd neutrino-preset-standard-style |
|||
|
|||
# Initialize your project with a package.json: |
|||
yarn init --yes |
|||
|
|||
# Install the dependencies needed by our preset |
|||
yarn add standard-loader standard |
|||
|
|||
# Create the main file to the preset, e.g. index.js |
|||
touch index.js |
|||
``` |
|||
|
|||
Let's edit this `index.js` file to add our preset: |
|||
|
|||
```js |
|||
const path = require('path'); |
|||
|
|||
module.exports = neutrino => { |
|||
neutrino.config |
|||
.rule('lint') |
|||
.pre() |
|||
.test(/\.jsx?$/) |
|||
.include(path.join(process.cwd(), 'src')) |
|||
.loader('standard', require.resolve('standard-loader'), { |
|||
snazzy: false |
|||
}); |
|||
}; |
|||
``` |
|||
|
|||
## Custom Data |
|||
|
|||
If you want to expose custom options for your preset that are not appropriate to be stored in the Neutrino config, |
|||
there is a `neutrino.custom` object namespace you can attach to. This way you can document to others how they can |
|||
go about affecting how your preset works. |
|||
|
|||
_Example:_ |
|||
|
|||
```js |
|||
module.exports = neutrino => { |
|||
neutrino.custom.standardStyle = { |
|||
quiet: false, |
|||
logLevel: 'warn' |
|||
}; |
|||
|
|||
// ... |
|||
}; |
|||
``` |
|||
|
|||
## Important Points |
|||
|
|||
- When working with paths, remember that your preset will be running in the context of a project. You should take care |
|||
to define application paths by referencing the current working directory with `process.cwd()`. For example if you |
|||
wanted to work with the project's "src" directory, you would merge the path via `path.join(process.cwd(), 'src)`. |
|||
- Because of package conflicts or unknown organization of a project's `node_modules` directory, it is usually safer to |
|||
define loaders, Babel plugins, and Babel presets to Webpack absolutely than by name. In our sample preset above, while |
|||
we could have passed the loader as just `'standard-loader'`, it is safer to resolve its location relative to our preset |
|||
than having Webpack et al to attempt to load it later from a different, potentially incorrect location. Instead we |
|||
passed `require.resolve('standard-loader')`. |
|||
|
|||
## Publishing |
|||
|
|||
When your preset is ready to be used by others, feel free to publish and distribute! By putting your preset on npm, |
|||
GitHub, or another location, you can share the hard work put into abstracting away configuration and save everyone |
|||
in the community time and effort. As long as Neutrino can require your preset, it puts no restrictions on where |
|||
you want to host it. |
@ -0,0 +1,587 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Advanced · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../presets/creating-presets.md" /> |
|||
|
|||
|
|||
<link rel="prev" href="simple.html" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="simple.html"> |
|||
|
|||
<a href="simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.6.2" data-path="advanced.html"> |
|||
|
|||
<a href="advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../contributing/"> |
|||
|
|||
<a href="../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../contributing/development.html"> |
|||
|
|||
<a href="../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Advanced</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="advanced-neutrino-customization">Advanced Neutrino Customization</h1> |
|||
<p>No two JavaScript projects are ever the same, and as such there may be times when you will need to make modifications |
|||
to the way your Neutrino preset is building your project. If you need more customization than can be afforded by |
|||
augmenting your project's package.json, consider using this advanced configuration guide to modify your build as |
|||
needed.</p> |
|||
<h2 id="creating-a-project-specific-preset">Creating a project-specific preset</h2> |
|||
<p>Neutrino configurations are backed by <a href="https://github.com/mozilla-rpweb/webpack-chain" target="_blank">webpack-chain</a>, a library for |
|||
making modifications to a Webpack configuration using a fluent or chained API. When your project needs more advanced |
|||
build overrides, you will be interacting with this API in order to perform modifications.</p> |
|||
<p>First, we need to create a project-specific preset to make these changes. This can either be a JS file or a directory |
|||
with an <code>index.js</code> file. Since Neutrino uses Node.js and Webpack for interacting with presets, it is helpful to |
|||
understand that this is a Node.js module. By exporting a function from your module, you will be provided with a Neutrino |
|||
instance for modifying the build. Let's create a file called <code>neutrino-custom.js</code> in the root of our example project:</p> |
|||
<pre class="language-"><code class="lang-js"><span class="token comment" spellcheck="true">// neutrino-custom.js</span> |
|||
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> neutrino <span class="token operator">=</span><span class="token operator">></span> <span class="token punctuation">{</span> |
|||
<span class="token comment" spellcheck="true">// ...</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<p>At the moment our custom configurator isn't doing anything, but it does get us far enough to be able to tell Neutrino |
|||
to use it for additional configuration. Modify your package.json and add <code>neutrino-custom.js</code> as an additional preset.</p> |
|||
<p><em>Note: Neutrino will attempt to load this module relative to the current working directory, which should be the root of |
|||
your project.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"presets"</span><span class="token operator">:</span> <span class="token punctuation">[</span> |
|||
<span class="token string">"neutrino-preset-react"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"neutrino-preset-karma"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"neutrino-custom.js"</span> |
|||
<span class="token punctuation">]</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">,</span> |
|||
<span class="token property">"scripts"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"build"</span><span class="token operator">:</span> <span class="token string">"neutrino build"</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<p>Other than actually changing the config, that is all the setup necessary for Neutrino to pick up your custom changes.</p> |
|||
<h2 id="configuring">Configuring</h2> |
|||
<p>The Neutrino instance provided to your custom configurator has a <code>config</code> property that is an instance of |
|||
<a href="https://github.com/mozilla-rpweb/webpack-chain" target="_blank">webpack-chain</a>. We won't go in-depth of all the configuration |
|||
possibilities here, but encourage you to check out the documentation for webpack-chain for instruction on your |
|||
particular use case.</p> |
|||
<p>This <code>neutrino.config</code> is an accumulation of all configuration set up to this moment. Every Neutrino preset interacts |
|||
with and makes changes through this config, which is all available to you. For example, if you are using the presets |
|||
<code>neutrino-preset-react</code> and <code>neutrino-preset-karma</code>, any options set can be extended, manipulated, or removed.</p> |
|||
<p><em>Example: Neutrino's React preset adds <code>.jsx</code> as a module extension. Let's remove it.</em></p> |
|||
<pre class="language-"><code class="lang-js">module<span class="token punctuation">.</span>exports <span class="token operator">=</span> neutrino <span class="token operator">=</span><span class="token operator">></span> <span class="token punctuation">{</span> |
|||
neutrino<span class="token punctuation">.</span>config<span class="token punctuation">.</span>resolve<span class="token punctuation">.</span>extensions<span class="token punctuation">.</span><span class="token keyword">delete</span><span class="token punctuation">(</span><span class="token string">'.jsx'</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<p><em>Example: Neutrino's Node.js preset uses <code>babel-preset-env</code> to support Node.js v6.9. Let's change it to support back to |
|||
v4.2. This preset has a rule named "compile" and a loader named "babel".</em></p> |
|||
<pre class="language-"><code class="lang-js">module<span class="token punctuation">.</span>exports <span class="token operator">=</span> neutrino <span class="token operator">=</span><span class="token operator">></span> <span class="token punctuation">{</span> |
|||
neutrino<span class="token punctuation">.</span>config<span class="token punctuation">.</span>module |
|||
<span class="token punctuation">.</span><span class="token function">rule</span><span class="token punctuation">(</span><span class="token string">'compile'</span><span class="token punctuation">)</span> |
|||
<span class="token punctuation">.</span><span class="token function">loader</span><span class="token punctuation">(</span><span class="token string">'babel'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">{</span> options <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span> <span class="token punctuation">{</span> |
|||
options<span class="token punctuation">.</span>presets<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">.</span>targets<span class="token punctuation">.</span>node <span class="token operator">=</span> <span class="token number">4.2</span><span class="token punctuation">;</span> |
|||
|
|||
<span class="token keyword">return</span> <span class="token punctuation">{</span> options <span class="token punctuation">}</span><span class="token punctuation">;</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">;</span> |
|||
</code></pre> |
|||
<p>Presets can also have their own custom data in addition to the Neutrino config. See your respective preset for details. |
|||
Again, rather than reiterate the documentation for <a href="https://github.com/mozilla-rpweb/webpack-chain" target="_blank">webpack-chain</a> here, |
|||
please refer to its documentation for all ways you can modify a config instance to solve your use cases.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="simple.html" class="navigation navigation-prev " aria-label="Previous page: Simple"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../presets/creating-presets.md" class="navigation navigation-next " aria-label="Next page: Creating presets"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Advanced","level":"1.6.2","depth":2,"next":{"title":"Creating presets","level":"1.7","depth":1,"path":"presets/creating-presets.md","ref":"presets/creating-presets.md","articles":[]},"previous":{"title":"Simple","level":"1.6.1","depth":2,"path":"customization/simple.md","ref":"customization/simple.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"customization/advanced.md","mtime":"2017-02-14T23:24:07.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,534 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Customization · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="simple.html" /> |
|||
|
|||
|
|||
<link rel="prev" href="../presets/neutrino-preset-base/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.6" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="simple.html"> |
|||
|
|||
<a href="simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="advanced.html"> |
|||
|
|||
<a href="advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../contributing/"> |
|||
|
|||
<a href="../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../contributing/development.html"> |
|||
|
|||
<a href="../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Customization</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="neutrino-customization">Neutrino Customization</h1> |
|||
<p>No two JavaScript projects are ever the same, and as such there may be times when you will need to make modifications |
|||
to the way your Neutrino preset is building your project. Neutrino provides two ways you can augment a preset in the |
|||
context of a project without resorting to creating and publishing an entirely independent preset.</p> |
|||
<h3 id="simple-customization">Simple Customization</h3> |
|||
<p>By defining a configuration object within your package.json, Neutrino will merge this information with that provided by |
|||
your preset, effectively overriding those options with your custom data.</p> |
|||
<h3 id="advanced-customization">Advanced Customization</h3> |
|||
<p>You can also create a configuration override directly in your project which can extend the presets you are using.</p> |
|||
<hr> |
|||
<p>Continue for details on each technique.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../presets/neutrino-preset-base/" class="navigation navigation-prev " aria-label="Previous page: Base Preset"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="simple.html" class="navigation navigation-next " aria-label="Next page: Simple"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Customization","level":"1.6","depth":1,"next":{"title":"Simple","level":"1.6.1","depth":2,"path":"customization/simple.md","ref":"customization/simple.md","articles":[]},"previous":{"title":"Base Preset","level":"1.5.7","depth":2,"path":"presets/neutrino-preset-base/README.md","ref":"presets/neutrino-preset-base/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"customization/README.md","mtime":"2017-02-14T20:39:33.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,706 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Simple · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="advanced.html" /> |
|||
|
|||
|
|||
<link rel="prev" href="./" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../installation.html"> |
|||
|
|||
<a href="../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../usage.html"> |
|||
|
|||
<a href="../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../project-layout.html"> |
|||
|
|||
<a href="../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../presets/"> |
|||
|
|||
<a href="../presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../presets/neutrino-preset-web/"> |
|||
|
|||
<a href="../presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../presets/neutrino-preset-react/"> |
|||
|
|||
<a href="../presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../presets/neutrino-preset-node/"> |
|||
|
|||
<a href="../presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="../presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="../presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="../presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../presets/neutrino-preset-base/"> |
|||
|
|||
<a href="../presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter active" data-level="1.6.1" data-path="simple.html"> |
|||
|
|||
<a href="simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="advanced.html"> |
|||
|
|||
<a href="advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../api/"> |
|||
|
|||
<a href="../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../cli/"> |
|||
|
|||
<a href="../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../contributing/"> |
|||
|
|||
<a href="../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../contributing/development.html"> |
|||
|
|||
<a href="../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href=".." >Simple</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="simple-neutrino-customization">Simple Neutrino Customization</h1> |
|||
<p>No two JavaScript projects are ever the same, and as such there may be times when you will need to make modifications |
|||
to the way your Neutrino preset is building your project. By defining a configuration object within your package.json, |
|||
Neutrino will merge this information with that provided by your preset, effectively overriding those options with your |
|||
custom data.</p> |
|||
<h2 id="prepare-packagejson">Prepare package.json</h2> |
|||
<p>First, you will need to define a <code>config</code> section within your package.json. You |
|||
<a href="../usage.html#using-multiple-presets">may have already done this</a> if you |
|||
specified your presets through the <code>config</code> as opposed to flags through <code>scripts</code>:</p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"presets"</span><span class="token operator">:</span> <span class="token punctuation">[</span> |
|||
<span class="token string">"neutrino-preset-react"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"neutrino-preset-karma"</span> |
|||
<span class="token punctuation">]</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">,</span> |
|||
<span class="token property">"scripts"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"start"</span><span class="token operator">:</span> <span class="token string">"neutrino start"</span><span class="token punctuation">,</span> |
|||
<span class="token property">"build"</span><span class="token operator">:</span> <span class="token string">"neutrino build"</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<p>Add a new property to <code>config</code> named <code>neutrino</code>. This will be an object where we can provide configuration data:</p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"presets"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
|
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<p>Populate this object with configuration overrides. This is not a Webpack configuration, but rather a Neutrino-compatible |
|||
object based on <a href="https://github.com/mozilla-rpweb/webpack-chain" target="_blank">webpack-chain</a>.</p> |
|||
<h2 id="usage">Usage</h2> |
|||
<h3 id="entries">Entries</h3> |
|||
<p>Add files to named entry points, or define new entry points. This is a key named <code>entry</code>, with a value being an object. |
|||
This maps to points to enter the application. At this point the application starts executing.</p> |
|||
<p><em>Example: Define an entry point named <code>vendor</code> that bundles React packages separately from the application code.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"entry"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"vendor"</span><span class="token operator">:</span> <span class="token punctuation">[</span> |
|||
<span class="token string">"react"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"react-dom"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"react-hot-loader"</span><span class="token punctuation">,</span> |
|||
<span class="token string">"react-router-dom"</span> |
|||
<span class="token punctuation">]</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="module">Module</h3> |
|||
<p>The <code>module</code> object defines how the different types of modules within a project will be treated. Any additional |
|||
properties attached to <code>module</code> not defined below will be set on the final module configuration.</p> |
|||
<h4 id="module-rules">Module Rules</h4> |
|||
<p>Using <code>module.rule</code> creates rules that are matched to requests when modules are created. These rules can modify how the |
|||
module is created. They can apply loaders to the module, or modify the parser. </p> |
|||
<p>Using <code>module.rule.loader</code> allows to you define the Webpack loader and its options for processing a particular rule. |
|||
This loader is usually a <code>dependency</code> or <code>devDependency</code> of your project. Each <code>loader</code> object can specify a property |
|||
for the string <code>loader</code> and an <code>options</code> object.</p> |
|||
<p><em>Example: Add LESS loading to the project.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"less"</span><span class="token operator">:</span> <span class="token string">"^2.7.2"</span><span class="token punctuation">,</span> |
|||
<span class="token property">"less-loader"</span><span class="token operator">:</span> <span class="token string">"^2.2.3"</span> |
|||
<span class="token punctuation">}</span><span class="token punctuation">,</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"module"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"rule"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"styles"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"test"</span><span class="token operator">:</span> <span class="token string">"/\\.less$/"</span><span class="token punctuation">,</span> |
|||
<span class="token property">"loader"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"less"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"loader"</span><span class="token operator">:</span> <span class="token string">"less-loader"</span><span class="token punctuation">,</span> |
|||
<span class="token property">"options"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"noIeCompat"</span><span class="token operator">:</span> <span class="token boolean">true</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="output">Output</h3> |
|||
<p>The <code>output</code> object contains a set of options instructing Webpack on how and where it should output your bundles, |
|||
assets, and anything else you bundle or load with Webpack. This option can be any property/value combination that |
|||
<a href="https://webpack.js.org/configuration/output/" target="_blank">Webpack accepts</a>.</p> |
|||
<p><em>Example: Change the public path of the application.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"output"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"publicPath"</span><span class="token operator">:</span> <span class="token string">"https://cdn.example.com/assets/"</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="node">Node</h3> |
|||
<p>Use <code>node</code> to customize the Node.js environment using polyfills or mocks:</p> |
|||
<p><em>Example: mock the <code>__filename</code> and <code>__dirname</code> Node.js globals.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"node"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"__filename"</span><span class="token operator">:</span> <span class="token string">"mock"</span><span class="token punctuation">,</span> |
|||
<span class="token property">"__dirname"</span><span class="token operator">:</span> <span class="token string">"mock"</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="devserver">DevServer</h3> |
|||
<p>Use <code>devServer</code> to customize webpack-dev-server and change its behavior in various ways.</p> |
|||
<p><em>Example: gzip the application when serving and listen on port 9000.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"devServer"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"compress"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> |
|||
<span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">9000</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="resolve">Resolve</h3> |
|||
<p>Use <code>resolve</code> to change how modules are resolved. When using <code>resolve.extensions</code> and <code>resolve.modules</code>, these should be |
|||
specified as arrays, and will be merged with their respective definitions used in inherited presets. Any additional |
|||
properties attached to <code>resolve</code> not defined below will be set on the final module configuration.</p> |
|||
<p><em>Example: Add <code>.mjs</code> as a resolving extension and specify modules are located in a <code>custom_modules</code> directory.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"resolve"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"extensions"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">".mjs"</span><span class="token punctuation">]</span><span class="token punctuation">,</span> |
|||
<span class="token property">"modules"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">"custom_modules"</span><span class="token punctuation">]</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="resolveloader">ResolveLoader</h3> |
|||
<p>Use <code>resolveLoader</code> to change how loader packages are resolved. When using <code>resolveLoader.extensions</code> and |
|||
<code>resolveLoader.modules</code>, these should be specified as arrays, and will be merged with their respective definitions used |
|||
in inherited presets. Any additional properties attached to <code>resolveLoader</code> not defined below will be set on the final |
|||
module configuration.</p> |
|||
<p><em>Example: Add <code>.loader.js</code> as a loader extension and specify modules are located in a <code>web_loaders</code> directory.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"resolve"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"extensions"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">".loader.js"</span><span class="token punctuation">]</span><span class="token punctuation">,</span> |
|||
<span class="token property">"modules"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">"web_loaders"</span><span class="token punctuation">]</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h3 id="additional-configuration">Additional configuration</h3> |
|||
<p>Any top-level properties you set on <code>config.neutrino</code> will be added to the configuration.</p> |
|||
<p><em>Example: Change the Webpack performance options to error when exceeding performance budgets.</em></p> |
|||
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span> |
|||
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"neutrino"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"performance"</span><span class="token operator">:</span> <span class="token punctuation">{</span> |
|||
<span class="token property">"hints"</span><span class="token operator">:</span> <span class="token string">"error"</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
<span class="token punctuation">}</span> |
|||
</code></pre> |
|||
<h2 id="advanced-configuration">Advanced Configuration</h2> |
|||
<p>With the options defined above in your package.json, you can perform a variety of build customizations on a per-project |
|||
basis. In the event that you need more customization than what is afforded through JSON, consider either switching to |
|||
<a href="advanced.html">advanced configuration</a>, or <a href="../creating-presets.md">creating your own preset</a>.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="./" class="navigation navigation-prev " aria-label="Previous page: Customization"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="advanced.html" class="navigation navigation-next " aria-label="Next page: Advanced"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Simple","level":"1.6.1","depth":2,"next":{"title":"Advanced","level":"1.6.2","depth":2,"path":"customization/advanced.md","ref":"customization/advanced.md","articles":[]},"previous":{"title":"Customization","level":"1.6","depth":1,"path":"customization/README.md","ref":"customization/README.md","articles":[{"title":"Simple","level":"1.6.1","depth":2,"path":"customization/simple.md","ref":"customization/simple.md","articles":[]},{"title":"Advanced","level":"1.6.2","depth":2,"path":"customization/advanced.md","ref":"customization/advanced.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"customization/simple.md","mtime":"2017-02-14T22:48:31.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook.js"></script> |
|||
<script src="../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,524 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Jest Preset · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../neutrino-preset-base/" /> |
|||
|
|||
|
|||
<link rel="prev" href="../neutrino-preset-mocha/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../../"> |
|||
|
|||
<a href="../../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../../installation.html"> |
|||
|
|||
<a href="../../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../../usage.html"> |
|||
|
|||
<a href="../../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../../project-layout.html"> |
|||
|
|||
<a href="../../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../neutrino-preset-web/"> |
|||
|
|||
<a href="../neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../neutrino-preset-react/"> |
|||
|
|||
<a href="../neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../neutrino-preset-node/"> |
|||
|
|||
<a href="../neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../neutrino-preset-karma/"> |
|||
|
|||
<a href="../neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../neutrino-preset-mocha/"> |
|||
|
|||
<a href="../neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.5.6" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../neutrino-preset-base/"> |
|||
|
|||
<a href="../neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../../customization/"> |
|||
|
|||
<a href="../../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../../customization/simple.html"> |
|||
|
|||
<a href="../../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../../customization/advanced.html"> |
|||
|
|||
<a href="../../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../../api/"> |
|||
|
|||
<a href="../../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../../cli/"> |
|||
|
|||
<a href="../../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../../contributing/"> |
|||
|
|||
<a href="../../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../../contributing/development.html"> |
|||
|
|||
<a href="../../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href="../.." >Jest Preset</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="heading">heading</h1> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../neutrino-preset-mocha/" class="navigation navigation-prev " aria-label="Previous page: Mocha Preset"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../neutrino-preset-base/" class="navigation navigation-next " aria-label="Next page: Base Preset"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Jest Preset","level":"1.5.6","depth":2,"next":{"title":"Base Preset","level":"1.5.7","depth":2,"path":"presets/neutrino-preset-base/README.md","ref":"presets/neutrino-preset-base/README.md","articles":[]},"previous":{"title":"Mocha Preset","level":"1.5.5","depth":2,"path":"presets/neutrino-preset-mocha/README.md","ref":"presets/neutrino-preset-mocha/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"presets/neutrino-preset-jest/README.md","mtime":"2017-02-14T17:15:41.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"../..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook.js"></script> |
|||
<script src="../../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,524 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Karma Preset · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../neutrino-preset-mocha/" /> |
|||
|
|||
|
|||
<link rel="prev" href="../neutrino-preset-node/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../../"> |
|||
|
|||
<a href="../../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../../installation.html"> |
|||
|
|||
<a href="../../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../../usage.html"> |
|||
|
|||
<a href="../../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../../project-layout.html"> |
|||
|
|||
<a href="../../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../neutrino-preset-web/"> |
|||
|
|||
<a href="../neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../neutrino-preset-react/"> |
|||
|
|||
<a href="../neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../neutrino-preset-node/"> |
|||
|
|||
<a href="../neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.5.4" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="../neutrino-preset-mocha/"> |
|||
|
|||
<a href="../neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../neutrino-preset-jest/"> |
|||
|
|||
<a href="../neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../neutrino-preset-base/"> |
|||
|
|||
<a href="../neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../../customization/"> |
|||
|
|||
<a href="../../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../../customization/simple.html"> |
|||
|
|||
<a href="../../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../../customization/advanced.html"> |
|||
|
|||
<a href="../../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../../api/"> |
|||
|
|||
<a href="../../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../../cli/"> |
|||
|
|||
<a href="../../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../../contributing/"> |
|||
|
|||
<a href="../../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../../contributing/development.html"> |
|||
|
|||
<a href="../../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href="../.." >Karma Preset</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="heading">heading</h1> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../neutrino-preset-node/" class="navigation navigation-prev " aria-label="Previous page: Node.js Preset"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../neutrino-preset-mocha/" class="navigation navigation-next " aria-label="Next page: Mocha Preset"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Karma Preset","level":"1.5.4","depth":2,"next":{"title":"Mocha Preset","level":"1.5.5","depth":2,"path":"presets/neutrino-preset-mocha/README.md","ref":"presets/neutrino-preset-mocha/README.md","articles":[]},"previous":{"title":"Node.js Preset","level":"1.5.3","depth":2,"path":"presets/neutrino-preset-node/README.md","ref":"presets/neutrino-preset-node/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"presets/neutrino-preset-karma/README.md","mtime":"2017-02-14T17:15:41.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"../..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook.js"></script> |
|||
<script src="../../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,524 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Mocha Preset · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="../neutrino-preset-jest/" /> |
|||
|
|||
|
|||
<link rel="prev" href="../neutrino-preset-karma/" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="../../"> |
|||
|
|||
<a href="../../"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="../../installation.html"> |
|||
|
|||
<a href="../../installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="../../usage.html"> |
|||
|
|||
<a href="../../usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.4" data-path="../../project-layout.html"> |
|||
|
|||
<a href="../../project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="../"> |
|||
|
|||
<a href="../"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="../neutrino-preset-web/"> |
|||
|
|||
<a href="../neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="../neutrino-preset-react/"> |
|||
|
|||
<a href="../neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="../neutrino-preset-node/"> |
|||
|
|||
<a href="../neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="../neutrino-preset-karma/"> |
|||
|
|||
<a href="../neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.5.5" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="../neutrino-preset-jest/"> |
|||
|
|||
<a href="../neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="../neutrino-preset-base/"> |
|||
|
|||
<a href="../neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="../../customization/"> |
|||
|
|||
<a href="../../customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="../../customization/simple.html"> |
|||
|
|||
<a href="../../customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="../../customization/advanced.html"> |
|||
|
|||
<a href="../../customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="../creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="../../api/"> |
|||
|
|||
<a href="../../api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="../../cli/"> |
|||
|
|||
<a href="../../cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="../../contributing/"> |
|||
|
|||
<a href="../../contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="../../contributing/code-of-conduct.html"> |
|||
|
|||
<a href="../../contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="../../contributing/development.html"> |
|||
|
|||
<a href="../../contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href="../.." >Mocha Preset</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="heading">heading</h1> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="../neutrino-preset-karma/" class="navigation navigation-prev " aria-label="Previous page: Karma Preset"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="../neutrino-preset-jest/" class="navigation navigation-next " aria-label="Next page: Jest Preset"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Mocha Preset","level":"1.5.5","depth":2,"next":{"title":"Jest Preset","level":"1.5.6","depth":2,"path":"presets/neutrino-preset-jest/README.md","ref":"presets/neutrino-preset-jest/README.md","articles":[]},"previous":{"title":"Karma Preset","level":"1.5.4","depth":2,"path":"presets/neutrino-preset-karma/README.md","ref":"presets/neutrino-preset-karma/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"presets/neutrino-preset-mocha/README.md","mtime":"2017-02-14T17:15:41.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":"../..","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook.js"></script> |
|||
<script src="../../gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,553 @@ |
|||
|
|||
<!DOCTYPE HTML> |
|||
<html lang="" > |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
|||
<title>Project Layout · Neutrino</title> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<meta name="description" content=""> |
|||
<meta name="generator" content="GitBook 3.2.2"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="gitbook/style.css"> |
|||
|
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css"> |
|||
|
|||
|
|||
|
|||
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<meta name="HandheldFriendly" content="true"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
|||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png"> |
|||
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon"> |
|||
|
|||
|
|||
<link rel="next" href="presets/" /> |
|||
|
|||
|
|||
<link rel="prev" href="usage.html" /> |
|||
|
|||
|
|||
</head> |
|||
<body> |
|||
|
|||
<div class="book"> |
|||
<div class="book-summary"> |
|||
|
|||
|
|||
<div id="book-search-input" role="search"> |
|||
<input type="text" placeholder="Type to search" /> |
|||
</div> |
|||
|
|||
|
|||
<nav role="navigation"> |
|||
|
|||
|
|||
|
|||
<ul class="summary"> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<li class="chapter " data-level="1.1" data-path="./"> |
|||
|
|||
<a href="./"> |
|||
|
|||
|
|||
Introduction |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.2" data-path="installation.html"> |
|||
|
|||
<a href="installation.html"> |
|||
|
|||
|
|||
Installation |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.3" data-path="usage.html"> |
|||
|
|||
<a href="usage.html"> |
|||
|
|||
|
|||
Usage |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter active" data-level="1.4" data-path="project-layout.html"> |
|||
|
|||
<a href="project-layout.html"> |
|||
|
|||
|
|||
Project Layout |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5" data-path="presets/"> |
|||
|
|||
<a href="presets/"> |
|||
|
|||
|
|||
Presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.5.1" data-path="presets/neutrino-preset-web/"> |
|||
|
|||
<a href="presets/neutrino-preset-web/"> |
|||
|
|||
|
|||
Web Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.2" data-path="presets/neutrino-preset-react/"> |
|||
|
|||
<a href="presets/neutrino-preset-react/"> |
|||
|
|||
|
|||
React Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.3" data-path="presets/neutrino-preset-node/"> |
|||
|
|||
<a href="presets/neutrino-preset-node/"> |
|||
|
|||
|
|||
Node.js Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.4" data-path="presets/neutrino-preset-karma/"> |
|||
|
|||
<a href="presets/neutrino-preset-karma/"> |
|||
|
|||
|
|||
Karma Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.5" data-path="presets/neutrino-preset-mocha/"> |
|||
|
|||
<a href="presets/neutrino-preset-mocha/"> |
|||
|
|||
|
|||
Mocha Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.6" data-path="presets/neutrino-preset-jest/"> |
|||
|
|||
<a href="presets/neutrino-preset-jest/"> |
|||
|
|||
|
|||
Jest Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.5.7" data-path="presets/neutrino-preset-base/"> |
|||
|
|||
<a href="presets/neutrino-preset-base/"> |
|||
|
|||
|
|||
Base Preset |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6" data-path="customization/"> |
|||
|
|||
<a href="customization/"> |
|||
|
|||
|
|||
Customization |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.6.1" data-path="customization/simple.html"> |
|||
|
|||
<a href="customization/simple.html"> |
|||
|
|||
|
|||
Simple |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.6.2" data-path="customization/advanced.html"> |
|||
|
|||
<a href="customization/advanced.html"> |
|||
|
|||
|
|||
Advanced |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.7" data-path="presets/creating-presets.md"> |
|||
|
|||
<span> |
|||
|
|||
|
|||
Creating presets |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.8" data-path="api/"> |
|||
|
|||
<a href="api/"> |
|||
|
|||
|
|||
API |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.9" data-path="cli/"> |
|||
|
|||
<a href="cli/"> |
|||
|
|||
|
|||
CLI |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10" data-path="contributing/"> |
|||
|
|||
<a href="contributing/"> |
|||
|
|||
|
|||
Contributing |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
<ul class="articles"> |
|||
|
|||
|
|||
<li class="chapter " data-level="1.10.1" data-path="contributing/code-of-conduct.html"> |
|||
|
|||
<a href="contributing/code-of-conduct.html"> |
|||
|
|||
|
|||
Code of Conduct |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
<li class="chapter " data-level="1.10.2" data-path="contributing/development.html"> |
|||
|
|||
<a href="contributing/development.html"> |
|||
|
|||
|
|||
Development Process |
|||
|
|||
</a> |
|||
|
|||
|
|||
|
|||
</li> |
|||
|
|||
|
|||
</ul> |
|||
|
|||
</li> |
|||
|
|||
|
|||
|
|||
|
|||
<li class="divider"></li> |
|||
|
|||
<li> |
|||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link"> |
|||
Published with GitBook |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
|
|||
</nav> |
|||
|
|||
|
|||
</div> |
|||
|
|||
<div class="book-body"> |
|||
|
|||
<div class="body-inner"> |
|||
|
|||
|
|||
|
|||
<div class="book-header" role="navigation"> |
|||
|
|||
|
|||
<!-- Title --> |
|||
<h1> |
|||
<i class="fa fa-circle-o-notch fa-spin"></i> |
|||
<a href="." >Project Layout</a> |
|||
</h1> |
|||
</div> |
|||
|
|||
|
|||
|
|||
|
|||
<div class="page-wrapper" tabindex="-1" role="main"> |
|||
<div class="page-inner"> |
|||
|
|||
<div id="book-search-results"> |
|||
<div class="search-noresults"> |
|||
|
|||
<section class="normal markdown-section"> |
|||
|
|||
<h1 id="project-layout">Project Layout</h1> |
|||
<p>Out of the box Neutrino presets expect a project to have a particular structure in order to make the |
|||
development process for new projects as quick as possible. This is broken up into three directories:</p> |
|||
<ul> |
|||
<li>Source code</li> |
|||
<li>Build assets</li> |
|||
<li>Testing</li> |
|||
</ul> |
|||
<p>Each of these directories are set up via convention by a Neutrino preset, but each can be customized as |
|||
desired by overriding the preset's configuration or using a different preset. See |
|||
<a href="custom-configuration.md">Custom Configuration</a> for detailed instructions.</p> |
|||
<h2 id="source-code">Source Code</h2> |
|||
<p>By default Neutrino presets expect all project source code to live in a directory named <code>src</code> in the |
|||
root of the project. This includes JavaScript files, CSS stylesheets, images, and any other assets |
|||
that would be available to your compiled project.</p> |
|||
<p>When running your project or creating a build bundle, a preset will look for this <code>src</code> directory for |
|||
the entry point(s) to your application and use this as the relative location for finding other assets |
|||
necessary for creating your builds.</p> |
|||
<h2 id="build-assets">Build Assets</h2> |
|||
<p>When creating a build bundle, a preset will put the compiled assets, including any generated |
|||
JavaScript files, into a directory named <code>build</code> by default. Typically your Neutrino preset will copy |
|||
any non-JavaScript files from the source directory over to the build directory, allowing you to maintain |
|||
the same relative path structure for static assets as is used for the source files.</p> |
|||
<p>Normally most projects will exclude checking in this build directory to source control. |
|||
Be sure to add this directory to your project's <code>.gitignore</code>, <code>.hgignore</code>, or similar file.</p> |
|||
<h2 id="testing">Testing</h2> |
|||
<p>Neutrino presets by default expect all tests to be located in a directory named <code>test</code>. In order to make the |
|||
separation between tests and test fixtures or harnesses easier to differentiate, Neutrino presets also |
|||
usually look for test files ending in <code>_test.js</code> or <code>.test.js</code>. See your specific test preset for more |
|||
detailed information about running tests and other conventions.</p> |
|||
|
|||
|
|||
</section> |
|||
|
|||
</div> |
|||
<div class="search-results"> |
|||
<div class="has-results"> |
|||
|
|||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1> |
|||
<ul class="search-results-list"></ul> |
|||
|
|||
</div> |
|||
<div class="no-results"> |
|||
|
|||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
|
|||
<a href="usage.html" class="navigation navigation-prev " aria-label="Previous page: Usage"> |
|||
<i class="fa fa-angle-left"></i> |
|||
</a> |
|||
|
|||
|
|||
<a href="presets/" class="navigation navigation-next " aria-label="Next page: Presets"> |
|||
<i class="fa fa-angle-right"></i> |
|||
</a> |
|||
|
|||
|
|||
|
|||
</div> |
|||
|
|||
<script> |
|||
var gitbook = gitbook || []; |
|||
gitbook.push(function() { |
|||
gitbook.page.hasChanged({"page":{"title":"Project Layout","level":"1.4","depth":1,"next":{"title":"Presets","level":"1.5","depth":1,"path":"presets/README.md","ref":"presets/README.md","articles":[{"title":"Web Preset","level":"1.5.1","depth":2,"path":"presets/neutrino-preset-web/README.md","ref":"presets/neutrino-preset-web/README.md","articles":[]},{"title":"React Preset","level":"1.5.2","depth":2,"path":"presets/neutrino-preset-react/README.md","ref":"presets/neutrino-preset-react/README.md","articles":[]},{"title":"Node.js Preset","level":"1.5.3","depth":2,"path":"presets/neutrino-preset-node/README.md","ref":"presets/neutrino-preset-node/README.md","articles":[]},{"title":"Karma Preset","level":"1.5.4","depth":2,"path":"presets/neutrino-preset-karma/README.md","ref":"presets/neutrino-preset-karma/README.md","articles":[]},{"title":"Mocha Preset","level":"1.5.5","depth":2,"path":"presets/neutrino-preset-mocha/README.md","ref":"presets/neutrino-preset-mocha/README.md","articles":[]},{"title":"Jest Preset","level":"1.5.6","depth":2,"path":"presets/neutrino-preset-jest/README.md","ref":"presets/neutrino-preset-jest/README.md","articles":[]},{"title":"Base Preset","level":"1.5.7","depth":2,"path":"presets/neutrino-preset-base/README.md","ref":"presets/neutrino-preset-base/README.md","articles":[]}]},"previous":{"title":"Usage","level":"1.3","depth":1,"path":"usage.md","ref":"usage.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","anchorjs"],"root":"./docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/mozilla-neutrino/neutrino-dev/"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit page","base":"https://github.com/mozilla-neutrino/neutrino-dev/tree/master/docs"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Neutrino","gitbook":"*"},"file":{"path":"project-layout.md","mtime":"2017-02-14T17:32:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-02-15T19:27:49.146Z"},"basePath":".","book":{"language":""}}); |
|||
}); |
|||
</script> |
|||
</div> |
|||
|
|||
|
|||
<script src="gitbook/gitbook.js"></script> |
|||
<script src="gitbook/theme.js"></script> |
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-edit-link/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-github/plugin.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.1/anchor.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-anchorjs/anchor-style.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-search/search.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script> |
|||
|
|||
|
|||
|
|||
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script> |
|||
|
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue