-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,25 @@ | ||
# Sqwidget | ||
|
||
This is a WIP setup for helping develop widgets. | ||
Sqwidget is a framework for adding components to a page in a way that ensures | ||
they are self contained and namespaced. | ||
|
||
## Scaffold | ||
|
||
## Installation and Running | ||
Installing sqwidget via bower will add a 'sqwidget' scaffold to your grunt | ||
config. You can start a new widget by typing the following inside a new project | ||
directory: | ||
|
||
`grunt-init sqwidget` | ||
|
||
This will provide a simple sqwidget bundle for you to fill out. | ||
|
||
## Development | ||
|
||
``` | ||
npm install grunt-cli -g | ||
npm install coffee-script -g | ||
npm install bower -g | ||
npm install | ||
grunt | ||
bower install | ||
``` | ||
|
||
|
||
## Present Setup | ||
|
||
This is a development only setup at present. It needs build tasks etc. | ||
|
||
On running `grunt`, three development servers are launched: | ||
|
||
* `index.html` is loaded from `http://localhost:8000`. This is to simulate the | ||
third party website that will actually host the widget. | ||
* `widget.js` is loaded from `http://localhost:8001`. This is to simulate the | ||
sqwidget itself being loaded from a server. | ||
* The actual widgets that use the embed code are loaded from | ||
`http://localhost:8002`. | ||
|
||
This setup ensures that we always develop with an environment that's close to | ||
the real environment. | ||
|
||
|
||
## To-Dos | ||
|
||
* Add `cleanslate` or similar to `sqwidget` | ||
* Write a couple of example widgets so that we know how they are supposed to be | ||
loaded. These widgets should get their data from another server (via JSONP) | ||
* Each widget may have CSS dependencies. Load them. | ||
* Look into i18n work with RequireJS for internationalisation. | ||
* If possible, remove the dependency on jQuery. | ||
npm install | ||
grunt test | ||
... | ||
``` |