mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-24 11:37:11 -07:00
try to make site more intuitive
This commit is contained in:
parent
de753349e3
commit
6112dda189
5 changed files with 614 additions and 558 deletions
|
@ -57,9 +57,7 @@
|
|||
|
||||
<!-- Main component for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<h1>Kobalt</h1>
|
||||
<p>A universal build system for the exigent developer.</p>
|
||||
<img src="../pics/auto-completion.png" class="img-rounded"/>
|
||||
<h1>Documentation</h1>
|
||||
|
||||
<!--
|
||||
<p>
|
||||
|
@ -71,47 +69,6 @@
|
|||
|
||||
<div class="col-md-9">
|
||||
|
||||
<h2 class="section" id="downloading">Downloading and installing Kobalt</h2>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/cbeust/kobalt/releases/latest">Download the zip file</a> then unzip it in a location we'll call <code>KOBALT_HOME</code>:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
cd $KOBALT_HOME
|
||||
unzip kobalt-xxx.zip
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Change to your project directory and call the <code>kobaltw</code> command with <code>--init</code>:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
cd ~/java/project
|
||||
$KOBALT_HOME/kobaltw --init
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This command will do two things:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>Create a default <code>kobalt/src/Build.kt</code> file based on what was found there.
|
||||
<li>Install the Kobalt Wrapper in your current directory (script `kobaltw`) and in the <code>kobalt/</code> directory. From now on, you can just use <code>./kobaltw</code> to build and you can ignore <code>$KOBALT_HOME</code>.
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
You can now attempt to build your project with Kobalt:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
./kobaltw assemble
|
||||
</pre>
|
||||
|
||||
If your project follows a regular build structure (e.g. <a href="https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html">Maven's hierarchy</a>), this should compile your file and create a .jar file. If not, you will have to make a few edits to your <code>Build.kt</code>.
|
||||
|
||||
As of this writing, Kobalt supports Java and Kotlin projects.
|
||||
|
||||
<h2 class="section" id="structure">Structure of a build file</h2>
|
||||
|
||||
<h3 class="section" indent="1" id="general-concepts">General concepts</h3>
|
||||
|
@ -628,7 +585,7 @@ If you are interested in discussing Kobalt related topics with other fellow user
|
|||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script src="../js/kobalt.js"></script>
|
||||
<script>generateKobalt(1);</script>
|
||||
<script>generateKobalt();</script>
|
||||
|
||||
<!--
|
||||
<script src="../bootstrap/dist/js/docs.min.js"></script>
|
||||
|
|
156
getting-started/index.html
Normal file
156
getting-started/index.html
Normal file
|
@ -0,0 +1,156 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>
|
||||
|
||||
Kobalt, by Cedric Beust
|
||||
|
||||
</title>
|
||||
|
||||
<script type="text/javascript" src="../sh/scripts/shCore.js"></script>
|
||||
<script type="text/javascript" src="../sh/scripts/shBrushJScript.js"></script>
|
||||
<script type="text/javascript" src="../sh/scripts/shBrushJava.js"></script>
|
||||
<script type="text/javascript" src="../sh/scripts/shBrushPlain.js"></script>
|
||||
|
||||
<script>
|
||||
SyntaxHighlighter.defaults['gutter'] = false;
|
||||
SyntaxHighlighter.defaults['toolbar'] = false;
|
||||
SyntaxHighlighter.all();
|
||||
</script>
|
||||
|
||||
|
||||
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<!--
|
||||
<script src="../bootstrap/assets/js/ie-emulation-modes-warning.js"></script>
|
||||
-->
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- Favicons -->
|
||||
<!--
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
-->
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-238215-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<!-- Static navbar -->
|
||||
<nav id="kobalt-navbar" class="navbar navbar-default">
|
||||
</nav>
|
||||
|
||||
<!-- Main component for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<h1>Kobalt</h1>
|
||||
<p>A universal build system for the exigent developer.</p>
|
||||
<img src="../pics/auto-completion.png" class="img-rounded"/>
|
||||
|
||||
<!--
|
||||
<p>
|
||||
<a class="btn btn-lg btn-primary" href="../../components/#navbar" role="button">Download »</a>
|
||||
</p>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
<h2 class="section" id="downloading">1. Download Kobalt</h2>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/cbeust/kobalt/releases/latest">Download the zip file</a> then unzip it in a location we'll call <code>KOBALT_HOME</code>:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
cd $KOBALT_HOME
|
||||
unzip kobalt-xxx.zip
|
||||
</pre>
|
||||
|
||||
<h2 class="section" id="downloading">2. Initialize your project for Kobalt</h2>
|
||||
|
||||
<p>
|
||||
Change to your project directory and call the <code>kobaltw</code> command with <code>--init</code>:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
cd ~/java/project
|
||||
$KOBALT_HOME/kobaltw --init
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This command will do two things:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>Create a default <code>kobalt/src/Build.kt</code> file based on what was found there.
|
||||
<li>Install the Kobalt Wrapper in your current directory (script `kobaltw`) and in the <code>kobalt/</code> directory. From now on, you can just use <code>./kobaltw</code> to build and you can ignore <code>$KOBALT_HOME</code>.
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
You can now attempt to build your project with Kobalt:
|
||||
</p>
|
||||
|
||||
<pre class="brush:plain">
|
||||
./kobaltw assemble
|
||||
</pre>
|
||||
|
||||
If your project follows a regular build structure (e.g. <a href="https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html">Maven's hierarchy</a>), this should compile your file and create a .jar file. If not, you will have to make a few edits to your <code>Build.kt</code>.
|
||||
|
||||
As of this writing, Kobalt supports Java and Kotlin projects.
|
||||
|
||||
<h2 class="section" id="structure">3. Edit Build.kt</h2>
|
||||
|
||||
<pre class="brush:java">
|
||||
import com.beust.kobalt.*
|
||||
import com.beust.kobalt.plugin.kotlin.kotlinProject
|
||||
|
||||
val kobalt = kotlinProject {
|
||||
name = "kobalt"
|
||||
group = "com.beust"
|
||||
artifactId = name
|
||||
version = "0.62"
|
||||
directory = homeDir("kotlin/kobalt")
|
||||
}
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Table of contents -->
|
||||
<div class="col-md-3" id="table-of-contents">
|
||||
</div>
|
||||
</div> <!-- /container -->
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script src="../js/kobalt.js"></script>
|
||||
<script>generateKobalt(1);</script>
|
||||
|
||||
<!--
|
||||
<script src="../bootstrap/dist/js/docs.min.js"></script>
|
||||
-->
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<!--
|
||||
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
|
||||
-->
|
||||
|
||||
</body>
|
|
@ -55,14 +55,20 @@
|
|||
|
||||
<!-- Main component for a primary marketing message or call to action -->
|
||||
<div class="jumbotron">
|
||||
<h1>What is Kobalt?</h1>
|
||||
<h1>Kobalt: friendly, fast build system</h1>
|
||||
<img src="../pics/auto-completion.png" class="img-rounded"/>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="col-md-9">
|
||||
|
||||
<h2 class="section" id="overview">Overview</h2>
|
||||
Kobalt is a build system system featuring build files written in Kotlin. It's focused on offering an intuitive DSL and plug-in architecture, fast builds and build file auto completion from your favorite IDE.
|
||||
<h2 class="section" id="overview">Features</h2>
|
||||
<ul>
|
||||
<li><h4>Intuitive DSL and plug-in architecture</h4></li>
|
||||
<li><h4>Fast builds</h4></li>
|
||||
<li><h4>Build file auto-completion from your favorite IDE</h4></li>
|
||||
<li><h4>A cleaner syntax than Ant, Maven, Gradle, or SBT</h4></li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -123,10 +129,6 @@ Kobalt is currently in Beta but I'm already using it to build most of my project
|
|||
<li>... and of course, <a href="https://github.com/cbeust/kobalt/blob/master/kobalt/src/Build.kt">Kobalt itself</a> (this build file demonstrates multi projects and project dependencies).</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Where to next? Are you interested in writing some cool Kotlin code and contribute to Kobalt? Or maybe just download and run Kobalt on your own projects just to get a feel for it? Then proceed to <a href="../documentation/index.html">Kobalt's main documentation!</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
</p>
|
||||
|
||||
|
@ -142,7 +144,7 @@ Kobalt is currently in Beta but I'm already using it to build most of my project
|
|||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script src="../bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script src="../js/kobalt.js"></script>
|
||||
<script>generateKobalt(0);</script>
|
||||
<script>generateKobalt();</script>
|
||||
|
||||
<!--
|
||||
<script src="../../assets/js/docs.min.js"></script>
|
||||
|
|
25
js/kobalt.js
25
js/kobalt.js
|
@ -9,6 +9,14 @@ var content = [
|
|||
url: "../home/index.html",
|
||||
title: "Home"
|
||||
},
|
||||
{
|
||||
url: "../getting-started/index.html",
|
||||
title: "Getting Started"
|
||||
},
|
||||
{
|
||||
url: "../idea-plug-in/index.html",
|
||||
title: "IDEA plug-in"
|
||||
},
|
||||
{
|
||||
url: "../documentation/index.html",
|
||||
title: "Documentation"
|
||||
|
@ -21,17 +29,9 @@ var content = [
|
|||
url: "../plug-in-development/index.html",
|
||||
title: "Writing a Kobalt plug-in"
|
||||
},
|
||||
{
|
||||
url: "../idea-plug-in/index.html",
|
||||
title: "IDEA plug-in"
|
||||
},
|
||||
{
|
||||
url: "../ten-minutes/index.html",
|
||||
title: "Ten minutes"
|
||||
},
|
||||
{
|
||||
url: "../contributing/index.html",
|
||||
title: "Contributing"
|
||||
title: "Contribute"
|
||||
}
|
||||
|
||||
];
|
||||
|
@ -50,14 +50,15 @@ var after = '</ul>'
|
|||
+ '</nav>'
|
||||
;
|
||||
|
||||
function generateNavBar(index) {
|
||||
function generateNavBar() {
|
||||
var result = before;
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
var cls = "";
|
||||
if (index == i) {
|
||||
var c = content[i];
|
||||
var cleanUrl = c.url.replace("../", "")
|
||||
if (window.location.href.indexOf(cleanUrl) > -1) {
|
||||
cls = 'class="active"';
|
||||
}
|
||||
var c = content[i];
|
||||
result += '<li ' + cls + '><a href="' + c.url + '">' + c.title + '</a></li>';
|
||||
}
|
||||
result += after;
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue