Skip to content

Commit

Permalink
Aligned with Riot v2.3.11 API
Browse files Browse the repository at this point in the history
  • Loading branch information
nippur72 committed Nov 23, 2015
1 parent 92c3a54 commit 5687294
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 62 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ module.exports = function(grunt) {
};

```
- Then run `grunt htmlCovert` from the command line.
- Then run `grunt htmlConvert` from the command line.

A file named `elements/template-cache.js` will be built with all templates from the `elements\` directory. That file can be inlined with a `<script>` tag just before loading the element's code, e.g.:
```HTML
Expand Down Expand Up @@ -366,6 +366,9 @@ Contributions are welcome.
If you find bugs or want to improve it, just send a pull request.

# Change log <a name="changelog"></a>
- v0.0.18
- aligned with Riot's v2.3.11 API
- for old Riot v2.2, use RiotTS v0.0.17
- v0.0.17
- support for template-cache
- v0.0.16
Expand Down
2 changes: 1 addition & 1 deletion Test/elements/timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
</style>
<div>
timer: <span class="bolded">{{ time }}</span><br>
timer: <span class="bolded">{{time}} and {time}</span><br>
trasclusion is '<yield />'<br>
<div each="{{el in mylist}}">iterating over array item "{{el}}"<br></div>
<div>this is from timer.html file!</div>
Expand Down
3 changes: 2 additions & 1 deletion Test/elements/timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ class Timer extends Riot.Element
}
}




8 changes: 3 additions & 5 deletions Test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@
<link rel="stylesheet" href="app.css" type="text/css" />

<!-- riot and riot-ts -->
<script type="text/javascript" src="bower_components/riot/riot.js"></script>
<script type="text/javascript" src="bower_components/riot/compiler.js"></script>
<script type="text/javascript" src="bower_components/riot/riot+compiler.js"></script>
<script type="text/javascript" src="bower_components/riot-ts/riot-ts.js"></script>
<script>
riot.settings.brackets = "{{ }}";
</script>
<script type="text/javascript" src="elements/template-cache.js"></script>
</script>
<script type="text/javascript" src="elements/timer.js"></script>
<script type="text/javascript" src="index.js"></script>
</head>
<body>
<h1>Riot with TypeScript example</h1>
<timer time="4">this is inside timer</timer>
<timer time="-3">this is inside timer</timer>
</body>
</html>

Expand Down
3 changes: 1 addition & 2 deletions Test/specRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
<script src="bower_components/jasmine/lib/jasmine-core/boot.js"></script>

<!-- riot and riot-ts -->
<script type="text/javascript" src="bower_components/riot/riot.js"></script>
<script type="text/javascript" src="bower_components/riot/compiler.js"></script>
<script type="text/javascript" src="bower_components/riot/riot+compiler.js"></script>
<script type="text/javascript" src="bower_components/riot-ts/riot-ts.js"></script>

<!-- custom elements and app -->
Expand Down
3 changes: 0 additions & 3 deletions Test/specRunner.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Test/specRunner.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Test/specRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ function RunSpecs()
expect(instance.inner_div.innerHTML).toBe("test1 element");
});

it('creates elements with correct riot-tag', () => {
expect(instance.opts["riot-tag"]).toBe("test1");
});

it('creates elements with correct template', () => {
expect(el.innerHTML).toBe('<div id="inner_div">test1 element</div>');
});
Expand Down
5 changes: 5 additions & 0 deletions Test/web.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
</system.webServer>
</configuration>
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
],
"description": "Riot for TypeScript",
"main": "riot-ts.js",
"license": "MIT",
"license": "MIT",
"ignore": [
"/*",
"!riot-ts.*",
"!LICENSE.txt",
"!README.md"
],
],
"dependencies": {
"riot": "~2.2.3"
"riot": "~2.3.11"
}
}
Loading

0 comments on commit 5687294

Please sign in to comment.