You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 405da9c
Browse filesBrowse the repository at this point in the historyBrowse files
Elad Ben-Israel
authored
feat(sphinx): allow readme file to define sphinx header and reorganize topic (#229)
* Fix#228: allow readme file to define sphinx topic header
* Fix#185: move multi-language tabs after readme
* Update README
and [this gist](https://gist.github.com/eladb/9caa04253b268e8a8f3d658184202806)
298
+
as a reference.
299
+
300
+
To package your jsii module for Java, add the following configuration to the `jsii`
301
+
section in `package.json`:
252
302
253
303
```json
254
304
{
@@ -262,77 +312,70 @@ The following targets are currently supported:
262
312
}
263
313
```
264
314
265
-
*`dotnet` - packages the module as a .NET/NuGet package. Requires the following config:
315
+
### .NET
316
+
317
+
The `dotnet` target will produce a ready-to-publish NuGet package for your module.
318
+
319
+
The `$outdir/dotnet` directory will include `.nupkg` files, which can
320
+
be [published to NuGet](https://docs.microsoft.com/en-us/nuget/create-packages/publish-a-package).
321
+
322
+
To package your jsii module as for .NET, add this configuration to the `jsii`
The sphinx target emits a [Sphinx](http://www.sphinx-doc.org/en/master/)
343
+
documentation topic for the module, that can be used to build a Sphinx
344
+
documentation website. It's not a complete website.
278
345
279
-
/* Optional. Default: null (no icon). */
280
-
"iconUrl":"path/to/icon.svg",
281
346
282
-
/* Optional. Used in conjunction with assemblyOriginatorKeyFile. Default: false. */
283
-
"signAssembly":true,
347
+
The `$outdir/sphinx` directory will include two files:
284
348
285
-
/* Optional. Used in conjunction with signAssembly. Default: null. */
286
-
"assemblyOriginatorKeyFile":"path/to/key.snk"
287
-
}
288
-
}
289
-
```
349
+
*`<module-name>.rst` - the Sphinx topic entry point
350
+
*`<module-name>.README.md` (optional) - the module's README.md file (if exists)
290
351
291
-
*`sphinx` - produces sphinx documentation for the module. No config is required, but an empty
292
-
entry will be needed in order to package this target:
352
+
The `.rst` file will use [m2r](https://github.com/miyakogi/m2r) to
NOTE: if the first line of your `README.md` file starts with `# ` (an H1
357
+
header), the contents of this line will be used as the first header of the
358
+
topic. Otherwise, the module's name will be used.
359
+
360
+
You will need to build a Sphinx documentation website with this `.rst` included.
361
+
362
+
To package your jsii module as a Sphinx topic, add an empty object to the
363
+
`jsii` section in `package.json` under the `sphinx` key:
293
364
294
365
```json
295
366
{
296
367
"sphinx": { }
297
368
}
298
369
```
299
370
371
+
### JavaScript
300
372
301
-
## Features
302
-
303
-
### Language features
304
-
305
-
* Classes
306
-
* Inheritance
307
-
* Constructors
308
-
* Methods
309
-
* Properties
310
-
* Abstract Members
311
-
* Virtual Overrides
312
-
* Async Methods
313
-
* Variadic Arguments
314
-
* Static Methods and Properties
315
-
* Static Constants
316
-
* Abstract Classes
317
-
* Interfaces
318
-
* Enums
319
-
* Primitive Types: string, number, boolean, date, json, any
320
-
* Collection Types: arrays, maps
321
-
* Union Types (limited support)
322
-
* Module Dependencies
323
-
* Data Interfaces
324
-
325
-
### Source Languages
326
-
327
-
* TypeScript
373
+
An implicit JavaScript target will always be created. No configuration is needed.
328
374
329
-
### Target Languages
375
+
The `$outdir/js` directory will include that npm tarball of the module (created
376
+
with [`npm pack`](https://docs.npmjs.com/cli/pack)).
330
377
331
-
*__Java__ - generates a ready-to-publish Maven package.
332
-
*__.NET__ - generates a ready-to-publish NuGet package.
333
-
*__Sphinx__ - generates a Sphinx reStructuredText document for the module with README and reference docs.
334
-
*__Python__ (work in progress) - generates a ready-to-publish PyPI package.
335
-
*__Ruby__ (work in progress) - generates a ready-to-publish RubyGem.
378
+
Tarballs can be published to npmjs.org using [`npm publish`](https://docs.npmjs.com/cli/publish)
Copy file name to clipboardExpand all lines: packages/jsii-calc/test/assembly.jsii
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@
141
141
"license": "Apache-2.0",
142
142
"name": "jsii-calc",
143
143
"readme": {
144
-
"markdown": "## JSII Calculator\n\nThis library is used to demonstrate and test the features of JSII\n"
144
+
"markdown": "# jsii Calculator\n\nThis library is used to demonstrate and test the features of JSII\n\n## Sphinx\n\nThis file will be incorporated into the sphinx documentation.\n\nIf this file starts with an \"H1\" line (in our case `# jsii Calculator`), this\nheading will be used as the Sphinx topic name. Otherwise, the name of the module\n(`jsii-calc`) will be used instead.\n\n\n\n\n"
Copy file name to clipboardExpand all lines: packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@
141
141
"license": "Apache-2.0",
142
142
"name": "jsii-calc",
143
143
"readme": {
144
-
"markdown": "## JSII Calculator\n\nThis library is used to demonstrate and test the features of JSII\n"
144
+
"markdown": "# jsii Calculator\n\nThis library is used to demonstrate and test the features of JSII\n\n## Sphinx\n\nThis file will be incorporated into the sphinx documentation.\n\nIf this file starts with an \"H1\" line (in our case `# jsii Calculator`), this\nheading will be used as the Sphinx topic name. Otherwise, the name of the module\n(`jsii-calc`) will be used instead.\n\n\n\n\n"
0 commit comments