Comments (4)
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.
Hey, it's issue not resolved. And trick with coffee not right. Ect should natively support this situation.
Рано закрывать эту проблему. Трюк с coffee - временное решение. Ect должен сам разруливать эту ситуацию с requirejs и coffee.
from ect.
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.
Now ECT defined lowercase ect
RequireJS module that depends on lowercase coffee-script
module.
from ect.
Related Issues (20)
- Bigpipe
- Is this active? HOT 3
- webstorm support HOT 1
- Missing TypeScript support
- variable in template
- Referencing issues within JS script
- http://ectjs.com/ offline HOT 2
- Not maintained anymore? HOT 1
- ExpressJS sample code
- Pay for documentation website hosting!
- Callbacks inside templates HOT 4
- multiple root folder HOT 2
- no tag or releases on GitHub?
- Template in HEAD pushes content to body
- ectjs with jxcore HOT 1
- Problem on bower install
- Comiler function forgetting compiled version of template HOT 6
- How do I get length of Object? HOT 1
- Additional data to parent using extend
- root folder is ignored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ect.