How to use the marko/html.t function in marko

To help you get started, we’ve selected a few marko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marko-js / marko / test / autotests / widgets-compilation-deprecated / widget-types / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets/legacy"),
    marko_registerWidget = marko_widgets.rw,
    marko_defineWidget = marko_widgets.w,
    marko_widgetTypes = {
        "default": marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/widget-types/widget", function() {
          return marko_defineWidget(require("./widget"));
        }),
        mobile: marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/widget-types/widget-mobile", function() {
          return marko_defineWidget(require("./widget-mobile"));
        })
      },
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;
github marko-js / marko / test / autotests / widgets-compilation / component-template-non-index / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/component-template-non-index/template.component", function() {
      return require("./template.component");
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}
github marko-js / marko / test / autotests / widgets-compilation / bind-widget / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/bind-widget/widget", function() {
      return require("./widget");
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}
github marko-js / marko / test / autotests / widgets-compilation-deprecated / component-inline-multiple-roots / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/component-inline-multiple-roots/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var marko_component = {};

function render(input, out, widget, state) {
  var data = input;

  out.w("A
github marko-js / marko / test / autotests / components-compilation-deprecated / component-inline-var-module-exports / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_component,
    marko_components = require("marko/components"),
    marko_registerComponent = marko_components.rw,
    marko_componentType = marko_registerComponent("/marko-test$1.0.0/autotests/components-compilation-deprecated/component-inline-var-module-exports/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var foo = marko_component = {};

function render(input, out, component, state) {
  var data = input;

  out.w("
github marko-js / marko / test / autotests / widgets-compilation-deprecated / component-include-attr / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets/legacy"),
    marko_registerWidget = marko_widgets.rw,
    marko_defineWidget = marko_widgets.w,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/component-include-attr/index", function() {
      return marko_defineWidget(require("./"));
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_loadTag = marko_helpers.t,
    include_tag = marko_loadTag(require("marko/widgets/taglib/include-tag")),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("
github marko-js / marko / test / autotests / widgets-compilation / style-inline-less / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename);

function render(input, out) {
  var data = input;

  out.w("<div></div>");
}

marko_template._ = render;

marko_template.meta = {
    deps: [
      {
          type: "less",
          code: ".foo {\n        background-color: 'red';\n    }",
          virtualPath: "./index.marko.less",
          path: "./index.marko"
github marko-js / marko / test / autotests / widgets-compilation / component-template-entry / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_component = require("./component"),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/component-template-entry/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}
github marko-js / marko / test / autotests / widgets-compilation / component-inline-export-default / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/component-inline-export-default/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var marko_component = {};

function render(input, out, widget, state) {
  var data = input;

  out.w("");
github marko-js / marko / test / autotests / widgets-compilation-deprecated / top-level-inline-style / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename);

function render(input, out) {
  var data = input;

  out.w("<style>.foo{}</style><div></div>");
}

marko_template._ = render;

marko_template.meta = {};