Comments (5)
You can drop it in vendor, and then require it in app.js require('./vendor/moment')
or whatever.
Might want to add exports
in there to make it more commonjs happy.
from ember-tools.
Perfect. Makes sense. Thanks!
On May 6, 2013 9:12 AM, "Ryan Florence" [email protected] wrote:
You can drop it in vendor, and then require it in app.js
require('./vendor/moment') or whatever.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-17491225
.
from ember-tools.
Sorry to repost on this old issue but I just started with ember a couple weeks ago and I'm not trying out ember-tools. I have my app moved over to the ember-tools directory layout but I'm now stuck trying to get moment.js working. As you mentioned in this issue I dropped moment.js (the latest minified version from the website) into the vendor directory. I then added the line:
require('../vendor/moment');
to app.js
. Building the app works fine but when I open up the website I get the following error:
Uncaught ReferenceError: moment is not defined
Do I need to make any modifications to moment.js itself? You mentioned adding exports
to make commonjs more happy. Can you elaborate on that a bit? Thank you for your help!
from ember-tools.
try
moment = require('../vendor/moment');
from ember-tools.
Awesome, thank you. That's all it was.
from ember-tools.
Related Issues (20)
- Can't seem to include custom views HOT 1
- Template not bound to view when generated in subfolder HOT 1
- How do use mixins in models
- Use Handlebars runtime-only version
- Boolean data type should render checkbox
- How to set destination for templates.js and index.js?
- Ability to customize config/app.js and config/routes.js path? HOT 2
- NodeJS app
- install fail on nodejs v0.11.11
- Build fails when jquery.cookie is added to app.js
- ember-tools should ignore .svn/ directories HOT 1
- Install fails on node v0.10.28
- Can't build application. HOT 2
- Install fails on windows 8 x64 HOT 2
- Install fails on node v0.12.0 HOT 1
- Can you offer some guidance on where to put global patches?
- ember build -w not rebuilding project HOT 2
- installing ember tools on vagrant HOT 1
- Problems with latest ember-data 1.0.0-BETA.3 HOT 11
- Default build places Model declaration after Route causing: “Object has no method 'eachTransformedAttribute'” 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 ember-tools.