You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few ways to accomplish this right now:
If you're targeting the web, you can just use the 'old-school' approach of including a script element pointing to crafty.js before your own file. Crafty will then be available as a global.
If (as is increasingly more common) you're wanting to import Crafty as a module, Crafty is available on npm. You can check out this example repo.
Crafty itself is currently built using browserify, so if you have very specific needs you can always clone the repository and import the various pieces directly. You can see the root file that defines the "normal" version of crafty here
Hello guys. How can i import crafty js to another js file for using it ?
The text was updated successfully, but these errors were encountered: