-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1908 from montagejs/features/demoHelloWorld
add basic demo/ directory with montage hello world
- Loading branch information
Showing
7 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = "This text was required from data.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Montage demo</title> | ||
<style type="text/css"> body { font-family: sans-serif; } </style> | ||
</head> | ||
<body> | ||
<h1>Hello Montage</h1> | ||
<script src="../montage.js"></script> | ||
<script type="text/montage-serialization"> | ||
{ | ||
"app": { | ||
"prototype": "montage/app.reel", | ||
"values": { | ||
"useFeature": false, | ||
"endpointURL": "https://example.com" | ||
} | ||
}, | ||
"owner": { | ||
"prototype": "montage/ui/loader.reel" | ||
} | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<span class="loading"></span> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "montage-demo", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"montage": "*" | ||
}, | ||
"mappings": { | ||
"montage": "../" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Main { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Montage Hello</title> | ||
<link rel="stylesheet" href="main.css"> | ||
<script type="text/montage-serialization"> | ||
{ | ||
"owner": { | ||
"values": { | ||
"element": {"#": "owner"} | ||
} | ||
}, | ||
"myData": { | ||
"prototype": "montage/ui/text.reel", | ||
"values": { | ||
"element": {"#": "myData"}, | ||
"value": {"<-": "@owner.myData"} | ||
} | ||
} | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div data-montage-id="owner" class="Main"> | ||
<span data-montage-id="myData"></span> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* @module "ui/main.reel" | ||
*/ | ||
var Component = require("montage/ui/component").Component, | ||
data = require('core/data'); | ||
|
||
/** | ||
* @class Main | ||
* @extends Component | ||
*/ | ||
exports.Main = Component.specialize(/** @lends Main.prototype */{ | ||
constructor: { | ||
value: function Main() { | ||
this.super(); | ||
} | ||
}, | ||
|
||
myData: { | ||
get: function() { | ||
return data; | ||
} | ||
} | ||
}); |
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