Giter Site home page Giter Site logo

Comments (5)

bary12 avatar bary12 commented on June 20, 2024 1

@thoughtbyte any thoughts about this? Take in mind that this is how webpack's ejs-loader works, and it seems to be a much better use for this plugin.

from parcel-plugin-ejs.

wulisensen avatar wulisensen commented on June 20, 2024

I very much agree with your suggestion.

I'm trying to use parcel from webpack.Now, i get a trouble about parcel-plugin-ejs: names is not defined.

<% if (names && names.length) { %> <% names.forEach(function(src,index){ %><video class="advideo" data-tag="<%= index %>"style="position:absolute;top:0;left:0;display:none;" poster="http://p1.ifengimg.com/a/2016/1021/loading0.jpg" src="<%= src %>" id="adPlayer" preload="auto"></video><% }) %> <% } %>

How to solve this problem now...

from parcel-plugin-ejs.

vabruzzo avatar vabruzzo commented on June 20, 2024

yep, thanks for the suggestion. i will be updating this.

the reason i published this first is to sue as a base for a custom ejs plugin that will read variables directly from the template file, in the form of front-matter, but i will make this change here!

thanks!

from parcel-plugin-ejs.

vabruzzo avatar vabruzzo commented on June 20, 2024

fixed in 0.2.0

from parcel-plugin-ejs.

LucienLee avatar LucienLee commented on June 20, 2024

How about work as pug in parcel?
put the data into ejs.config.js and compile with it
https://github.com/parcel-bundler/parcel/blob/75310e15f6fa3c8a0ce6593ada1bcca00240ea54/packages/core/parcel-bundler/src/assets/PugAsset.js#L36

from parcel-plugin-ejs.

Related Issues (4)

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.