Created
December 18, 2012 18:09
-
-
Save enyo/4330464 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"name": "boot", | |
"description": "Lisa's website", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"enyo/opentip": "*", | |
"enyo/dropzone": "*" | |
}, | |
"scripts": [ | |
"index.js", | |
"lib/do-stuff.js", | |
"lib/foo-bar.js" | |
] | |
} |
This file contains 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
/ | |
package.json | |
views/ | |
[blabla] | |
node_modules/ | |
[blabla] | |
public/ | |
js/ | |
component.json | |
components/ | |
[all components are installed here.] | |
index.js | |
lib/ | |
do-stuff.js | |
foo-bar.js | |
build/ | |
build.js <- this file gets generated when you type `component build` and that's the file you include. |
This file contains 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 = { | |
alert: function() { | |
alert("hi"); | |
} | |
}; |
This file contains 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
<html> | |
<head> | |
<script src="js/buid/build.js"></script> | |
<script> | |
// executes the index.js file | |
// "boot" is the name you define in component.json. This could be anything. | |
require("boot"); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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
require("dropzone"); // Activates all dropzones | |
require("opentip"); // Activates all opentips | |
var doStuff = require("./lib/do-stuff"); // Don't forget to add ./ at the beginning to tell component that it's local | |
doStuff.alert(); | |
var fooBar = require("./lib/foo-bar"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment