Skip to content

Instantly share code, notes, and snippets.

@pguerrant
Created November 5, 2013 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pguerrant/7327683 to your computer and use it in GitHub Desktop.
Save pguerrant/7327683 to your computer and use it in GitHub Desktop.
Steps to create easy-button
sencha generate package easy-button
modfy the sass namespace in its sencha.cfg:
package.sass.namespace=EasyButton
Add the package.framework property to sencha.cfg:
package.framework=ext
add package.theme so that we can build the package independently of an app:
package.theme=ext-theme-neptune
sencha -sdk ext generate app EasyButtonDemo packages/easy-button/examples/easy-button-demo
add the following files:
- easy-button/src/button/Easy.js
- easy-button/sass/var/button/Easy.scss
- easy-button/sass/src/button/Easy.scss
- easy-button/resources/images/easy.png
Add a slicer manifest entry for “easy-default” to easy-button/sass/example/custom.js
Change the theme of the demo app:
app.theme=ext-theme-neptune
Add “easy-button” to the demo app’s “requires” array in app.json
Add easy-button/examples/easy-button-demo/sass/src/view/Main.scss and call the easy-button mixin to create an additional UI
Change the demo app’s main view to only contain 2 buttons, by modifying easy-button/examples/easy-button-demo/app/view/Main.js
Add a slicer manifest entry for the “easy-red” ui to easy-button/examples/easy-button-demo/sass/example/custom.js
include the custom.js file from the easy-button package in the theme.html file for the demo app.
build and run the app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment