Download:
child 302:59923ed57ab1
parent 300:91c9ab6b4ce7
301:2d95d63792f0
Anton Shestakov <av6@dwimlabs.net>, Wed, 27 Jun 2018 22:58:20 +0800
Makefile: get 3rd-party client dependencies using just wget and tar

3 файлов изменено, 96 вставок(+), 22 удалений(-) [+]
Makefile file | annotate | diff | comparison | revisions
index.html file | annotate | diff | comparison | revisions
register.html file | annotate | diff | comparison | revisions
--- a/Makefile Tue Jun 26 19:46:10 2018 +0800
+++ b/Makefile Wed Jun 27 22:58:20 2018 +0800
@@ -2,11 +2,23 @@
jsfiles := $(coffeefiles:coffee/%.coffee=js/%.js)
mapfiles := $(jsfiles:.js=.js.map)
npm := npm update && sed -i -e 's@^\#!/usr/bin/env node$$@&js@' ./node_modules/coffee-script/bin/coffee
-
+libs := libs
+jquery_version := 3.3.1
+jquery_sha256 := b8442ed017e5311995d7174afe7ee1d06485915def347644971efcc8338d37b4
+underscore_version := 1.9.1
+underscore_sha256 := 2d6564aaa540a704fb198e023bc0f62a4f037baeac192e9d68df622c1d653d7e
+backbone_version := 1.3.3
+backbone_sha256 := 7a20331721385d9fedfe492dec2110b6695b0d2150c8effdc3804eaaa948dc74
+rivets_version := 0.8.1
+rivets_sha256 := f3ea69e1aff9511d8b9f5c0a954137369b4816b3aa8db1880d7b59f594b0a89b
+moment_version := 2.20.1
+moment_sha256 := 8675d811a20d4d8bb5b8c2de51fc244ce4110c009acd8fa514d951686bca2de0
+uikit_version := 2.27.5
+uikit_sha256 := 50d070e0551df41b9329ea5283714af759494445ce138147c283978922a620eb
.PHONY: all
-all: build
+all: build libs
.PHONY: devel
devel:
@@ -20,3 +32,69 @@
.PHONY: build
build: $(jsfiles) $(mapfiles)
+
+.PHONY: libs
+libs: \
+ $(libs)/jquery/$(jquery_version)/ \
+ $(libs)/underscore/$(underscore_version)/ \
+ $(libs)/backbone/$(backbone_version)/ \
+ $(libs)/rivets/$(rivets_version)/ \
+ $(libs)/moment/$(moment_version)/ \
+ $(libs)/uikit/$(uikit_version)/
+
+.INTERMEDIATE: jquery-$(jquery_version).tar.gz
+jquery-$(jquery_version).tar.gz:
+ wget -q https://github.com/jquery/jquery/archive/$(jquery_version).tar.gz -O $@
+ echo '$(jquery_sha256) $@' | sha256sum -c -
+
+$(libs)/jquery/$(jquery_version)/: jquery-$(jquery_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=2 -C $@ --wildcards 'jquery-$(jquery_version)/dist/jquery*'
+
+.INTERMEDIATE: underscore-$(underscore_version).tar.gz
+underscore-$(underscore_version).tar.gz:
+ wget -q https://github.com/jashkenas/underscore/archive/$(underscore_version).tar.gz -O $@
+ echo '$(underscore_sha256) $@' | sha256sum -c -
+
+$(libs)/underscore/$(underscore_version)/: underscore-$(underscore_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=1 -C $@ --wildcards 'underscore-$(underscore_version)/underscore*'
+
+.INTERMEDIATE: backbone-$(backbone_version).tar.gz
+backbone-$(backbone_version).tar.gz:
+ wget -q https://github.com/jashkenas/backbone/archive/$(backbone_version).tar.gz -O $@
+ echo '$(backbone_sha256) $@' | sha256sum -c -
+
+$(libs)/backbone/$(backbone_version)/: backbone-$(backbone_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=1 -C $@ --wildcards 'backbone-$(backbone_version)/backbone*'
+
+.INTERMEDIATE: rivets-$(rivets_version).tar.gz
+rivets-$(rivets_version).tar.gz:
+ wget -q https://github.com/mikeric/rivets/archive/v$(rivets_version).tar.gz -O $@
+ echo '$(rivets_sha256) $@' | sha256sum -c -
+
+$(libs)/rivets/$(rivets_version)/: rivets-$(rivets_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=2 -C $@ --wildcards 'rivets-$(rivets_version)/dist/rivets*'
+
+.INTERMEDIATE: moment-$(moment_version).tar.gz
+moment-$(moment_version).tar.gz:
+ wget -q https://github.com/moment/moment/archive/$(moment_version).tar.gz -O $@
+ echo '$(moment_sha256) $@' | sha256sum -c -
+
+$(libs)/moment/$(moment_version)/: moment-$(moment_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=2 -C $@ --exclude='tests.js' 'moment-$(moment_version)/min/'
+
+.INTERMEDIATE: uikit-$(uikit_version).tar.gz
+uikit-$(uikit_version).tar.gz:
+ wget -q https://github.com/uikit/uikit/archive/$(uikit_version).tar.gz -O $@
+ echo '$(uikit_sha256) $@' | sha256sum -c -
+
+$(libs)/uikit/$(uikit_version)/: uikit-$(uikit_version).tar.gz
+ mkdir -p $@
+ tar xf $< --strip-components=1 -C $@ --wildcards \
+ 'uikit-$(uikit_version)/css/*.min.css' \
+ 'uikit-$(uikit_version)/js/' \
+ 'uikit-$(uikit_version)/fonts/'
--- a/index.html Tue Jun 26 19:46:10 2018 +0800
+++ b/index.html Wed Jun 27 22:58:20 2018 +0800
@@ -5,16 +5,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tram IM</title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/uikit.min.css" integrity="sha384-wVQRrvgN1LAYKb1u9PW+mJFbkpvq+1dLy25E7yVI0iELZg48DAwZK+0+SciVoSYo" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/components/form-advanced.min.css" integrity="sha384-d68duPSswDvu/d874j9hBg162RHJaQPtQzCpaym88pbKkuZZdSvURpEHkDIq5cWn" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/components/progress.min.css" integrity="sha384-3xNmd+nJWguhQzEzYoo6h+Zi4T+5MZRJ41Zd7hEY7iQ5wtSZF1I6wEgr4HCxt1E3" crossorigin="anonymous">
+ <link rel="stylesheet" href="/libs/uikit/2.27.5/css/uikit.min.css">
+ <link rel="stylesheet" href="/libs/uikit/2.27.5/css/components/form-advanced.min.css">
+ <link rel="stylesheet" href="/libs/uikit/2.27.5/css/components/progress.min.css">
<link rel="stylesheet" href="/css/tram-im.css">
- <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js" integrity="sha384-5DWzr9S4agqS3WKvPrhFKJagpYyHOBsf3/DxuDKORyqCv2sYer9c/ExdhPOL8CGh" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js" integrity="sha384-NNt9ocJfZhIg2c5PbM5G2a3tTaeXhEfqCHWHNB7htzaWKn8MwFkzVyGdzLA8QMX7" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/rivets/0.8.1/rivets.bundled.min.js" integrity="sha384-KIB/b1UL6HC6He/9mc3AYNV0GjyVXGWnwqbSo3hoD6BOYi+XPtqjLtZ99Mevz4I4" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js" integrity="sha384-MV8AwEgYXLMw5ZPj4763CSPk+tYGoUZGdwr/+EfkAZ1Dl2rGHxOMpQ1IW7VtyUPn" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/js/uikit.min.js" integrity="sha384-Im89RaxIjW92nIeS9CnSp8tMU/70dwWdHUDaSaOAPnJ8JBWuE4PdBxqrWcopj1x8" crossorigin="anonymous"></script>
+ <script src="/libs/jquery/3.3.1/jquery.min.js"></script>
+ <script src="/libs/underscore/1.9.1/underscore-min.js"></script>
+ <script src="/libs/backbone/1.3.3/backbone-min.js"></script>
+ <script src="/libs/rivets/0.8.1/rivets.bundled.min.js"></script>
+ <script src="/libs/moment/2.20.1/moment.min.js"></script>
+ <script src="/libs/uikit/2.27.5/js/uikit.min.js"></script>
<script src="/vendor/strophejs/strophe.min.js"></script>
<script src="/vendor/strophejs-plugins/disco/strophe.disco.js"></script>
<script src="/vendor/strophejs-plugins/ping/strophe.ping.js"></script>
@@ -31,8 +31,6 @@
<div class="smart-container" data-step="noscript">
<div class="uk-alert">
<p class="uk-text-center">This page needs JavaScript to work.</p>
- <hr>
- <small>It uses resources from code.jquery.com and cdnjs.cloudflare.com.</small>
</div>
</div>
--- a/register.html Tue Jun 26 19:46:10 2018 +0800
+++ b/register.html Wed Jun 27 22:58:20 2018 +0800
@@ -5,14 +5,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Registration</title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/uikit.min.css" integrity="sha384-wVQRrvgN1LAYKb1u9PW+mJFbkpvq+1dLy25E7yVI0iELZg48DAwZK+0+SciVoSYo" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/components/progress.min.css" integrity="sha384-3xNmd+nJWguhQzEzYoo6h+Zi4T+5MZRJ41Zd7hEY7iQ5wtSZF1I6wEgr4HCxt1E3" crossorigin="anonymous">
+ <link rel="stylesheet" href="/libs/uikit/2.27.5/css/uikit.min.css">
+ <link rel="stylesheet" href="/libs/uikit/2.27.5/css/components/progress.min.css">
<link rel="stylesheet" href="/css/tram-im.css">
- <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js" integrity="sha384-5DWzr9S4agqS3WKvPrhFKJagpYyHOBsf3/DxuDKORyqCv2sYer9c/ExdhPOL8CGh" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js" integrity="sha384-NNt9ocJfZhIg2c5PbM5G2a3tTaeXhEfqCHWHNB7htzaWKn8MwFkzVyGdzLA8QMX7" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/rivets/0.8.1/rivets.bundled.min.js" integrity="sha384-KIB/b1UL6HC6He/9mc3AYNV0GjyVXGWnwqbSo3hoD6BOYi+XPtqjLtZ99Mevz4I4" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/js/uikit.min.js" integrity="sha384-Im89RaxIjW92nIeS9CnSp8tMU/70dwWdHUDaSaOAPnJ8JBWuE4PdBxqrWcopj1x8" crossorigin="anonymous"></script>
+ <script src="/libs/jquery/3.3.1/jquery.min.js"></script>
+ <script src="/libs/underscore/1.9.1/underscore-min.js"></script>
+ <script src="/libs/backbone/1.3.3/backbone-min.js"></script>
+ <script src="/libs/rivets/0.8.1/rivets.bundled.min.js"></script>
+ <script src="/libs/uikit/2.27.5/js/uikit.min.js"></script>
<script src="/vendor/strophejs/strophe.min.js"></script>
<script src="/vendor/strophejs-plugins/register/strophe.register.js"></script>
<script src="/vendor/strophejs-plugins/vcard/strophe.vcard.js"></script>
@@ -25,8 +25,6 @@
<div class="smart-container">
<div class="uk-alert" data-step="noscript">
<p class="uk-text-center">This page needs JavaScript to work.</p>
- <hr>
- <small>It uses resources from code.jquery.com and cdnjs.cloudflare.com.</small>
</div>
<script>
$('[data-step="noscript"]').addClass('uk-hidden');