How to use the @stencil/core.createRenderer function in @stencil/core

To help you get started, we’ve selected a few @stencil/core 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 ionic-team / ionic / packages / core / demos / universal / app.js View on Github external
var express = require('express');
var app = express();
var fs = require('fs');
var path = require('path');

console.log(path.join(__dirname, '../../dist/'))
var stencil = require('@stencil/core');
var renderer = stencil.createRenderer({
  rootDir: path.join(__dirname, '../../'),
  buildDir: path.join(__dirname, '../../dist/'),
  namespace: 'Ionic',
  logLevel: 'debug'

app.get('/', function (req, res, next) {
  console.log(`serve: ${req.url}`);

  var filePath = path.join(__dirname, '../vanilla/index.html');

  fs.readFile(filePath, 'utf-8', (err, html) => {
    if (err) {
github mitchellsimoens / stencil-boilerplate / server / Server.js View on Github external
createRenderer (rendererConfig = this.rendererConfig) {
        return createRenderer(rendererConfig);