Giter VIP home page Giter VIP logo

Comments (4)

darky avatar darky commented on August 28, 2024

You can resolve this issue, modify end of file extra/coffee-script.js:

// "function" == typeof define && define.amd ? define(function() {
//     return CoffeeScript
// }) : root.CoffeeScript = CoffeeScript
root.CoffeeScript = CoffeeScript

This modification force assign to window object - CoffeeScript, that necessary for ECT


Ты можешь пофиксить это, изменив конец файла extra/coffee-script.js следующим образом:

// "function" == typeof define && define.amd ? define(function() {
//     return CoffeeScript
// }) : root.CoffeeScript = CoffeeScript
root.CoffeeScript = CoffeeScript

Данное изменение в любом случае даст присвоить объекту window - CoffeeScript, что нужно для нормальной работы ECT

from ect.

darky avatar darky commented on August 28, 2024

Hey, it's issue not resolved. And trick with coffee not right. Ect should natively support this situation.


Рано закрывать эту проблему. Трюк с coffee - временное решение. Ect должен сам разруливать эту ситуацию с requirejs и coffee.

from ect.

darky avatar darky commented on August 28, 2024

Add pull request #37
But this potentially can raise error, if *.ect template will start load before coffee-script loaded.
So you can tune your require.config for avoid this situation:

  • add in require.config.paths - "ect": "<relative path to ect>"
  • add in require.config.paths - "coffee-script": "<relative path to coffee-script>"
  • add in require.config.shim - "ect" : {"deps": ["coffee-script"]}

This guarantees, that coffee-script will load before ect


Добавил pull request #37
Но теоритечески может возникнуть ошибка, если *.ect шаблоны начнут грузиться до того, как coffee-script был загружен. Но вы можете поправить ваш require.config для избежания этой ситуации.

  • Добавьте в require.config.paths - "ect": "<относительный путь до ect>"
  • Добавьте в require.config.paths - "coffee-script": "<относительный путь до coffee-script>"
  • Добавьте в require.config.shim - "ect" : {"deps": ["coffee-script"]}

Это гарантирует, что coffee-script будет загружен до ect

from ect.

baryshev avatar baryshev commented on August 28, 2024

Now ECT defined lowercase ect RequireJS module that depends on lowercase coffee-script module.

from ect.

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.