Created
January 4, 2016 11:38
-
-
Save stuf/cb02e699091de59750ac to your computer and use it in GitHub Desktop.
`require` in JS file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var b = require('./b'); | |
| module.exports = { | |
| a: 'success!', | |
| b: b | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| b: 'success!' | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <App Theme="Basic"> | |
| <JavaScript File="a.js" ux:Global="Test" /> | |
| <JavaScript> | |
| var Test = require('Test'); | |
| module.exports = { | |
| Test: JSON.stringify(Test) | |
| } | |
| </JavaScript> | |
| <Panel> | |
| <Text Value="{Test}" /> | |
| </Panel> | |
| </App> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ERROR: | |
| Name: Error | |
| ErrorMessage: require(): module not found: ./b | |
| FileName: N/A | |
| LineNumber: 0 | |
| JS StackTrace: Error: require(): module not found: ./b | |
| at anonymous (/Users/stuf/Code/Home/fuse/test01/test01/a.js:1) | |
| at anonymous (MainView:4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment