0.1.5 • Published 7 months ago

owler v0.1.5

Weekly downloads
1
License
MIT
Repository
-
Last release
7 months ago

owler

JavaScript templates for node.js.

GitHub package.json version GitHub last commit

Installation

you can use npm install owler or yarn add owler

Example

<!DOCTYPE html>
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark">

<head>
  <meta charset="utf-8" />
  <link rel="dns-prefetch" href="https://github.githubassets.com" />
  <script>
    const a = 'asdfasdfasdf';
    console.log(a);

    function testFunc() {
      console.log('testFunc');
    }
    testFunc();
  </script>
  <style>
    .test {
      color: #445566;
    }

    .test1 {
      color: #445566;
    }
  </style>
</head>

<body>
  <div>
    div content
    <span>span content</span>
    <br />
    <span o-text="name"></span>
    <p o-if="true">{{name}},{{age}}</p>
    <article>{{student}}</article>
    <o-include src="./include.html"></o-include>
    <o-include src="./include1.html" />
    <input />
    <div class="o-for-of" o-for="item of dataList">
      <span>{{item}}</span>
    </div>
    <div class="o-for-in" o-for="item in dataObject">
      <span o-text="item">{{item.a}}</span>
    </div>
  </div>
  <script>
    const a = 'asdfasdfasdf';
    console.log(a);

    function testFunc() {
      console.log('testFunc');
    }
    testFunc();
  </script>
  <style>
    .test {
      color: #445566;
    }

    .test1 {
      color: #445566;
    }
  </style>
</body>

</html>

Usage

const renderHTML = owler.render(html, {
  dataList: [1, 2, 3, 4, 5],
  dataObject: {
    a: 1,
    b: 2
  },
  name: 'semmy',
  age: 18,
  student: 'i am student',
  test: 'test',
});
0.1.1

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.5

7 months ago

0.1.0

1 year ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.3

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

4 years ago