Coder Social home page Coder Social logo

Comments (6)

chestnutchen avatar chestnutchen commented on July 22, 2024

上次在路上问过这个问题,这个还是要加上是吧?

from bat-ria.

leeight avatar leeight commented on July 22, 2024

cc @otakustay

from bat-ria.

otakustay avatar otakustay commented on July 22, 2024

嗯,不过我的计划是直接做成JSONP形式的用<script>引入~

from bat-ria.

Justineo avatar Justineo commented on July 22, 2024
<div>Template</div>

define(function() { return '<div>Template</div>'; });

@leeight 这么搞么?

from bat-ria.

otakustay avatar otakustay commented on July 22, 2024
require('etpl').parse('<div>Template</div>');

我原本是想搞成这样的,这还涉及到把原来的require全删了,似乎挺麻烦,还是搞成define算了

from bat-ria.

leeight avatar leeight commented on July 22, 2024

@leeight 这么搞么?

是的,TplMerge可以输出:

  1. <div>Template</div>
  2. define(function() { return '<div>Template</div>'; });

两种形式的代码,一个是普通的文本文件,一个是amd的模块

from bat-ria.

Related Issues (20)

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.