diff options
-rw-r--r-- | .editorconfig | 12 | ||||
-rwxr-xr-x | INSTALL.sh | 3 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | bin-src/yarn-bower | 3 | ||||
-rw-r--r-- | public-src/3rd-party/.gitignore | 3 | ||||
-rw-r--r-- | public-src/3rd-party/package.json | 5 | ||||
-rw-r--r-- | public-src/3rd-party/yarn.lock | 7 | ||||
-rwxr-xr-x | public-src/index.html.gen | 26 | ||||
-rw-r--r-- | public-src/main.js | 5 | ||||
-rw-r--r-- | public-src/require.config.js | 39 |
10 files changed, 93 insertions, 18 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..71581bf --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = tab + +[package.json] +# This matches what `yarn` writes +indent_style = space +indent_size = 2 @@ -14,3 +14,6 @@ gem install nokogiri -- --use-system-libraries sudo pacman -S --needed -- ruby-sass #sudo pacman -S --needed -- ruby #gem install sass + +# Yarn +sudo pacman -S --needed -- yarn @@ -1,9 +1,10 @@ -srcs = $(shell find public-src -not -type d) +srcs = $(shell find public-src -name 3rd-party -prune -o -not -type d -not -name '*.log' -print) outs = $(patsubst public-src/%,public/%,\ $(patsubst %.scss,%.css,\ $(patsubst %.gen,%,\ $(srcs)))) all: $(outs) +all: public/3rd-party .PHONY: all NET-%: @@ -56,6 +57,11 @@ public-src/jarmon-depenencies: jarmon/docs/examples/assets/js/dependencies.js jarmon/docs/examples/assets/js/dependencies.js: FORCE $(MAKE) -C jarmon docs/examples/assets/js/dependencies.js +public-src/3rd-party/yarn.LICENSES.txt: bin/yarn-bower public-src/3rd-party/package.json $(wildcard public-src/3rd-party/yarn.lock) + bin/yarn-bower install + bin/yarn-bower licenses generate-disclaimer > $@ +public/3rd-party: public-src/3rd-party/yarn.LICENSES.txt + jquery-ver=1.6.3 flot-ver=0.8.3 jsrrd-ver=1.1.1 diff --git a/bin-src/yarn-bower b/bin-src/yarn-bower new file mode 100755 index 0000000..d6210fb --- /dev/null +++ b/bin-src/yarn-bower @@ -0,0 +1,3 @@ +#!/bin/sh +cd "$(dirname -- "$(readlink -f -- "$0")")/../public-src/3rd-party" || exit +yarn --flat --no-bin-links --modules-folder yarn "$@" diff --git a/public-src/3rd-party/.gitignore b/public-src/3rd-party/.gitignore new file mode 100644 index 0000000..4574e17 --- /dev/null +++ b/public-src/3rd-party/.gitignore @@ -0,0 +1,3 @@ +/yarn/ +/yarn.LICENSES.txt +*.log diff --git a/public-src/3rd-party/package.json b/public-src/3rd-party/package.json new file mode 100644 index 0000000..d3ea028 --- /dev/null +++ b/public-src/3rd-party/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "requirejs": "^2.3.5" + } +} diff --git a/public-src/3rd-party/yarn.lock b/public-src/3rd-party/yarn.lock new file mode 100644 index 0000000..96c4650 --- /dev/null +++ b/public-src/3rd-party/yarn.lock @@ -0,0 +1,7 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +requirejs@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.5.tgz#617b9acbbcb336540ef4914d790323a8d4b861b0" diff --git a/public-src/index.html.gen b/public-src/index.html.gen index be6c6d8..dfb2e34 100755 --- a/public-src/index.html.gen +++ b/public-src/index.html.gen @@ -13,27 +13,19 @@ echo '<!DOCTYPE html> <head> <meta charset="utf-8"> <title>Dashboard</title> - <link rel=stylesheet href=style.css> + + <!-- Scripts: DHTML (run before DOMContentLoaded) --> <script src="sorttable.js"></script> <script src="colordate.js"></script> - <link rel="stylesheet" type="text/css" href="jarmon-style/style.css" /> - <link rel="stylesheet" type="text/css" href="jarmon-style/jquerytools.tabs.tabs-no-images.css" /> - - <!--<script src="jarmon-dependencies.js"></script>--> - <script src="./jarmon-dependencies/jquery-1.6.3.js"></script> - <script src="./jarmon-dependencies/flot-0.8.3/jquery.flot.js"></script> - <script src="./jarmon-dependencies/flot-0.8.3/jquery.flot.time.js"></script> - <script src="./jarmon-dependencies/flot-0.8.3/jquery.flot.stack.js"></script> - <script src="./jarmon-dependencies/flot-0.8.3/jquery.flot.selection.js"></script> - <script src="./jarmon-dependencies/javascriptrrd-1.1.1/rrdFile.js"></script> - <script src="./jarmon-dependencies/javascriptrrd-1.1.1/binaryXHR.js"></script> - <script src="./jarmon-dependencies/jquerytools-8ac4636a01d3860f1c4726ba722190a531bf1068/tabs.js"></script> - <script src="./jarmon-dependencies/jquerytools-8ac4636a01d3860f1c4726ba722190a531bf1068/toolbox.history.js"></script> + <!-- Scripts: Modules (run asynchronously after DOMContentLoaded) --> + <script src="./require.config.js"></script> + <script src="./3rd-party/yarn/requirejs/require.js" data-main="main"></script> - <script src="jarmon.js"></script> - <script src="cfg/jarmon-proton.js"></script> - <script src="cfg/jarmon-winston.js"></script> + <!-- CSS --> + <link rel="stylesheet" href="style.css"> + <link rel="stylesheet" href="jarmon-style/style.css" /> + <link rel="stylesheet" href="jarmon-style/jquerytools.tabs.tabs-no-images.css" /> </head> <body>' col sed 's/@name@/proton/' jarmon.html.in diff --git a/public-src/main.js b/public-src/main.js new file mode 100644 index 0000000..ebb09a9 --- /dev/null +++ b/public-src/main.js @@ -0,0 +1,5 @@ +define([ + //'jquerytools/dateinput', + 'cfg/jarmon-winston', + 'cfg/jarmon-proton', +], {}); diff --git a/public-src/require.config.js b/public-src/require.config.js new file mode 100644 index 0000000..bb48fd7 --- /dev/null +++ b/public-src/require.config.js @@ -0,0 +1,39 @@ +var require = { + baseUrl: "/", + shim: { + "jarmon": { + deps: [ + "javascriptrrd/rrdFile", // ~1.1 + "javascriptrrd/binaryXHR", // ~1.1 + "jquery", // ^1.6.3 + "flot/jquery.flot.stack", // >= 0.7 + "flot/jquery.flot.time", // split in to a plugin in >=0.8.0 + "flot/jquery.flot.selection", // split in to a plugin in >= 0.6 + "jquerytools/tabs", + "jquerytools/toolbox.history", + ], + exports: "jarmon" + }, + // jQuery plugins + "jquerytools/tabs" : { deps: ["jquery"], exports: "jQuery.tools.tabs" }, + "jquerytools/toolbox.history" : { deps: ["jquery"], exports: "jQuery.tools.history" }, + "flot/jquery.flot" : { deps: ["jquery"], exports: "jQuery.plot" }, + // Flot plugins + "flot/jquery.flot.time" : { deps: ["flot/jquery.flot"] }, + "flot/jquery.flot.selection" : { deps: ["flot/jquery.flot"] }, + "flot/jquery.flot.stack" : { deps: ["flot/jquery.flot"] }, + // Jarmon configs + "cfg/jarmon-winston": { deps: ["jquery", "jarmon"] }, + "cfg/jarmon-proton": { deps: ["jquery", "jarmon"] }, + }, + paths: { + //"jquery" : "3rd-party/yarn/jquery/dist/jquery", + //"flot" : "3rd-party/yarn/flot", + "requirejs" : "3rd-party/yarn/requirejs/require", + + "flot" : "jarmon-dependencies/flot-0.8.3", + "javascriptrrd" : "jarmon-dependencies/javascriptrrd-1.1.1", + "jquery" : "jarmon-dependencies/jquery-1.6.3", + "jquerytools" : "jarmon-dependencies/jquerytools-8ac4636a01d3860f1c4726ba722190a531bf1068", + }, +}; |