OneSignal AMP Extension ⚡
- Forked from amphtml.
- Please see the OneSignal branch.
First-time Setup
-
Read amphtml's Developer Guide. Mostly just
yarndependencies after cloning. -
Use a column length of 80 characters, following their Google JavaScript Style Guide.
-
A
.editorconfigyou can use (but don't check in with the final PR) is:root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true
Developing
Run gulp and then visit http://localhost:8000/examples/amp-onesignal.amp.max.html
Testing
To test, run gulp test --files=extensions/amp-onesignal/0.1/test/test-amp-onesignal.js --watch (can take a while)
If you see:
No captured browser, open http://localhost:xxxx/
Then the Karma test runner was not able to automatically find and open Chrome. Tests then get a little weird. Open the browser to that URL, and click Debug to run the tests. Leave the tab open (pin it in Chrome so you won't close it), and when you change the code, the tests will start to run on the console.