Skip to content

Commit

Permalink
modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
clkao committed Jun 16, 2013
1 parent bf855e4 commit c30dbee
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 49 deletions.
14 changes: 7 additions & 7 deletions app/app.ls
@@ -1,15 +1,15 @@
# Declare app level module which depends on filters, and services
App = angular.module \app, <[ ngCookies ngResource app.controllers app.directives app.filters app.services ui.directives ]>
App = angular.module \app, <[ partials ngCookies ngResource app.controllers app.directives app.filters app.services ui.directives ]>

App.config [ '$routeProvider' '$locationProvider'
($routeProvider, $locationProvider, config) ->
$routeProvider
.when \/view2, templateUrl: \/partials/app/partial2.html
.when \/view3, templateUrl: \/partials/app/partial3.html
.when \/view4, templateUrl: \/partials/app/partial4.html
.when \/budget/:code, templateUrl: \/partials/app/partial4.html
.when \/debtclock, templateUrl: \/partials/app/debtclock.html
.when \/profile, templateUrl: \/partials/app/profile.html
.when \/view2, templateUrl: \/partials/partial2.html
.when \/view3, templateUrl: \/partials/partial3.html
.when \/view4, templateUrl: \/partials/partial4.html
.when \/budget/:code, templateUrl: \/partials/partial4.html
.when \/debtclock, templateUrl: \/partials/debtclock.html
.when \/profile, templateUrl: \/partials/profile.html
# Catch all
.otherwise redirectTo: \/view4

Expand Down
12 changes: 4 additions & 8 deletions app/index.jade → app/index.static.jade
Expand Up @@ -30,15 +30,11 @@ html(lang='en',prefix="og: http://ogp.me/ns#")
script(src='http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js')
//if lte IE 8
script(src='//html5shiv.googlecode.com/svn/trunk/html5.js')
script
window.brunch = window.brunch || {};
window.brunch['auto-reload'] = {
enabled: true
};
script(src='/js/vendor.js')
script(src='/js/partials.js')
script(src='/js/app.js')

body(ng-controller='AppCtrl')
body(ng-controller='AppCtrl',ng-cloak)
#fb-root
script
(function(d, s, id) {
Expand All @@ -56,9 +52,9 @@ html(lang='en',prefix="og: http://ogp.me/ns#")
img(src="/img/logo.png",alt="Logo: G0V.tw")
span / 中央政府總預算
.nav-collapse
div(ng-include="'/partials/app/nav.html'")
div(ng-include="'/partials/nav.html'")
.container.main-content
div(ng-view)
div(ng-include="'/partials/app/login.html'")
div(ng-include="'/partials/login.html'")
.push

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,5 @@
#treemap-root(ng-controller="BudgetItem")
script(src="/staticjs/output.json")
script(src="/staticjs/parse.js")
script(src="/staticjs/treemap.js")
#treemap-root-inner
#debitmask 2,500億
Expand All @@ -13,7 +12,7 @@
i.icon-big-info-sign(style="margin-top:2px")
span#budget-detail-depname-field 教育部
#budget-detail-amount
#budget-detail-amount-field1
#budget-detail-amount-field1
span#budget-detail-amount-field1-value 2,100億
span#budget-detail-amount-field1-unit
&#x0028;即為
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 14 additions & 1 deletion config.ls
Expand Up @@ -22,7 +22,20 @@ exports.config =
joinTo:
'css/app.css': /^(app|vendor)/
templates:
joinTo: 'js/templates.js'
joinTo:
# this name is required for jade_angular plugin to work
'js/dontUseMe': /^app/

# Enable or disable minifying of result js / css files.
# minify: true
plugins:
jade:
options:
pretty: yes
locals: {}
static_jade:
extension: '.static.jade'
path: [ /^app/ ]
jade_angular:
modules_folder: \partials
locals: {}
30 changes: 14 additions & 16 deletions package.json
Expand Up @@ -14,10 +14,8 @@
},
"scripts": {
"prepublish": "./node_modules/.bin/lsc -cj package.ls",
"start": "node server/app.js",
"test": "testacular test/testacular.config.js"
"start": "node server/app.js"
},
"subdomain": "g0v",
"dependencies": {
"zappajs": "0.4.x",
"mongoose": "3.2.x",
Expand All @@ -31,19 +29,19 @@
"jade": "0.27.x"
},
"devDependencies": {
"testacular": ">= 0.0.16",
"LiveScript": "1.1.x",
"LiveScript": "1.1.1",
"q": "*",
"brunch": ">= 1.4 < 1.5",
"javascript-brunch": ">= 1.0 < 1.5",
"LiveScript-brunch": ">= 1.0 < 1.5",
"css-brunch": ">= 1.0 < 1.5",
"less-brunch": ">= 1.0 < 1.5",
"sass-brunch": ">= 1.0 < 1.5",
"jade-brunch": ">= 1.0 < 1.5",
"static-jade-brunch": ">= 1.4.0 <= 1.4.5 || >= 1.4.8 < 1.5",
"auto-reload-brunch": ">= 1.3 < 1.5",
"uglify-js-brunch": ">= 1.0 < 1.5",
"clean-css-brunch": ">= 1.0 < 1.5"
"brunch": "1.6.x",
"javascript-brunch": "1.5.x",
"LiveScript-brunch": "1.5.x",
"css-brunch": "1.5.x",
"sass-brunch": "1.5.x",
"jade-brunch": "1.5.x",
"static-jade-brunch": ">= 1.4.8 < 1.5",
"auto-reload-brunch": "1.6.x",
"uglify-js-brunch": "1.5.x",
"clean-css-brunch": "1.5.x",
"jade-angularjs-brunch": "0.0.5",
"jsenv-brunch": "1.4.2"
}
}
29 changes: 14 additions & 15 deletions package.ls 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env lsc -cj
author: 'g0v.tw'
name: 'g0v.tw'
description: 'g0v.tw'
Expand All @@ -12,8 +13,6 @@ engines:
scripts:
prepublish: './node_modules/.bin/lsc -cj package.ls'
start: 'node server/app.js'
test: 'testacular test/testacular.config.js'
subdomain: 'g0v'
dependencies:
zappajs: '0.4.x'
mongoose: '3.2.x'
Expand All @@ -26,17 +25,17 @@ dependencies:
'passport-twitter': '0.1.x'
jade: '0.27.x'
devDependencies:
testacular: '>= 0.0.16'
LiveScript: '1.1.x'
LiveScript: '1.1.1'
q: '*'
brunch: '>= 1.4 < 1.5'
'javascript-brunch': '>= 1.0 < 1.5'
'LiveScript-brunch': '>= 1.0 < 1.5'
'css-brunch': '>= 1.0 < 1.5'
'less-brunch': '>= 1.0 < 1.5'
'sass-brunch': '>= 1.0 < 1.5'
'jade-brunch': '>= 1.0 < 1.5'
'static-jade-brunch': '>= 1.4.0 <= 1.4.5 || >= 1.4.8 < 1.5'
'auto-reload-brunch': '>= 1.3 < 1.5'
'uglify-js-brunch': '>= 1.0 < 1.5'
'clean-css-brunch': '>= 1.0 < 1.5'
brunch: '1.6.x'
'javascript-brunch': '1.5.x'
'LiveScript-brunch': '1.5.x'
'css-brunch': '1.5.x'
'sass-brunch': '1.5.x'
'jade-brunch': '1.5.x'
'static-jade-brunch': '>= 1.4.8 < 1.5'
'auto-reload-brunch': '1.6.x'
'uglify-js-brunch': '1.5.x'
'clean-css-brunch': '1.5.x'
'jade-angularjs-brunch': '0.0.5'
'jsenv-brunch': '1.4.2'

0 comments on commit c30dbee

Please sign in to comment.