GithubHelp home page GithubHelp logo

umakantp / jsmart-loader Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 717 KB

jSmart loader to load Smarty files for webpack

License: MIT License

JavaScript 99.37% HTML 0.63%
jsmart-loader jsmart-webpack-loader smarty smarty-webpack webpack webpack-loader

jsmart-loader's People

Contributors

umakantp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsmart-loader's Issues

How to set default templates directory?

  • Error: ENOENT: no such file or directory, open 'ROOT_PACKAGE_JSON_DIR/layouts/layout.tpl'

Files:

src/index.tpl

{extends file='layouts/layout.tpl'}

{block 'content'}
  Extending Block Content from Layout Template
{/block}

src/templates/layouts/layout.tpl

<!DOCTYPE html>
<html lang="en">

<head>
  {include file='partials/head.tpl'}
</head>

<body>

  {block 'content'}
    HTML5 Boilerplate Hellow World
  {/block}

  { $javascript.bottom }
</body>

</html>

src/templates/partials/head.tpl

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Home</title>
{ $styles }
{ $javascript.head }

I got an error on src/templates/index.tpl {extends file='layouts/layout.tpl'}, but if i change this code to {extends file='src/templates/layouts/layout.tpl'} and {include file='src/templates/partials/head.tpl'} compile perfectly.

Question
There's any way to set templates root folder in webpack config? like options.rootDir = src/templates. So I could omit typing file='src/templates/... Thanks!

How to set default delimiters

It seems that there is no way to set default delimiters through options by now.
Hope to see an update to solve this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.