-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmt.1.html
More file actions
167 lines (167 loc) · 6.36 KB
/
Copy pathcmt.1.html
File metadata and controls
167 lines (167 loc) · 6.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>CMTools</title>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
<link rel="stylesheet" href="https://media.library.caltech.edu/cl-webcomponents/css/code-blocks.css">
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/copyToClipboard.js"></script>
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/footer-global.js"></script>
</head>
<body>
<header>
<a href="https://library.caltech.edu"><img src="https://media.library.caltech.edu/assets/caltechlibrary-logo.png" alt="Caltech Library logo"></a>
</header>
<a href="#main-content" class="visually-hidden">skip to main content</a>
<nav>
<ul>
<li><a href="/">All Library Apps</a></li>
<li><a href="index.html">Home</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="search.html">Search</a></li> -->
<li><a href="https://github.com/caltechlibrary/CMTools">Code Repository</a></li>
</ul>
</nav>
<section id="main-content">
<h1 id="name">NAME</h1>
<p>cmt</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>cmt <a href="#options">OPTIONS</a> INPUT_NAME</p>
<p>cmt <a href="#options">OPTIONS</a> INPUT_NAME [OUTPUT_NAME]</p>
<p>cmt <a href="#options">OPTIONS</a> INPUT_NAME [OUTPUT_NAME
OUTPUT_NAME …]</p>
<p>cmt –init deno-cli INPUT_NAME [EXECUTABLE_NAME …]</p>
<h1 id="description">DESCRIPTION</h1>
<p>cmt provides tooling for working with CodeMeta objects targeting your
Python, Go, TypeScript, or documentation build process.</p>
<p>cmt can be used to generate various code artifacts including the
following.</p>
<ul>
<li>README.md</li>
<li>CITATION.cff</li>
<li>about.md</li>
<li>search.md</li>
<li>version.py, version.go, version.js or version.ts</li>
<li>INSTALL.md (requires Git repository and LICENSE file)</li>
<li>INSTALL_NOTES_macOS.md</li>
<li>INSTALL_NOTES_Windows.md</li>
<li>installer.sh (requires Git repository and LICENSE file)</li>
<li>installer.ps1 (requires Git repository and LICENSE file)</li>
<li>Makefile (requires Git repository and LICENSE file), make.ps1</li>
<li>website.mak, website.ps1</li>
<li>release.bash (requires gh is installed), release.ps1</li>
<li>publish.bash (requires git), publish.ps1</li>
<li>page.tmpl (Pandoc template), page.hbs (Handlebarsjs)</li>
<li>site.css (a basic site.css based on Caltech Library Feeds
site.css)</li>
</ul>
<h1 id="options">OPTIONS</h1>
<p>Options come as the last parameter(s) on the command line.</p>
<dl>
<dt>-h, –help</dt>
<dd>
display help
</dd>
<dt>-v, –version</dt>
<dd>
display version
</dd>
<dt>-l, –license</dt>
<dd>
display license
</dd>
<dt>-i, –init PROJECT_TYPE</dt>
<dd>
initialize the project based on a project type name. Supported project
types are:
<dl>
<dt><strong>go</strong></dt>
<dd>
Go language CLI or service. Generates version.go and a Go-specific
Makefile.
</dd>
<dt><strong>python</strong></dt>
<dd>
Python project. Generates version.py.
</dd>
<dt><strong>deno-cli</strong></dt>
<dd>
Deno/TypeScript project that compiles to one or more CLI executables.
Generates version.ts and a Makefile with one <code>deno compile</code>
target per executable. Any extra arguments after the codemeta.json path
are treated as executable names; if none are given the project name from
codemeta.json is used. Automatically adds a “gen-code” task to
deno.json.
</dd>
<dt><strong>deno-bundle</strong></dt>
<dd>
Deno/TypeScript compiled to a single browser-side JavaScript bundle.
Generates a Makefile with a bundle build target. No version.ts is
created. Automatically adds a “gen-code” task to deno.json.
</dd>
<dt><strong>deno-es-module</strong></dt>
<dd>
Deno/TypeScript shipped as ES modules without bundling. Generates a
minimal Makefile with lint and type-check targets only. No version.ts is
created. Automatically adds a “gen-code” task to deno.json.
</dd>
<dt><strong>deno-webcomponent</strong></dt>
<dd>
Deno/TypeScript web component library. Generates a Makefile with targets
for running a custom elements manifest analyzer and building a demo
page. No version.ts is created. Automatically adds a “gen-code” task to
deno.json.
</dd>
<dt><strong>documentation</strong> / <strong>presentation</strong></dt>
<dd>
Documentation or presentation project. Generates standard files and a
generic Makefile but no version.* file. “presentation” is an alias for
“documentation”.
</dd>
</dl>
The following values are deprecated aliases kept for backward
compatibility: “deno” and “typescript” behave as “deno-cli”;
“javascript” also behaves as “deno-cli”.
</dd>
<dt>-L, –lang LANGUAGE</dt>
<dd>
this sets the language to use when generating Makefile.
</dd>
</dl>
<h1 id="examples">EXAMPLES</h1>
<p>Here’s an example of rendering <code>CITATION.cff</code> from a
<code>codemeta.json</code> file.</p>
<pre><code>cmt codemeta.json CITATION.cff</code></pre>
<p>Here’s an example of rendering <code>version.ts</code>,
<code>version.py</code>, and <code>version.go</code> from
<code>codemeta.json</code> file.</p>
<pre><code>cmt codemeta.json version.ts
cmt codemeta.json version.py
cmt codemeta.json version.go</code></pre>
<p>You can stack output files to generate several at once.</p>
<pre><code>cmt codemeta.json about.md CITATION.cff version.ts</code></pre>
<h3 id="project-initialization">Project Initialization</h3>
<p>Initialize a Go project:</p>
<pre><code>cmt --init go codemeta.json</code></pre>
<p>Initialize a Deno CLI project with a single executable named after
the project:</p>
<pre><code>cmt --init deno-cli codemeta.json</code></pre>
<p>Initialize a Deno CLI project with two named executables:</p>
<pre><code>cmt --init deno-cli codemeta.json mycmd myothercmd</code></pre>
<p>Initialize a browser-side Deno project that bundles to a single
JavaScript file:</p>
<pre><code>cmt --init deno-bundle codemeta.json</code></pre>
<p>Initialize a browser-side Deno project that ships as ES modules (no
bundling):</p>
<pre><code>cmt --init deno-es-module codemeta.json</code></pre>
<p>Initialize a Deno web component library:</p>
<pre><code>cmt --init deno-webcomponent codemeta.json</code></pre>
<p>Initialize a documentation or presentation project (no version.*
files):</p>
<pre><code>cmt --init documentation codemeta.json</code></pre>
</section>
<footer-global></footer-global>
</body>
</html>