accept all upstream incoming changes
This commit is contained in:
commit
0d29cecca8
9
.babelrc
9
.babelrc
@ -1,7 +1,6 @@
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [
|
||||
"syntax-object-rest-spread",
|
||||
"transform-object-rest-spread"
|
||||
]
|
||||
"presets": [
|
||||
"@babel/preset-env"
|
||||
],
|
||||
"plugins": []
|
||||
}
|
||||
|
@ -9,6 +9,14 @@ Please make sure you understand its [implications and guarantees](https://writin
|
||||
|
||||
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify/netlify-statuskit)
|
||||
|
||||
## Project Status
|
||||
|
||||
This project is no longer being maintained by netlify staff. This is a community led project and if you are looking to support this project, please get in touch via an issue.
|
||||
|
||||
### Netlify's Statement
|
||||
|
||||
> [Netlify] doesn't currently have the staff to process such contributions.
|
||||
|
||||
## Initial configuration
|
||||
|
||||
Click in the Deploy to Netlify button above to create your own site directly and push this repository to your own account.
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/hugo_0.55.6_darwin_amd64
Executable file
BIN
bin/hugo_0.55.6_darwin_amd64
Executable file
Binary file not shown.
BIN
bin/hugo_0.55.6_linux_amd64
Executable file
BIN
bin/hugo_0.55.6_linux_amd64
Executable file
Binary file not shown.
BIN
bin/hugo_0.55.6_windows_amd64.exe
Executable file
BIN
bin/hugo_0.55.6_windows_amd64.exe
Executable file
Binary file not shown.
@ -1,64 +1,89 @@
|
||||
import gulp from "gulp";
|
||||
import cp from "child_process";
|
||||
import gutil from "gulp-util";
|
||||
import postcss from "gulp-postcss";
|
||||
import cssImport from "postcss-import";
|
||||
import cssnext from "postcss-cssnext";
|
||||
import babel from "gulp-babel";
|
||||
import BrowserSync from "browser-sync";
|
||||
import webpack from "webpack";
|
||||
import webpackConfig from "./webpack.conf";
|
||||
import inquirer from "inquirer";
|
||||
import toml from "tomljs";
|
||||
import cp from "child_process";
|
||||
import cssImport from "postcss-import";
|
||||
import cssnext from "postcss-preset-env";
|
||||
import del from "del";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import gulp from "gulp";
|
||||
import inquirer from "inquirer";
|
||||
import kebabCase from "lodash.kebabcase";
|
||||
import path from "path";
|
||||
import postcss from "gulp-postcss";
|
||||
import toml from "tomljs";
|
||||
import tomlify from "tomlify-j0.4";
|
||||
|
||||
const browserSync = BrowserSync.create();
|
||||
const platform = getPlatform(process.platform);
|
||||
const hugoBin = `./bin/hugo_0.26_${platform}_amd64${platform === "windows" ? ".exe" : ""}`;
|
||||
const hugoBin = `./bin/hugo_0.55.6_${platform}_amd64${platform === "windows" ? ".exe" : ""}`;
|
||||
const defaultArgs = ["-s", "site", "-v"];
|
||||
const buildArgs = ["-d", "../dist"];
|
||||
|
||||
gulp.task("hugo", (cb) => buildSite(cb));
|
||||
gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture"]));
|
||||
function getPlatform(platform) {
|
||||
switch (platform) {
|
||||
case "win32":
|
||||
case "win64": {
|
||||
return "windows";
|
||||
}
|
||||
default: {
|
||||
return platform;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gulp.task("build", ["css", "js", "hugo"]);
|
||||
gulp.task("build-preview", ["css", "js", "hugo-preview"]);
|
||||
function generateFrontMatter(frontMatter, answers) {
|
||||
return `+++
|
||||
${tomlify.toToml(frontMatter, null, 2)}
|
||||
+++
|
||||
${answers.description}`;
|
||||
}
|
||||
|
||||
gulp.task("css", () => (
|
||||
gulp.src("./src/css/*.css")
|
||||
.pipe(postcss([cssnext(), cssImport({from: "./src/css/main.css"})]))
|
||||
.pipe(gulp.dest("./dist/css"))
|
||||
.pipe(browserSync.stream())
|
||||
));
|
||||
|
||||
gulp.task("js", (cb) => {
|
||||
const myConfig = Object.assign({}, webpackConfig);
|
||||
|
||||
webpack(myConfig, (err, stats) => {
|
||||
if (err) throw new gutil.PluginError("webpack", err);
|
||||
gutil.log("[webpack]", stats.toString({
|
||||
colors: true,
|
||||
progress: true
|
||||
}));
|
||||
browserSync.reload();
|
||||
cb();
|
||||
const hugo = (done, options) => {
|
||||
cp.spawn(hugoBin, ["version"], {
|
||||
stdio: "inherit"
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task("server", ["hugo", "css", "js"], () => {
|
||||
let args = options ? defaultArgs.concat(options) : defaultArgs;
|
||||
args = args.concat(buildArgs);
|
||||
|
||||
// cp needs to be in site directory
|
||||
cp.spawn(hugoBin, args, {
|
||||
stdio: "inherit"
|
||||
}).on("close", (code) => {
|
||||
if (code === 0) {
|
||||
browserSync.reload();
|
||||
done();
|
||||
} else {
|
||||
browserSync.notify("Hugo build failed :(");
|
||||
done("Hugo build failed");
|
||||
}
|
||||
});
|
||||
|
||||
return done;
|
||||
};
|
||||
|
||||
export const css = () => gulp.src("./src/css/**/*.css")
|
||||
.pipe(postcss([cssnext(), cssImport({
|
||||
from: "./src/css/main.css"
|
||||
})]))
|
||||
.pipe(gulp.dest("./dist/css"));
|
||||
|
||||
export const js = () => gulp.src("./src/js/*.js")
|
||||
.pipe(babel())
|
||||
.pipe(gulp.dest("./dist/js"));
|
||||
|
||||
export const server = gulp.series(gulp.parallel(css, js), hugo, () => {
|
||||
browserSync.init({
|
||||
server: {
|
||||
baseDir: "./dist"
|
||||
}
|
||||
});
|
||||
gulp.watch("./src/js/**/*.js", ["js"]);
|
||||
gulp.watch("./src/css/**/*.css", ["css"]);
|
||||
gulp.watch("./site/**/*", ["hugo"]);
|
||||
gulp.watch("./src/js/**/*.js", js);
|
||||
gulp.watch("./src/css/**/*.css", css);
|
||||
gulp.watch("./site/**/*", hugo);
|
||||
});
|
||||
|
||||
gulp.task("new-incident", (cb) => {
|
||||
export const newIncident = (done) => {
|
||||
const file = fs.readFileSync("site/config.toml").toString();
|
||||
const config = toml(file);
|
||||
|
||||
@ -105,7 +130,9 @@ gulp.task("new-incident", (cb) => {
|
||||
let args = ["new", `incidents${path.sep}${kebabCase(answers.name)}.md`];
|
||||
args = args.concat(defaultArgs);
|
||||
|
||||
const hugo = cp.spawn(hugoBin, args, {stdio: "pipe"});
|
||||
const hugo = cp.spawn(hugoBin, args, {
|
||||
stdio: "pipe"
|
||||
});
|
||||
hugo.stdout.on("data", (data) => {
|
||||
const message = data.toString();
|
||||
|
||||
@ -151,45 +178,16 @@ gulp.task("new-incident", (cb) => {
|
||||
|
||||
hugo.on("close", (code) => {
|
||||
if (code === 0) {
|
||||
cb();
|
||||
done();
|
||||
} else {
|
||||
cb("new incident creation failed");
|
||||
done("new incident creation failed");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function getPlatform(platform) {
|
||||
switch (platform) {
|
||||
case "win32":
|
||||
case "win64": {
|
||||
return "windows";
|
||||
}
|
||||
default: {
|
||||
return platform
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateFrontMatter(frontMatter, answers) {
|
||||
return `+++
|
||||
${tomlify(frontMatter, null, 2)}
|
||||
+++
|
||||
${answers.description}`;
|
||||
}
|
||||
|
||||
function buildSite(cb, options) {
|
||||
let args = options ? defaultArgs.concat(options) : defaultArgs;
|
||||
args = args.concat(buildArgs);
|
||||
|
||||
// cp needs to be in site directory
|
||||
return cp.spawn(hugoBin, args, {stdio: "inherit"}).on("close", (code) => {
|
||||
if (code === 0) {
|
||||
browserSync.reload();
|
||||
cb();
|
||||
} else {
|
||||
browserSync.notify("Hugo build failed :(");
|
||||
cb("Hugo build failed");
|
||||
}
|
||||
});
|
||||
}
|
||||
export const clean = (done) => del(["dist"], done);
|
||||
export const hugoPreview = (done) => hugo(done, ["--buildDrafts", "--buildFuture"]);
|
||||
export const build = gulp.series(clean, gulp.parallel(css, js), hugo);
|
||||
export const buildPreview = gulp.series(clean, gulp.parallel(css, js), hugoPreview);
|
||||
export default hugo;
|
||||
|
14080
package-lock.json
generated
14080
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
47
package.json
47
package.json
@ -15,35 +15,26 @@
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"autoprefixer": "^6.3.7",
|
||||
"babel-eslint": "^6.1.2",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
|
||||
"babel-plugin-transform-class-properties": "^6.10.2",
|
||||
"babel-plugin-transform-object-assign": "^6.8.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.8.0",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-register": "^6.11.6",
|
||||
"browser-sync": "^2.13.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"eslint": "^3.1.1",
|
||||
"eslint-plugin-import": "^1.11.1",
|
||||
"exports-loader": "^0.6.3",
|
||||
"file-loader": "^0.9.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^6.1.2",
|
||||
"gulp-postcss": "^6.1.1",
|
||||
"gulp-util": "^3.0.7",
|
||||
"hugo": "0.0.3",
|
||||
"imports-loader": "^0.6.5",
|
||||
"inquirer": "^3.2.3",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/register": "^7.0.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"browser-sync": "^2.26.7",
|
||||
"del": "^4.1.1",
|
||||
"eslint": "^5.13.0",
|
||||
"eslint-plugin-import": "^2.16.0",
|
||||
"exports-loader": "^0.7.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-babel": "^8.0.0-beta.2",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"imports-loader": "^0.8.0",
|
||||
"inquirer": "^6.2.2",
|
||||
"lodash.kebabcase": "^4.1.1",
|
||||
"postcss-cssnext": "^2.7.0",
|
||||
"postcss-import": "^8.1.2",
|
||||
"postcss-loader": "^0.9.1",
|
||||
"tomlify-j0.4": "^2.2.0",
|
||||
"tomljs": "^0.1.3",
|
||||
"url-loader": "^0.5.7",
|
||||
"whatwg-fetch": "^1.0.0"
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-preset-env": "^6.5.0",
|
||||
"tomlify-j0.4": "^3.0.0",
|
||||
"tomljs": "^0.1.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "^1.0.15"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<img src="/images/icon-large-ok.svg" />
|
||||
{{ with .Date }}
|
||||
{{ $latestDate := dateFormat "2006-01-02T15:04:05" .}}
|
||||
<p id="days-since-latest" data-latest-incident-date="{{ $latestDate }}">48+ days since last incident</p>
|
||||
<p id="days-since-latest" data-latest-incident-date="{{ $latestDate }}">Last incident: {{ .Format "02 Jan 2006 15:04 MST" }}</p>
|
||||
{{ else }}
|
||||
<p>No incidents so far, all is good</p>
|
||||
{{ end }}
|
||||
|
@ -5,7 +5,7 @@
|
||||
{{ $contact := getenv "STATUSKIT_SUPPORT_CONTACT_LINK" | default .Site.Params.contactLink }}
|
||||
{{ $favicons := .Site.Params.faviconsPath }}
|
||||
|
||||
{{ $incidents := where .Site.Pages.ByDate.Reverse "Section" "incidents" }}
|
||||
{{ $incidents := where .Site.RegularPages.ByDate.Reverse "Section" "incidents" }}
|
||||
{{ $active := where $incidents "Params.resolved" "!=" true }}
|
||||
{{ $major := where $active "Params.severity" "major-outage" }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user