<commit_before><!doctype html>
<meta charset=utf-8>
<link rel=stylesheet type=text/css href=screen.css>
<title>The Manual</title>

<body class=manual>

<code class=entry>ScoutCamp</code>
<span class=ipa>/skoutkamp/</span> Web Apps done right.

<h1>The <span class=purple>Manual</span></h1>

<h2>What is ScoutCamp?</h2>

<p><strong>ScoutCamp</strong> is a framework for <a href=http://nodejs.org/>
Node.js</a> you can use to build <strong>web apps</strong>. It offers libraries
for easy client-side and server-side <strong>scripting</strong>. It also
automatically <strong>optimizes</strong> your content <strong>for the web
</strong> when you publish it. Installing this framework gives you:</p>

<ul class=speech>
  <li><code class=entry>Scout.js</code>
  <span class=ipa>/skout/</span> Ajax library that lets you asynchronously get
  data computed from the optimized Camp server.
  <li><code class=entry>Camp.js</code>
  <span class=ipa>/kamp/</span> Outstanding Node.js web server that lets
  you focus on your content, and make seamless Ajax calls.
  <li><code class=entry>Node.js</code>
  <span class=ipa>/nōd/</span> Optimized, performance-centric, and scalable
  web server that fits the need of all web apps, especially yours, and easy
  to use thanks to its javascript configuration file.
  <li><code class=entry>Plate.js</code>
  <span class=ipa>/pleɪt/</span> Templating system for {{=content|text}} in text files.
</ul>

<h2>The files</h2>

<p>The <strong>file structure</strong> ruffly looks like this:</p>

<pre>
web/         # web content
server.js    # server script
Makefile     # build script</pre>

<p>Using the <code>make</code> command publishes your content from
<code>web/</code> to a new <code>publish/</code> folder, and then starts your
server there.</p>

<p>Here is a <strong>more detailed</strong> view of the ScoutCamp files:</p>

<pre>
README.md       # quick starting guide
Makefile        # handy build script
server.js       # your server!
doc/
  manual.html   # awesome reading material
lib/
  camp.js       # outstanding web server
  plate.js      # templating engine
test/
  test.js
  test-plate.js
web/            # your web content!
  index.html    # root of the website
  robots.txt    # file for spiders, always handy
  js/
    scout.js    # scout.js, always within reach
  ...

# Worth noting: you can find amazing default web stuff
# at <a href=http://html5boilerplate.com/>html5boilerplate.com</a>.</pre>

<h2>Basic Usage</h2>

<h2>Advanced Usage</h2>


  <!-- old --><hr size=20 color=fuschia>

<p>We let you separate <strong>the Ajax engines</strong>, run on the
server, and <strong>the web interface</strong>, conveying information and
giving the possibility of interaction with the engines.</p>
</ul>

<h2>Where should I start?</h2><commit_msg>Work in progress on the Manual.<commit_after><!doctype html>
<meta charset=utf-8>
<link rel=stylesheet type=text/css href=screen.css>
<title>The Manual</title>

<body class=manual>

<code class=entry>ScoutCamp</code>
<span class=ipa>/skoutkamp/</span> Web Apps done right.

<h1>The <span class=purple>Manual</span></h1>

<h2>What is ScoutCamp?</h2>

<p><strong>ScoutCamp</strong> is a framework for <a href=http://nodejs.org/>
Node.js</a> you can use to build <strong>web apps</strong>. It offers libraries
for easy client-side and server-side <strong>scripting</strong>. It also
automatically <strong>optimizes</strong> your content <strong>for the web
</strong> when you publish it. Installing this framework gives you:</p>

<ul class=speech>
  <li><code class=entry>Scout.js</code>
  <span class=ipa>/skout/</span> Ajax library that lets you asynchronously get
  data computed from the optimized Camp server.
  <li><code class=entry>Camp.js</code>
  <span class=ipa>/kamp/</span> Outstanding Node.js web server that lets
  you focus on your content, and make seamless Ajax calls.
  <li><code class=entry>Node.js</code>
  <span class=ipa>/nōd/</span> Optimized, performance-centric, and scalable
  web server that fits the need of all web apps, especially yours, and easy
  to use thanks to its javascript configuration file.
  <li><code class=entry>Plate.js</code>
  <span class=ipa>/pleɪt/</span> Templating system for {{=templated|text}} in files.
</ul>

<h2>The Files</h2>

<p>The <strong>file structure</strong> ruffly looks like this:</p>

<pre>
web/           # web content
server.js      # server script
Makefile       # build &amp; run script
</pre>

<p>Here in <strong>more details</strong>:</p>

<pre>
README.md      # quick starting guide
Makefile       # does-everything script
server.js      # *your server!*
doc/
  manual.html  # awesome reading material
lib/
  camp.js      # outstanding web server
  plate.js     # templating engine
test/
  test.js      # some boring tests
  test-plate.js
web/           # *your website!*
  index.html   # root of the website
  robots.txt   # file for spiders, always handy
  js/
    scout.js   # keep within reach
  [...]

# Worth noting: you can find amazing default web stuff
# at <a href=http://html5boilerplate.com/>html5boilerplate.com</a>.
</pre>

<h2>Basic Usage</h2>

<h3>Kick-start</h3>

<p>If you have <code>node</code> installed, this should <strong>set fire to the
  dynamite!</strong></p>

<pre>
$ make     # yes, it is that simple!
</pre>

<p>This actually publishes your website from <u>web/</u> to a new
<u>publish/</u> folder. And then it starts your server. Yay!</p>

<h3>Scripts</h3>

<p>A simple <code>server.js</code> script looks like this:</p>

<pre>
// server.js: main server script

var Camp = require('lib/camp');          // import the camp
Camp.Server.start(80);                   // let's rock'n'roll!
</pre>

<p><strong>And that's all there is to it!</strong></p>

<p>Here is a <strong>more advanced</strong> example, using Ajax:</p>

<pre>
// server.js: yet another server script

var Camp = require('lib/camp');          // this camp again
Camp.add('greetings', function(data) {   // 'greetings' ajax hook
    return "oh hai!";
});
Camp.Server.start(80);                   // let's twist again!
</pre>

<pre>
&lt;!-- index.html: ajax triggering client -->

&lt;input type=button value=greet>

&lt;script>
  Scout('#button').on('click', function (query) {
    query.action = 'greetings';          // 'greetings' ajax hook
    query.data = {};                     // no data in this case
    query.resp = function (answer) {
      Scout('#button').value = answer;   // replace button text
    };
  });
&lt;script>
</pre>

<h2>Advanced Usage</h2>

<h3>Amazing Ajax</h3>

<h3>The Build Script</h3>

<p><strong>Crunchy details</strong> for the detail lover:</p>

<pre>
$ make          # is equivalent to:
$ make all      # which is equivalent to:
$ make clean deploy minify stop start

$ make clean    # deletes publish/ and logs
$ make deploy   # copies web/* to publish/*
$ make minify   # optimizes content in publish/
$ make stop     # kills all running servers
$ make start    # starts the server in publish/
$ make nodeploy # starts the server in web/
$ make update   # updates ScoutCamp
$ make test     # runs boring tests
$ make help     # even more crunchy details!
</pre>

<p><strong>ProTip<sup>&reg;</sup></strong> To run your server in
<strong>background mode</strong>, simply do <code>make</code> and then
<code>^Z</code> and then <code>bg</code>.</p>

<h2>The Libraries</h2>

  <!-- old --><hr size=20 color=fuschia>

<p>We let you separate <strong>the Ajax engines</strong>, run on the
server, and <strong>the web interface</strong>, conveying information and
giving the possibility of interaction with the engines.</p>
</ul>

<h2>Where should I start?</h2>
{'fraction_non_alphanumeric': 0.1380167451596023, 'fraction_numerical': 0.006279434850863423, 'mean_word_length': 3.62772397094431, 'pattern_counts': {'":': 0, '<': 239, '<?xml version=': 0, '>': 243, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4284157', 'n_tokens_mistral': 2558, 'n_tokens_neox': 2500, 'n_words': 819}