using bower

This commit is contained in:
jysperm
2014-12-18 03:33:35 +08:00
parent 39e70bd604
commit a1365f5074
7 changed files with 20 additions and 7 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/node_modules
/bower_components
/coverage-reporter.html
/npm-debug.log

View File

@@ -11,7 +11,7 @@ before_install:
- sudo pip install shadowsocks
- sudo mkdir /etc/shadowsocks
script: npm run test-full
script: npm run test-all-config
services:
- mongodb

View File

@@ -151,6 +151,7 @@ app.express.get '/', (req, res) ->
unless res.headerSent
res.redirect '/panel/'
app.express.use express.static './bower_components'
app.express.use harp.mount './core/static'
exports.start = _.once ->

9
bower.json Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "rootpanel",
"dependencies": {
"bootstrap": "~3.3.1",
"jquery-cookie": "~1.4.1",
"underscore": "~1.7.0",
"jquery": "~2.1.2"
}
}

View File

@@ -3,7 +3,7 @@ html
head
meta(charset='utf-8')
block header
link(rel='stylesheet', href='http://cdn.staticfile.org/twitter-bootstrap/3.2.0/css/bootstrap.min.css')
link(rel='stylesheet', href='/bower_components/bootstrap/dist/css/bootstrap.min.css')
link(rel='stylesheet', href='/style/layout.css')
for hook in selectHook('view.layout.styles')
link(rel='stylesheet', href=hook.path)
@@ -78,10 +78,10 @@ html
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '#{config.web.google_analytics_id}', 'auto');
ga('send', 'pageview');
script(src='http://cdn.staticfile.org/jquery/2.0.3/jquery.min.js')
script(src='http://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js')
script(src='http://cdn.staticfile.org/underscore.js/1.7.0/underscore-min.js')
script(src='http://cdn.staticfile.org/twitter-bootstrap/3.2.0/js/bootstrap.min.js')
script(src='/bower_components/jquery/dist/jquery.min.js')
script(src='/bower_components/jquery-cookie/jquery.cookie.js')
script(src='/bower_components/underscore.js/underscore-min.js')
script(src='/bower_components/bootstrap/dist/js/bootstrap.min.js')
script(src='/script/layout.js')
for hook in selectHook('view.layout.scripts')
script(src=hook.path)

View File

@@ -16,17 +16,19 @@
}
],
"scripts": {
"install": "./node_modules/.bin/bower install",
"start": "./node_modules/.bin/coffee app.coffee | ./node_modules/.bin/bunyan -o short",
"migrate": "./node_modules/.bin/coffee bin/migrate.coffee",
"tool": "./node_modules/.bin/coffee bin/tool.coffee",
"reconfigure": "./node_modules/.bin/coffee bin/reconfigure.coffee",
"test": "COV_TEST=true ./node_modules/.bin/mocha --compilers coffee:coffee-script/register --require test/env --reporter node_modules/mocha-reporter-cov-summary -- core/test/*.test.coffee core/test/*/*.test.coffee plugin/*/test",
"test-only": "./node_modules/.bin/mocha --compilers coffee:coffee-script/register --require test/env -b -- core/test/*.test.coffee core/test/*/*.test.coffee plugin/*/test",
"test-full": "./node_modules/.bin/coffee test/full-test.coffee",
"test-all-config": "./node_modules/.bin/coffee test/full-all-config.coffee",
"test-cov-html": "COV_TEST=true ./node_modules/.bin/mocha --compilers coffee:coffee-script/register --require test/env --reporter html-cov -- core/test/*.test.coffee core/test/*/*.test.coffee plugin/*/test > coverage-reporter.html"
},
"dependencies": {
"async": "^0.9.0",
"bower": "^1.3.12",
"body-parser": "^1.9.3",
"bunyan": "^1.2.3",
"insight": "^0.4.3",