From f6d15f947992582cfc2ec392485bffabf1b099ab Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 13 Jun 2018 14:12:14 +0200 Subject: [PATCH 1/5] add __dirname to include path --- gulpfile.babel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index cd3d483..655df28 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -204,7 +204,10 @@ export const js = () => ]) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.init())) .pipe($.include({ - includePaths: ['node_modules', SRC + '/_assets/javascripts'] + includePaths: [ + __dirname + '/node_modules', + SRC + '/_assets/javascripts' + ] })).on('error', onError) .pipe($.if(isProduction || isStaging, minify())).on('error', onError) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.write())) From de4c1836f90083397c5c39896979c5f90b93fb4b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 13 Jun 2018 14:25:33 +0200 Subject: [PATCH 2/5] voodoo --- _src/_assets/javascripts/page-getstarted.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_src/_assets/javascripts/page-getstarted.js b/_src/_assets/javascripts/page-getstarted.js index 29f5b9d..aac4929 100644 --- a/_src/_assets/javascripts/page-getstarted.js +++ b/_src/_assets/javascripts/page-getstarted.js @@ -1,4 +1,4 @@ -//=require gumshoe/dist/js/gumshoe.js +//=include gumshoe/dist/js/gumshoe.js //=include bigchain/tab.js //=include bigchain/newsletter.js @@ -7,7 +7,7 @@ const bigchaindbUrl = 'https://test.bigchaindb.com' const proxyUrl = 'https://getstarted.bigchaindb.com' const apiPath = '/api/v1/' -jQuery(function($) { +jQuery(function ($) { // // init modules @@ -29,10 +29,10 @@ gumshoe.init() function stickyNav() { const menu = document.getElementsByClassName('menu--sub')[0] - if ( window.innerWidth >= 768 ) { + if (window.innerWidth >= 768) { const offset = menu.offsetTop - window.addEventListener('scroll', function() { + window.addEventListener('scroll', function () { if (offset < window.pageYOffset) { menu.classList.add('sticky') } else { @@ -52,17 +52,17 @@ function testNetworkVersion() { const versionOutput = document.getElementById('network-version') fetch(bigchaindbUrl) - .then(function(response) { + .then(function (response) { return response.json() }) - .then(function(data) { + .then(function (data) { const version = data.version const titleOrig = versionOutput.getAttribute('title') versionOutput.innerText = version versionOutput.setAttribute('title', titleOrig + version) }) - .catch(function(error) { + .catch(function (error) { console.log(error) }) } @@ -106,13 +106,13 @@ window.addEventListener('DOMContentLoaded', function domload(event) { const codeMessages = document.querySelectorAll('.code-example__message') const escapedContent = content.replace(/'/g, "\\'") - codeMessages.forEach(function(codeMessage) { + codeMessages.forEach(function (codeMessage) { codeMessage.textContent = escapedContent }) } // quick form validation, live update code example with user input - messageInput.addEventListener('input', function() { + messageInput.addEventListener('input', function () { if (messageInput.value === '') { postButton.setAttribute('disabled', '') // empty message @@ -142,7 +142,7 @@ window.addEventListener('DOMContentLoaded', function domload(event) { postButton.innerHTML = postButtonText } - postButton.addEventListener('click', function(e) { + postButton.addEventListener('click', function (e) { e.preventDefault() buttonStateLoading() From add40e3ba074b723815b8cdd243bd91749c6493b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 25 Jun 2018 13:19:38 +0200 Subject: [PATCH 3/5] fix gumshoe path --- _src/_assets/javascripts/page-getstarted.js | 2 +- gulpfile.babel.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/_src/_assets/javascripts/page-getstarted.js b/_src/_assets/javascripts/page-getstarted.js index aac4929..6970cbb 100644 --- a/_src/_assets/javascripts/page-getstarted.js +++ b/_src/_assets/javascripts/page-getstarted.js @@ -1,4 +1,4 @@ -//=include gumshoe/dist/js/gumshoe.js +//=include gumshoejs/dist/js/gumshoe.js //=include bigchain/tab.js //=include bigchain/newsletter.js diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 655df28..9ec4320 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -159,7 +159,7 @@ export const html = () => src(DIST + '/**/*.html') export const css = () => src(SRC + '/_assets/styles/bigchain.scss') .pipe($.if(!(isProduction || isStaging), $.sourcemaps.init())) .pipe($.sass({ - includePaths: ['node_modules'] + includePaths: [__dirname + '/node_modules'] }).on('error', $.sass.logError)) .pipe($.autoprefixer()) .pipe($.if(isProduction || isStaging, $.cleanCss())) @@ -204,10 +204,7 @@ export const js = () => ]) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.init())) .pipe($.include({ - includePaths: [ - __dirname + '/node_modules', - SRC + '/_assets/javascripts' - ] + includePaths: ['node_modules', SRC + '/_assets/javascripts'] })).on('error', onError) .pipe($.if(isProduction || isStaging, minify())).on('error', onError) .pipe($.if(!(isProduction || isStaging), $.sourcemaps.write())) From 41e6687fb5b03cd4311af66888c92dfd7a9264fd Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 25 Jun 2018 13:21:34 +0200 Subject: [PATCH 4/5] bump ruby & node on Travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3313e2..6016704 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby rvm: - - 2.4 + - 2.5 cache: bundler: true @@ -8,7 +8,7 @@ cache: - $TRAVIS_BUILD_DIR/node_modules before_install: - - nvm install 9 + - nvm install 10 - pip install --user awscli - export PATH=$PATH:$HOME/.local/bin From 6f359f7bddce0e94fcdbec0ea7a47903d5293755 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 25 Jun 2018 13:29:14 +0200 Subject: [PATCH 5/5] package updates --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3cab6d4..285da37 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "description": "Landing page for BigchainDB", "homepage": "https://www.bigchaindb.com", - "license": "(c) 2017 BigchainDB - All Rights Reserved", + "license": "Apache-2.0", "main": "gulpfile.babel.js", "scripts": { "start": "gulp", @@ -28,7 +28,6 @@ "bootstrap": "^4.1.1", "clipboard": "^2.0.1", "cookies-eu-banner": "^1.2.14", - "gumshoe": "github:cferdinandi/gumshoe", "gumshoejs": "github:cferdinandi/gumshoe", "is-in-viewport": "^3.0.4", "jquery": "^3.3.1", @@ -51,7 +50,7 @@ "critical": "^1.3.3", "cross-spawn": "^6.0.5", "del": "^3.0.0", - "gulp": "github:gulpjs/gulp#4.0", + "gulp": "^4.0.0", "gulp-autoprefixer": "^5.0.0", "gulp-clean-css": "^3.9.4", "gulp-cli": "^2.0.1",