From 024f82b6be60bdc540e1239d6713bd881a18aaec Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Wed, 22 Oct 2014 21:44:23 +0200 Subject: [PATCH] Bower - localize dependencies --- .bowerrc | 3 +++ bower.json | 21 +++++++++++++++++++++ package.json | 6 ++++++ source/documents/_scripts.html.jade | 11 ++++++----- source/documents/index.html.jade | 4 ++-- source/documents/tests.html.jade | 4 ++-- 6 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 .bowerrc create mode 100644 bower.json diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..18bf170 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "build/bower_components" +} diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..419da78 --- /dev/null +++ b/bower.json @@ -0,0 +1,21 @@ +{ + "name": "side-by-side", + "version": "0.0.1", + "author": "Vit Brunner", + "ignore": [ + "**/.*", + "node_modules", + "bower_components" + ], + "dependencies": { + "lodash": "2.4.1", + "angular": "1.2.20", + "angular-route": "1.2.20", + "angular-sanitize": "1.2.20", + "marked": "0.3.2", + "pure": "0.2.0", + "qunit": "1.13.x", + "fontawesome": "3.0.2" + }, + "license": "MIT" +} diff --git a/package.json b/package.json index 32ab037..2fd2a82 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.0.1", "author": "Vit Brunner", "description": "Visual comparison of different translations of itemized texts; e.g. poems, bibles, etc.", + "dependencies": { + "bower": "1.3.x" + }, "devDependencies": { "docpad": "6.69.x", "docpad-plugin-coffeescript": "2.4.x", @@ -11,5 +14,8 @@ "qunitjs": "1.13.x", "phantomjs": "1.9.x" }, + "scripts": { + "postinstall": "node_modules/.bin/bower install" + }, "license": "MIT" } diff --git a/source/documents/_scripts.html.jade b/source/documents/_scripts.html.jade index c4542af..8bfc6fc 100644 --- a/source/documents/_scripts.html.jade +++ b/source/documents/_scripts.html.jade @@ -1,9 +1,10 @@ // application scripts -script(src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js") -script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.js") -script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-route.js") -script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-sanitize.js") -script(src="//cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.js") +script(src="bower_components/lodash/dist/lodash.js") +script(src="bower_components/angular/angular.js") +script(src="bower_components/angular-route/angular-route.js") +script(src="bower_components/angular-sanitize/angular-sanitize.js") +script(src="bower_components/angular-sanitize/angular-sanitize.js") +script(src="bower_components/marked/lib/marked.js") script(src="scripts/app.js") script(src="scripts/services/fetch.js") script(src="scripts/services/poems.js") diff --git a/source/documents/index.html.jade b/source/documents/index.html.jade index 0ccdd32..4ae60c8 100644 --- a/source/documents/index.html.jade +++ b/source/documents/index.html.jade @@ -4,8 +4,8 @@ html(ng-app="sideBySide") title Side By Side viewer meta(charset="utf-8") link(rel="stylesheet", type="text/css", href="//fonts.googleapis.com/css?family=Noticia+Text:400,700,400italic,700italic") - link(rel="stylesheet", type="text/css", href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css") - link(rel="stylesheet", type="text/css", href="//yui.yahooapis.com/pure/0.2.0/pure-min.css") + link(rel="stylesheet", type="text/css", href="bower_components/fontawesome/css/font-awesome.min.css") + link(rel="stylesheet", type="text/css", href="bower_components/pure/pure-min.css") link(rel="stylesheet", type="text/css", href="styles/style.css") include _scripts.html.jade diff --git a/source/documents/tests.html.jade b/source/documents/tests.html.jade index a53e030..48ecd68 100644 --- a/source/documents/tests.html.jade +++ b/source/documents/tests.html.jade @@ -7,8 +7,8 @@ html include _scripts.html.jade // test scripts - link(rel="stylesheet", type="text/css", href="//cdnjs.cloudflare.com/ajax/libs/qunit/1.11.0/qunit.css") - script(src="//cdnjs.cloudflare.com/ajax/libs/qunit/1.11.0/qunit.js") + link(rel="stylesheet", type="text/css", href="bower_components/qunit/qunit/qunit.css") + script(src="bower_components/qunit/qunit/qunit.js") script(src="tests/_setup.js") script(src="tests/services/reader/_factory.js") script(src="tests/services/reader/_abstract.js")