Skip to content

📦 This project give the possibility to generate a Google codelab with asciidoc or markdown files.

License

Notifications You must be signed in to change notification settings

DX-DeveloperExperience/codelab-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codelab Generator 🎉

📦 This project give the possibility to generate a Google codelab with asciidoc or markdown files.

You can use this module directly from the command line or from your code !

How to use ?

Command line

npx @dxdeveloperexperience/codelab-generator ./index.adoc ./target

npx @dxdeveloperexperience/codelab-generator ./index.md ./target

In your code

const codelab = require("@dxdeveloperexperience/codelab-generator");

// ...
await codelab(labTmpFile, labsOutputDir);

Configuration

Values

Name Values Description
base "" The base url of bower_components and elements

Examples

From shell

npx @dxdeveloperexperience/codelab-generator ./index.adoc ./target path/to/config.json

npx @dxdeveloperexperience/codelab-generator ./index.md ./target path/to/config.json

the config.json

{
  "base": "baseurl/test/"
}

or

const codelab = require("@dxdeveloperexperience/codelab-generator");

// ...
await codelab(labTmpFile, labsOutputDir, { base: "" });

Result, it will convert template from:

<script src="{{ &base }}bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="{{ &base }}elements/codelab.html" />

to:

<script src="baseurl/test/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="baseurl/test/elements/codelab.html" />

Contributors

  • Emmanuel DEMEY
  • Aurélien LOYER

About

📦 This project give the possibility to generate a Google codelab with asciidoc or markdown files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •