mirror of
https://github.com/ipdb/website.git
synced 2024-11-22 01:26:52 +01:00
remove gulp-util, Travis updates
This commit is contained in:
parent
a6b689ed84
commit
0dc0f09742
@ -1,6 +1,6 @@
|
|||||||
language: ruby
|
language: ruby
|
||||||
rvm:
|
rvm:
|
||||||
- 2.4
|
- 2.5
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
bundler: true
|
bundler: true
|
||||||
@ -8,7 +8,7 @@ cache:
|
|||||||
- $TRAVIS_BUILD_DIR/node_modules
|
- $TRAVIS_BUILD_DIR/node_modules
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- nvm install 9
|
- nvm install 10
|
||||||
|
|
||||||
before_script: "_ci/setup.sh"
|
before_script: "_ci/setup.sh"
|
||||||
script: "_ci/build.sh"
|
script: "_ci/build.sh"
|
||||||
|
@ -66,8 +66,7 @@ Some pages like front page source their content dynamically during site build. T
|
|||||||
|
|
||||||
You need to have the following tools installed on your development machine before moving on:
|
You need to have the following tools installed on your development machine before moving on:
|
||||||
|
|
||||||
- [node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
|
- [Node.js](http://nodejs.org/) & [npm](https://npmjs.org/)
|
||||||
- (optional) use [Yarn](https://yarnpkg.com) instead of npm for faster dependency installations
|
|
||||||
- [Ruby](https://www.ruby-lang.org) (for sanity, install with [rvm](https://rvm.io/))
|
- [Ruby](https://www.ruby-lang.org) (for sanity, install with [rvm](https://rvm.io/))
|
||||||
- [Bundler](http://bundler.io/)
|
- [Bundler](http://bundler.io/)
|
||||||
|
|
||||||
@ -185,7 +184,7 @@ At the moment, jQuery is only used for the form submissions for its simple `$.aj
|
|||||||
For all code in this repository the Apache License, Version 2.0 is applied.
|
For all code in this repository the Apache License, Version 2.0 is applied.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Copyright Interplanetary Database Foundation 2017. All rights reserved.
|
Copyright Interplanetary Database Foundation 2018. All rights reserved.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -7,7 +7,7 @@ echo " Installing dependencies "
|
|||||||
echo "============================================="
|
echo "============================================="
|
||||||
echo "$(tput sgr0)" # reset
|
echo "$(tput sgr0)" # reset
|
||||||
|
|
||||||
npm install gulpjs/gulp.git#4.0 -g
|
npm install gulp@next -g
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Travis does that automatically after selecting ruby
|
# Travis does that automatically after selecting ruby
|
||||||
|
@ -8,6 +8,8 @@ import browser from 'browser-sync'
|
|||||||
import critical from 'critical'
|
import critical from 'critical'
|
||||||
import yaml from 'js-yaml'
|
import yaml from 'js-yaml'
|
||||||
import request from 'request'
|
import request from 'request'
|
||||||
|
import chalk from 'chalk'
|
||||||
|
import minimist from 'minimist'
|
||||||
|
|
||||||
// required to get our mix of old and ES6+ js to work with ugify-js 3
|
// required to get our mix of old and ES6+ js to work with ugify-js 3
|
||||||
import uglifyjs from 'uglify-es'
|
import uglifyjs from 'uglify-es'
|
||||||
@ -24,14 +26,16 @@ const site = yaml.safeLoad(fs.readFileSync('./_config.yml'))
|
|||||||
|
|
||||||
// handle errors
|
// handle errors
|
||||||
const onError = (error) => {
|
const onError = (error) => {
|
||||||
console.log($.util.colors.red('\nYou fucked up:', error.message, 'on line', error.lineNumber, '\n'))
|
console.log(chalk.red('\nYou fucked up:', error.message, 'on line', error.lineNumber, '\n'))
|
||||||
this.emit('end')
|
this.emit('end')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'development' is just default, production overrides are triggered
|
// 'development' is just default, production overrides are triggered
|
||||||
// by adding the production flag to the gulp command e.g. `gulp build --production`
|
// by adding the production flag to the gulp command e.g. `gulp build --production`
|
||||||
const isProduction = ($.util.env.production === true)
|
const options = minimist(process.argv.slice(2))
|
||||||
const isStaging = ($.util.env.staging === true)
|
|
||||||
|
const isProduction = options.production === true
|
||||||
|
const isStaging = options.staging === true
|
||||||
|
|
||||||
|
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -296,17 +300,17 @@ export const watchSrc = () => {
|
|||||||
const buildBanner = (done) => {
|
const buildBanner = (done) => {
|
||||||
let buildEnvironment
|
let buildEnvironment
|
||||||
|
|
||||||
if ($.util.env.production) {
|
if (isProduction) {
|
||||||
buildEnvironment = 'production'
|
buildEnvironment = 'production'
|
||||||
} else if ($.util.env.staging) {
|
} else if (isStaging) {
|
||||||
buildEnvironment = 'staging'
|
buildEnvironment = 'staging'
|
||||||
} else {
|
} else {
|
||||||
buildEnvironment = 'dev'
|
buildEnvironment = 'dev'
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log($.util.colors.gray(' ------------------------------------------'))
|
console.log(chalk.gray(' ------------------------------------------'))
|
||||||
console.log($.util.colors.green(` Building ${buildEnvironment} version...`))
|
console.log(chalk.green(` Building ${buildEnvironment} version...`))
|
||||||
console.log($.util.colors.gray(' ------------------------------------------'))
|
console.log(chalk.gray(' ------------------------------------------'))
|
||||||
|
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
@ -318,18 +322,18 @@ const buildBanner = (done) => {
|
|||||||
const deployBanner = (done) => {
|
const deployBanner = (done) => {
|
||||||
let deployTarget
|
let deployTarget
|
||||||
|
|
||||||
if ($.util.env.live) {
|
if (options.live) {
|
||||||
deployTarget = 'Live'
|
deployTarget = 'Live'
|
||||||
} else {
|
} else {
|
||||||
deployTarget = 'Beta'
|
deployTarget = 'Beta'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($.util.env.live || $.util.env.beta || $.util.env.gamma) === true) {
|
if ((options.live || options.beta || options.gamma) === true) {
|
||||||
console.log($.util.colors.gray(' ------------------------------------------'))
|
console.log(chalk.gray(' ------------------------------------------'))
|
||||||
console.log($.util.colors.green(` Deploying to ${deployTarget}... `))
|
console.log(chalk.green(` Deploying to ${deployTarget}... `))
|
||||||
console.log($.util.colors.gray(' ------------------------------------------'))
|
console.log(chalk.gray(' ------------------------------------------'))
|
||||||
} else {
|
} else {
|
||||||
console.log($.util.colors.red('\nHold your horses! You need to specify a deployment target like so: gulp deploy --beta. Possible targets are: --live, --beta, --gamma\n'))
|
console.log(chalk.red('\nHold your horses! You need to specify a deployment target like so: gulp deploy --beta. Possible targets are: --live, --beta, --gamma\n'))
|
||||||
}
|
}
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
@ -376,14 +380,14 @@ export const s3 = () => {
|
|||||||
// create publisher, define config
|
// create publisher, define config
|
||||||
let publisher
|
let publisher
|
||||||
|
|
||||||
if ($.util.env.live === true) {
|
if (options.live === true) {
|
||||||
publisher = $.awspublish.create({
|
publisher = $.awspublish.create({
|
||||||
'params': { 'Bucket': S3BUCKET },
|
'params': { 'Bucket': S3BUCKET },
|
||||||
'accessKeyId': process.env.AWS_ACCESS_KEY,
|
'accessKeyId': process.env.AWS_ACCESS_KEY,
|
||||||
'secretAccessKey': process.env.AWS_SECRET_KEY,
|
'secretAccessKey': process.env.AWS_SECRET_KEY,
|
||||||
'region': S3REGION
|
'region': S3REGION
|
||||||
})
|
})
|
||||||
} else if ($.util.env.beta === true) {
|
} else if (options.beta === true) {
|
||||||
publisher = $.awspublish.create({
|
publisher = $.awspublish.create({
|
||||||
'params': { 'Bucket': S3BUCKET_BETA },
|
'params': { 'Bucket': S3BUCKET_BETA },
|
||||||
'accessKeyId': process.env.AWS_BETA_ACCESS_KEY,
|
'accessKeyId': process.env.AWS_BETA_ACCESS_KEY,
|
||||||
@ -459,17 +463,17 @@ export const seo = (done) => {
|
|||||||
|
|
||||||
const showResponse = (error, response) => {
|
const showResponse = (error, response) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
$.util.log($.util.colors.red(error))
|
console.log(chalk.red(error))
|
||||||
} else {
|
} else {
|
||||||
$.util.log($.util.colors.gray('Status:', response && response.statusCode))
|
console.log(chalk.gray('Status:', response && response.statusCode))
|
||||||
|
|
||||||
if (response.statusCode === 200) {
|
if (response.statusCode === 200) {
|
||||||
$.util.log($.util.colors.green('Successfully notified'))
|
console.log(chalk.green('Successfully notified'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($.util.env.live === true) {
|
if (options.live === true) {
|
||||||
request(`${googleUrl + site.url}/sitemap.xml`, showResponse)
|
request(`${googleUrl + site.url}/sitemap.xml`, showResponse)
|
||||||
request(`${bingUrl + site.url}/sitemap.xml`, showResponse)
|
request(`${bingUrl + site.url}/sitemap.xml`, showResponse)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "ipdb-site",
|
"name": "@ipdb/website",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Matthias Kretschmann",
|
"name": "Matthias Kretschmann",
|
||||||
@ -38,8 +38,9 @@
|
|||||||
"@babel/core": "^7.1.0",
|
"@babel/core": "^7.1.0",
|
||||||
"@babel/preset-env": "^7.1.0",
|
"@babel/preset-env": "^7.1.0",
|
||||||
"@babel/register": "^7.0.0",
|
"@babel/register": "^7.0.0",
|
||||||
"babel-eslint": "^8.2.6",
|
"babel-eslint": "^10.0.1",
|
||||||
"browser-sync": "^2.24.7",
|
"browser-sync": "^2.24.7",
|
||||||
|
"chalk": "^2.4.1",
|
||||||
"concurrent-transform": "^1.0.0",
|
"concurrent-transform": "^1.0.0",
|
||||||
"critical": "^1.3.4",
|
"critical": "^1.3.4",
|
||||||
"cross-spawn": "^6.0.5",
|
"cross-spawn": "^6.0.5",
|
||||||
@ -47,7 +48,7 @@
|
|||||||
"eslint": "^5.6.0",
|
"eslint": "^5.6.0",
|
||||||
"eslint-config-ascribe": "^3.0.5",
|
"eslint-config-ascribe": "^3.0.5",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"gulp": "github:gulpjs/gulp#4.0",
|
"gulp": "next",
|
||||||
"gulp-autoprefixer": "^6.0.0",
|
"gulp-autoprefixer": "^6.0.0",
|
||||||
"gulp-awspublish": "^3.4.0",
|
"gulp-awspublish": "^3.4.0",
|
||||||
"gulp-awspublish-router": "^0.1.5",
|
"gulp-awspublish-router": "^0.1.5",
|
||||||
@ -68,8 +69,8 @@
|
|||||||
"gulp-sourcemaps": "^2.6.4",
|
"gulp-sourcemaps": "^2.6.4",
|
||||||
"gulp-svg-sprite": "^1.5.0",
|
"gulp-svg-sprite": "^1.5.0",
|
||||||
"gulp-uglify": "^3.0.1",
|
"gulp-uglify": "^3.0.1",
|
||||||
"gulp-util": "^3.0.8",
|
|
||||||
"js-yaml": "^3.12.0",
|
"js-yaml": "^3.12.0",
|
||||||
|
"minimist": "^1.2.0",
|
||||||
"request": "^2.88.0",
|
"request": "^2.88.0",
|
||||||
"stylelint": "^9.6.0",
|
"stylelint": "^9.6.0",
|
||||||
"stylelint-config-bigchaindb": "^1.2.1",
|
"stylelint-config-bigchaindb": "^1.2.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user