GithubHelp home page GithubHelp logo

teng2015 / sencha-touch-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nelstrom/sencha-touch-boilerplate

0.0 1.0 0.0 124 KB

A starter kit for Sencha Touch 2 projects.

CSS 99.18% JavaScript 0.17% HTML 0.52% Ruby 0.13%

sencha-touch-boilerplate's Introduction

This starter kit provides two alternate HTML files: index.html loads the libraries locally; hosted.html loads the Touch JS/CSS libraries from Sencha's content delivery network (CDN). Additionally, a production.html file is included too, but you will have to build the app-all.js file to make this work (see below for instructions).

Using Sencha's CDN means that you don't have to download the Sencha Touch SDK, but it does require an internet connection. The hosted.html file is provided for convenience, but you'll have a better development experience if you use a local copy of the Sencha Touch SDK. Follow these instructions to install the Sencha Touch libraries.

Local libraries

The index.html file uses these conventions:

  • loads sencha-touch-debug.js, which contains the core classes and loader
  • Ext.loader dynamically fetches dependencies in the framework (from ./touch/src) and the application (from ./app)
  • uses a custom stylesheet, compiled from the Sencha Touch theme

Hosted libraries

The hosted.html follows different conventions:

  • loads sencha-touch-all-debug.js, which contains the entire Sencha Touch framework
  • Ext.loader dynamically fetches dependencies from the application
  • uses the default Sencha Touch theme

Read up on Sencha Touch Builds in the documentation.

Building the custom theme

To build the theme:

cd ~/path/to/Sencha-Touch-Boilerplate
cd styles
compass compile

Alternatively, run compass watch to have the theme compile every time you save a change to the app.scss file.

Building the application into a single JavaScript

You'll need to install the Sencha SDK tools before you can build the application JavaScript. Documentation for the following commands can be found by running sencha help create jsb or sencha help build.

First, generate a JS builder manifest file:

sencha create jsb --app-entry=index.html --project=app.jsb3

Then generate the app-all.js file:

sencha build --projectFile=app.jsb3 --deployDir=./

That should generate app-all.js and all-classes.js files. These are used in production.html and production-debug.html, respectively.

sencha-touch-boilerplate's People

Contributors

jogjayr avatar nelstrom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.