Skip to content

Commit

Permalink
Add browserify npm module
Browse files Browse the repository at this point in the history
  • Loading branch information
chicagoduane committed Apr 9, 2011
1 parent 8f258e3 commit 61af75b
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/*
build/*.js
build/client/*.js
sencha-touch-*
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "lib/kaffeine"]
path = lib/kaffeine
url = https://github.com/weepy/kaffeine.git
[submodule "lib/browserify"]
path = lib/browserify
url = https://github.com/substack/node-browserify.git
1 change: 1 addition & 0 deletions build/client/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory contains client (browser) javascript code. Edit /src/client/* kaffeine files.
1 change: 0 additions & 1 deletion lib/browserify
Submodule browserify deleted from 147f01
139 changes: 98 additions & 41 deletions public/js/application.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,107 @@
new Ext.Application({
name: 'Shopperpedia',

launch: function() {
// new Ext.Panel({
// fullscreen: true,
// html: 'Hello World!'
// });
var formBase = {
scroll: 'vertical',
url : 'postUser.php',
standardSubmit : false,
items: [{
xtype: 'fieldset',
title: 'Personal Info',
instructions: 'Please enter the information above.',
this.viewport = new Ext.Panel({
fullscreen: true,

id : 'mainPanel',
layout: 'card',
items : [
{
xtype: 'carousel',
defaults: {
required: true,
labelAlign: 'left',
labelWidth: '40%'
cls: 'card'
},
items: [
{
xtype: 'textfield',
name : 'name',
label: 'Name',
useClearIcon: true,
autoCapitalize : false
}]
}]
}

if (Ext.is.Phone) {
formBase.fullscreen = true;
} else {
Ext.apply(formBase, {
autoRender: true,
floating: true,
modal: true,
centered: true,
hideOnMaskTap: false,
height: 385,
width: 480
});
}

form = new Ext.form.FormPanel(formBase);
form.show();
{
html: ''
},
{
title: 'Tab 2',
html: '2'
},
{
title: 'Tab 3',
html: '3'
}
]
}
]
});
}
});


new Ext.Application({
launch: function() {

// var formBase = {
// scroll: 'vertical',
// url : 'postUser.php',
// standardSubmit : false,
// items: [{
// xtype: 'fieldset',
// title: 'Personal Info',
// // instructions: 'Please enter the information above.',
// defaults: {
// required: true,
// labelAlign: 'left',
// labelWidth: '40%'
// },
// items: [
// {
// xtype: 'textfield',
// name : 'name',
// label: 'Name',
// useClearIcon: true,
// autoCapitalize : true
// },
// {
// xtype: 'textfield',
// name : 'email',
// label: 'Email',
// useClearIcon: true,
// autoCapitalize : false
// }
// ]
// },
// {
// xtype: 'button',
// text: 'Next',
// // align: 'right',
// width: '50%',
// ui: 'forward',
// handler: function() {
// if(formBase.user){
// form.updateRecord(formBase.user, true);
// }
// form.submit({
// waitMsg : {message:'Submitting', cls : 'demos-loading'}
// });
// }
// }],
// }
//
// if (Ext.is.Phone) {
// formBase.fullscreen = true;
// } else {
// Ext.apply(formBase, {
// autoRender: true,
// floating: true,
// modal: true,
// centered: true,
// hideOnMaskTap: false,
// height: 385,
// width: 480
// });
// }
//
// form = new Ext.form.FormPanel(formBase);
// form.show();

// var carousel1 = new Ext.Carousel();
//
// carousel1.show();
}
});
33 changes: 33 additions & 0 deletions src/client/application.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
new Ext.Application({
name: 'Shopperpedia',

launch: {
@viewport = new Ext.Panel({
fullscreen: true,

id : 'mainPanel',
layout : 'card',
items : [
{
xtype : 'carousel',
defaults : {
cls : 'card'
},
items: [
{
html: ''
},
{
title: 'Tab 2',
html: '2'
},
{
title: 'Tab 3',
html: '3'
}
]
}
]
});
}
});
7 changes: 7 additions & 0 deletions src/server.k
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
express = require('express')
browserify = require('browserify')

app = express.createServer()

app.use('/', express.static(__dirname + '/../public'))

app.use(browserify({
base : __dirname + '/client',
mount : '/browserify.js',
shim : false
}));

app.get('/test', (req, res){
res.send('Test U out');
})
Expand Down

0 comments on commit 61af75b

Please sign in to comment.