Initial release

master
Jan Jastrow 4 years ago
commit 0c633bbe31

2
.gitignore vendored

@ -0,0 +1,2 @@
node_modules/
_dist/

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2019 Jan Jastrow
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,3 @@
# test.jan.su
Simply php site what displays current IP and other connection details.

@ -0,0 +1,5 @@
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:

@ -0,0 +1,5 @@
# Changelog
## 1.0.0 (2019-10-17)
- initial release

@ -0,0 +1,112 @@
'use strict'
//----------------
//:: Initiate npm-modules
const gulp = require('gulp'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'),
notify = require('gulp-notify'),
plumber = require('gulp-plumber'),
rename = require('gulp-rename'),
postcss = require('gulp-postcss'),
autoprefixer = require('autoprefixer'),
cssnano = require('cssnano'),
merge2 = require('merge2'),
rimraf = require('rimraf');
//----------------
//:: configs
var Config = {
inputDir: '_source/',
outputDir: '_dist/'
}
var SassConfig = {
inputDir: '_source/scss/',
outputDir: '_dist/css/',
options: {
outputStyle: 'expanded'
}
}
var postcss_plugins = [
cssnano,
autoprefixer
];
//----------------
//:: Tasks
// compile scss
function scss() {
var onError = function(err) {
notify.onError({
title: 'gulp',
subtitle: 'Error!',
message: '❌ <%= error.message %>',
sound: 'Submarine'
})(err);
this.emit('end');
};
return merge2(
gulp.src([
'node_modules/sanitize.css/sanitize.css'
]))
.pipe(concat('addons.css'))
.pipe(gulp.dest(SassConfig.outputDir))
.pipe(postcss(postcss_plugins))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(SassConfig.outputDir)),
gulp.src(SassConfig.inputDir + '*.scss')
.pipe(concat('styles.css'))
.pipe(plumber({errorHandler: onError}))
.pipe(postcss(postcss_plugins))
.pipe(sass(SassConfig.options).on('error', sass.logError))
.pipe(gulp.dest(SassConfig.outputDir))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(SassConfig.outputDir))
.pipe(livereload())
.pipe(notify({
title: 'gulp',
subtitle: 'Success!',
message: '✅ SCSS compiled',
timeout: '2'
}));
};
// Copy those other files
function copy(done) {
gulp.src([Config.inputDir + '*.*'])
.pipe(gulp.dest(Config.outputDir))
.pipe(livereload())
done();
};
// watch for changes
function watch() {
livereload.listen();
gulp.watch(SassConfig.inputDir + '*.scss', scss);
gulp.watch(Config.inputDir + '*.html', copy);
};
// delete everything in _dist
function cleanup(cb) {
return rimraf(Config.outputDir + '*', cb)
};
//----------------
//:: Export tasks
// complex tasks
const build = gulp.series(cleanup, gulp.parallel(copy, scss));
// export tasks
exports.scss = scss;
exports.copy = copy;
exports.watch = watch;
exports.cleanup = cleanup;
exports.build = build;
exports.default = build;

6181
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,39 @@
{
"name": "test.jan.su",
"description": "http connection information site",
"version": "1.0.0",
"author": "Jan Jastrow",
"license": "MIT",
"homepage": "https://test.jan.su",
"url": "",
"email": "jan@schwerkraftlabor.de",
"scripts": {
"dev": "gulp"
},
"main": "gulpfile.js",
"repository": {
"type": "git",
"url": "https://dienste.schwerkraftlabor.de/gitea/jan/test.jan.su"
},
"devDependencies": {
"autoprefixer": "^9.6.5",
"cssnano": "^4.1.10",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
"gulp-livereload": "^4.0.2",
"gulp-notify": "^3.2.0",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.2",
"merge2": "^1.3.0",
"rimraf": "^3.0.0",
"sanitize.css": "^11.0.0"
},
"browserslist": [
"last 2 version",
"> 2%",
"android >= 5.0",
"IE 11"
]
}
Loading…
Cancel
Save