pebble / pebblejs

Program the Pebble with simply JavaScript
MIT License
455 stars 229 forks source link

Transition to new SDK build system #167

Closed cjwilliams closed 8 years ago

cjwilliams commented 8 years ago

This change should update pebble.js so that it works with:

Note: Currently, the wscript file adds -std=c11 to the cflags for the build, but doesn't remove the -std=c99 flag added by the SDK. This will need to be improved.

Meiguro commented 8 years ago

Thanks for the hard work of converting it to the new package style! I just have one concern with main.js vs app.js. After that I can check to make sure there isn't anything unintentionally broken.

cjwilliams commented 8 years ago

This actually just converts it to use the current SDK JS processing, which is a stepping stone to making this a Pebble Package, but it isn't the set of changes for package-izing it. You can find the WIP for that here

Meiguro commented 8 years ago

Since this is just an interim step as you say, I'm welcome to getting this merged even if it means breaking changes. Changes that handle transitioning projects can be added after all the steps make it in master.

Meiguro commented 8 years ago

👍

We decided to create a new develop branch anyway

matopeto commented 8 years ago

Great!, so how to use it? Can i use pebblejs as 3rd party library, to empty project, like other packages?

I try

matej@MATEJ-WORK-PC:~/pebble-dev/test-pebblejs-package$ pebble new-project -v test-pebblejs-package

matej@MATEJ-WORK-PC:~/pebble-dev/test-pebblejs-package$ pebble package install pebble/pebblejs#develop
test-pebblejs-package@1.0.0 /home/matej/pebble-dev/test-pebblejs-package
└── pebblejs@0.5.0  (git://github.com/pebble/pebblejs.git#0a0621587a44958755113e0ca288c577821aca70)

matej@MATEJ-WORK-PC:~/pebble-dev/test-pebblejs-package$ pebble build
Setting top to                           : /home/matej/pebble-dev/test-pebblejs-package
Setting out to                           : /home/matej/pebble-dev/test-pebblejs-package/build
Checking for program webpack             : /home/matej/.pebble-sdk/SDKs/current/node_modules/.bin/webpack
Missing dist.zip file for pebblejs. Are you sure this is a Pebble library?
(complete log in /home/matej/pebble-dev/test-pebblejs-package/build/config.log)
Build failed.
matej@MATEJ-WORK-PC:~/pebble-dev/test-pebblejs-package$ less /home/matej/pebble-dev/test-pebblejs-package/build/config.log
matej@MATEJ-WORK-PC:~/pebble-dev/test-pebblejs-package$

but not success.