gulp-slm
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

gulp-slm version downloads

Let's use Slm with Gulp!

doctype html
html
  head
    meta charset="utf-8"
    title = this.title
  body
    h1 = this.title
    p = this.text
import slm from 'gulp-slm'
 
gulp.task('slm', _ => {
  const data = {
    title: 'Hello, world!',
    text: 'Hello world example for slm template.',
  }
 
  return gulp
    .src('./src/*.slm')
    .pipe(slm({locals: data}))
    .pipe(gulp.dest('./build/'))
})
Result (whitespace included for readability)
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
    <p>Hello world example for slm template.</p>
  </body>
</html>

Package Sidebar

Install

npm i gulp-slm

Weekly Downloads

26

Version

1.2.3

License

(Apache-2.0 OR MIT)

Unpacked Size

10.1 kB

Total Files

7

Last publish

Collaborators

  • simnalamburt