Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rockyjs/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "app/bower_components"
}
13 changes: 13 additions & 0 deletions rockyjs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions rockyjs/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
6 changes: 6 additions & 0 deletions rockyjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
.tmp
.sass-cache
app/bower_components
.DS_Store
21 changes: 21 additions & 0 deletions rockyjs/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": false
}
30 changes: 30 additions & 0 deletions rockyjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Pebble.js + Rocky.js
====================

Pebble.js development in a browser!

Given that Rocky.js provides the Pebble API implemented in javascript, we can now combine Pebble.js and Rocky.js and develop in the web browser with all the javascript development tools - debugging, profiling etc

## Work in Progress

This is a currently a Proof of Concept with minimal implementataion for the following:
* `window`
* `click`
* `rect`
* `text` - inlcuding fonts
* `texttime`
* `menu`s

It works by replacing `simply-pebble.js` with `simply-rocky.js` at build time. There is some leakage to other classes, for example `Simply.markDirty()` has been added and called from `Window` to optimize the screen redraws.

`simply-rocky.js` is a copy and paste of `simply-pebble.js`. In time all the `simply-pebble.js` hangover code will be removed and replace with the Rocky implementation.

## Getting Started

To support the Pebble.js build system we use Gulp and Browserify to build the javascript with Rocky.js

* [Install Gulp](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md)

* Run Browserify `gulp browserify` - this should finish without issues. Fix any issues you find

* Run `gulp watch` - this will launch a browser and run the app. It will automatically reload the app when the source files change
25 changes: 25 additions & 0 deletions rockyjs/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html class="no-js" lang="en">

<head>
<meta charset="utf-8" />
<title>Rocky</title>
</head>

<body>
<script>
var Pebble = {
addEventListener : function() {},
sendAppMessage : function() {},

platform : 'pypkjs'
};

</script>
<script src="rocky-0.3.0.js"></script>
<canvas id="pebble" class="rocky" width="144" height="168"></canvas>
<script src="scripts/rocky.js"></script>

</body>

</html>
Loading