Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix montage.js Path and switch to NPM packaging #1

Merged
merged 4 commits into from

2 participants

@mczepiel

Sorry for conflating two fixes but montage.js wasn't in the right spot and the original repo was missing anyway

mczepiel added some commits
@mczepiel mczepiel Correct path to montage.js
It was looking up a level, not inside the project itself.
878cf47
@mczepiel mczepiel Replace montage submodule with NPM dependency
Accepting any version of montage for now
bb9ead9
@mczepiel mczepiel Remove montage from node_modules
It's up the the user to provide montage, probably through
```npm install```
8b914a1
@mczepiel mczepiel Generate names as string changes
Just because we can, there's no need to have a "submit" button
7b44f0a
@mczepiel

Ok and now I've removed the generate button so the names are updated live as name changes, your call on whether you want that or not

@eliseosoto eliseosoto was assigned
@eliseosoto eliseosoto commented on the diff
package.json
@@ -1,7 +1,7 @@
{
"name": "breaking-bad-credits",
"version": "1.0.0",
- "mappings": {
- "montage": "./node_modules/montage"
+ "dependencies": {
+ "montage": "*"
@eliseosoto Owner

I guess we want a more specific version range here instead of just '*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@eliseosoto eliseosoto merged commit a9c23b1 into from
@eliseosoto
Owner

Hey @mczepiel thanks for the pull request (I haven't checked this in like forever!).

I had to use a specific version of Montage (0.12.7) because it doesn't work with 0.13.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 16, 2012
  1. @mczepiel

    Correct path to montage.js

    mczepiel authored
    It was looking up a level, not inside the project itself.
  2. @mczepiel

    Replace montage submodule with NPM dependency

    mczepiel authored
    Accepting any version of montage for now
  3. @mczepiel

    Remove montage from node_modules

    mczepiel authored
    It's up the the user to provide montage, probably through
    ```npm install```
  4. @mczepiel

    Generate names as string changes

    mczepiel authored
    Just because we can, there's no need to have a "submit" button
This page is out of date. Refresh to see the latest.
View
3  .gitignore
@@ -1,4 +1,5 @@
.idea/
.tm_properties
builds/
-release/
+release/
+node_modules
View
3  .gitmodules
@@ -1,3 +0,0 @@
-[submodule "node_modules/montage"]
- path = node_modules/montage
- url = https://github.com/Motorola-Mobility/montage.git
View
5 breaking-bad-credits.js
@@ -15,11 +15,12 @@ exports.BreakingBadCredits = Montage.create(Montage, {
templateDidLoad: {
value: function() {
this.elements = JSON.parse(this.elementsJson);
+ this.addPropertyChangeListener("name", this, false);
}
},
- handleAction: {
- value: function(event) {
+ handleChange: {
+ value: function(notification) {
this.generatedNames = [];
this.generatedNames = this.generateNames(this.name);
this.needsDraw = true;
View
25 index.html
@@ -2,7 +2,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="//current.bootstrapcdn.com/bootstrap-v204/css/bootstrap-combined.min.css">
- <script src="../node_modules/montage/montage.js"></script>
+ <script src="node_modules/montage/montage.js"></script>
<link rel="stylesheet" href="style.css" />
<script type="text/montage-serialization">{
@@ -10,33 +10,19 @@
"prototype": "breaking-bad-credits",
"properties": {
"generatedNamesController": {"@": "generatedNamesController"}
+ },
+ "bindings": {
+ "name": {"<->": "@nameField.value"}
}
},
- "name": {
+ "nameField": {
"prototype": "montage/ui/native/input-text.reel",
"properties": {
"element": {"#": "name"}
- },
- "bindings": {
- "value": {"<->": "@owner.name"}
}
},
- "generate": {
- "prototype": "montage/ui/native/button.reel",
- "properties": {
- "element": {"#": "generate"},
- "identifier": "generate"
- },
- "listeners": [
- {
- "type": "action",
- "listener": {"@": "owner"}
- }
- ]
- },
-
"generatedNamesController": {
"prototype": "montage/ui/controller/array-controller",
"bindings": {
@@ -72,7 +58,6 @@
<div class="span12">
<p>This will generate credit names like the ones seen on Breaking Bad</p>
<input type="text" data-montage-id="name" placeholder="Enter name" />
- <button data-montage-id="generate">Generate!</button>
<ul data-montage-id="generatedNames" class="generatedNames">
<li data-montage-id="generatedName" class="generatedName"></li>
</ul>
1  node_modules/montage
@@ -1 +0,0 @@
-Subproject commit d5b4b5fdc0102b3c3fea2ebabf10085424233517
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "breaking-bad-credits",
"version": "1.0.0",
- "mappings": {
- "montage": "./node_modules/montage"
+ "dependencies": {
+ "montage": "*"
@eliseosoto Owner

I guess we want a more specific version range here instead of just '*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
}
Something went wrong with that request. Please try again.