STENCIL

  • Docs
  • GitHub
Star

What's on this Page

What is Stencil?

A smart templating engine for service development

Stencil is a tool to eliminate run-once boilerplate code generally created by tools like create-react-app and eliminate the decade old practice of copying and pasting boilerplate from stackoverflow and other websites.

Instead you can write modules for your boilerplate and other “components” of an application, library, or etc and use them in your application/library/whatever else you dare to create.

Stencil enables this through a few different components:

  • Modules - The major selling point of stencil, allows you to create module groups of Go templates and other dependencies.
  • Native Extensions - Write code in any language and consume it within your templates.
  • Module Hooks - Allows modules to write to templates a module owns in a predictable strongly typed fashion, enabling various extension points.
  • Easy Debuggability - Using the stencil describe <path> command you’re able to see which module created which file when and where, removing the complexity of who created what.

Curious? Dig into our Getting Started docs to start creating!

  • About Stencil
    • What is Stencil?
    • License
  • Getting Started
    • Get Started Overview
    • Install Stencil
    • Quick Start
    • Module Quick Start
    • Native Extension Quick Start
  • Reference Docs
    • Reference Docs Overview
    • Stencil Modules Overview
    • Native Extensions
    • Template Module
    • Service Manifest
  • Functions
    • Functions Quick Reference
    • file.Block
    • file.Create
    • file.Delete
    • file.Path
    • file.RemoveAll
    • file.SetContents
    • file.SetPath
    • file.Skip
    • file.Static
    • stencil.AddToModuleHook
    • stencil.ApplyTemplate
    • stencil.Arg
    • stencil.Args
    • stencil.Exists
    • stencil.GetGlobal
    • stencil.GetModuleHook
    • stencil.ReadBlocks
    • stencil.ReadFile
    • stencil.SetGlobal
  • CLI
    • Commands Quick Reference
    • stencil
    • stencil create
    • stencil create module
    • stencil describe
    • stencil docs
    • stencil docs generate
    • stencil updater
    • stencil updater get-channel
    • stencil updater get-channels
    • stencil updater list-releases
    • stencil updater rollback
    • stencil updater set-channel
    • stencil updater status
    • stencil updater use
  • Contribute
    • Contribute to Stencil
    • Development
    • Documentation
  • Maintenance
Last updated: May 18, 2022: fix(bootstrap): v9.37.0 (#95) (f216eaa)
Improve this page
By the Stencil Authors
Hugo Logo
  • File an Issue
  • Get Help
  • Docs
  • GitHub
  • About Stencil
  • Getting Started
  • Reference Docs
  • Functions
  • CLI
  • Contribute
  • Maintenance