Skip to content

Commit 05f0e94

Browse files
polytypicCI script
authored andcommitted
cppsm init now does git init for you
1 parent b1f7d4d commit 05f0e94

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

index.html

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ <h3><a id="installation"></a> <a href="#contents">≡</a> <a href="#installation
192192
</ul>
193193
<h3><a id="quick-tour"></a> <a href="#contents"></a> <a href="#quick-tour">Quick tour</a></h3>
194194
<p>Here is a quick tour of basic <code>cppsm</code> functionality.</p>
195-
<p>Create a new project:</p>
195+
<p>Create a new empty project:</p>
196196
<pre><code class="hljs lang-bash">mkdir PROJECT &amp;&amp; cd &quot;$_&quot;
197-
git init
198197
cppsm init</code></pre>
199-
<p>Try the hello world example:</p>
198+
<p>At this point you could try adding dependencies or writing code, but let&#39;s
199+
actually try the hello world example:</p>
200200
<pre><code class="hljs lang-bash">cppsm init-hello
201201
cppsm test
202202
.build*/internals/hello</code></pre>
@@ -239,21 +239,23 @@ <h4><a id="cppsm-format"></a> <a href="#contents">≡</a> <a href="#cppsm-format
239239
<a target="_blank" href="https://clang.llvm.org/docs/ClangFormat.html">clang-format <i class="fas fa-xs fa-external-link-alt"></i></a> and
240240
<a target="_blank" href="https://prettier.io/">prettier <i class="fas fa-xs fa-external-link-alt"></i></a>.</p>
241241
<h4><a id="cppsm-init"></a> <a href="#contents"></a> <a href="#cppsm-init"><code>cppsm init</code></a></h4>
242-
<p>Initializes a new C++ project with cppsm configuration files or updates an
243-
existing project to use the latest configuration files. Run <code>cppsm init</code> in the
244-
top-level directory of a fresh git project.</p>
242+
<p>Initializes a new project with cppsm configuration files when run in an empty
243+
directory or updates an existing project to use the latest configuration files.
244+
See also <a href="#cppsm-init-hello"><code>cppsm init-hello</code></a> and
245+
<a href="#cppsm-init-library"><code>cppsm init-library</code></a>.</p>
245246
<p>Configuration variables:</p>
246247
<ul>
247248
<li><p><a id="init-name"></a><a href="#init-name"><code>NAME=&#39;...&#39;</code></a> specifies the base name for
248249
the project and defaults to the name of the current directory.</p>
249250
</li>
250251
<li><p><a id="init-version"></a><a href="#init-version"><code>VERSION=&#39;v1&#39;|&#39;...&#39;</code></a> specifies the
251-
version suffix for the project.</p>
252+
branch and version suffix for the project.</p>
252253
</li>
253254
</ul>
254255
<h4><a id="cppsm-init-hello"></a> <a href="#contents"></a> <a href="#cppsm-init-hello"><code>cppsm init-hello</code></a></h4>
255-
<p>Creates an example &quot;Hello, world!&quot; program in a freshly initialized project
256-
directory.</p>
256+
<p>Initializes a new project with an example &quot;Hello, world!&quot; program. This is only
257+
intended for educational purposes. See also <a href="#cppsm-init"><code>cppsm init</code></a> and
258+
<a href="#cppsm-init-library"><code>cppsm init-library</code></a>.</p>
257259
<pre><code>CMakeLists.txt
258260
equipment/
259261
testing.cpp/
@@ -278,8 +280,9 @@ <h4><a id="cppsm-init-hello"></a> <a href="#contents">≡</a> <a href="#cppsm-in
278280
hello.hpp
279281
library/
280282
hello.cpp</code></pre><h4><a id="cppsm-init-library"></a> <a href="#contents"></a> <a href="#cppsm-init-library"><code>cppsm init-library</code></a></h4>
281-
<p>Creates boilerplate for a simple library project with tests in a freshly
282-
initialized project directory.</p>
283+
<p>Initializes a new project with boilerplate for a simple library project in an
284+
empty directory. See also <a href="#cppsm-init"><code>cppsm init</code></a> and
285+
<a href="#cppsm-init-hello"><code>cppsm init-hello</code></a>.</p>
283286
<pre><code>CMakeLists.txt
284287
internals/
285288
CMakeLists.txt

index.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ Optional dependencies:
159159

160160
Here is a quick tour of basic `cppsm` functionality.
161161

162-
Create a new project:
162+
Create a new empty project:
163163

164164
```bash
165165
mkdir PROJECT && cd "$_"
166-
git init
167166
cppsm init
168167
```
169168

170-
Try the hello world example:
169+
At this point you could try adding dependencies or writing code, but let's
170+
actually try the hello world example:
171171

172172
```bash
173173
cppsm init-hello
@@ -255,22 +255,24 @@ Formats project files inplace using
255255

256256
#### <a id="cppsm-init"></a> [](#contents) [`cppsm init`](#cppsm-init)
257257

258-
Initializes a new C++ project with cppsm configuration files or updates an
259-
existing project to use the latest configuration files. Run `cppsm init` in the
260-
top-level directory of a fresh git project.
258+
Initializes a new project with cppsm configuration files when run in an empty
259+
directory or updates an existing project to use the latest configuration files.
260+
See also [`cppsm init-hello`](#cppsm-init-hello) and
261+
[`cppsm init-library`](#cppsm-init-library).
261262

262263
Configuration variables:
263264

264265
- <a id="init-name"></a>[`NAME='...'`](#init-name) specifies the base name for
265266
the project and defaults to the name of the current directory.
266267

267268
- <a id="init-version"></a>[`VERSION='v1'|'...'`](#init-version) specifies the
268-
version suffix for the project.
269+
branch and version suffix for the project.
269270

270271
#### <a id="cppsm-init-hello"></a> [](#contents) [`cppsm init-hello`](#cppsm-init-hello)
271272

272-
Creates an example "Hello, world!" program in a freshly initialized project
273-
directory.
273+
Initializes a new project with an example "Hello, world!" program. This is only
274+
intended for educational purposes. See also [`cppsm init`](#cppsm-init) and
275+
[`cppsm init-library`](#cppsm-init-library).
274276

275277
CMakeLists.txt
276278
equipment/
@@ -299,8 +301,9 @@ directory.
299301

300302
#### <a id="cppsm-init-library"></a> [](#contents) [`cppsm init-library`](#cppsm-init-library)
301303

302-
Creates boilerplate for a simple library project with tests in a freshly
303-
initialized project directory.
304+
Initializes a new project with boilerplate for a simple library project in an
305+
empty directory. See also [`cppsm init`](#cppsm-init) and
306+
[`cppsm init-hello`](#cppsm-init-hello).
304307

305308
CMakeLists.txt
306309
internals/

0 commit comments

Comments
 (0)