Compare commits

...

3 Commits

Author SHA1 Message Date
Lars Jung
427ca82722 Maintenance. 2019-03-22 02:33:58 +01:00
Lars Jung
c521ecd055 Update deps. 2019-02-20 22:06:03 +01:00
Lars Jung
44e53ab213 Dev options. 2016-08-13 20:24:54 +02:00
11 changed files with 6987 additions and 36 deletions

View File

@@ -1,3 +1,3 @@
build /build/
node_modules /node_modules/
**/vendor /**/vendor/

View File

@@ -5,9 +5,6 @@
es6: true es6: true
node: true node: true
parserOptions:
ecmaVersion: 6
rules: rules:
array-bracket-spacing: [2, never] array-bracket-spacing: [2, never]
arrow-parens: [2, as-needed] arrow-parens: [2, as-needed]

8
.gitignore vendored
View File

@@ -1,4 +1,4 @@
build /build/
local /local/
node_modules /node_modules/
npm-debug.log /npm-debug.log

View File

@@ -1,6 +1,30 @@
# Changelog # Changelog
## v0.29.2 - *2019-03-22*
* update `babel-loader` to 7.1.1
* update `eslint` to 5.15.3
* update `ghu` to 0.13.0
* update `jsdom` to 14.0.0
* update `kjua` to 0.2.0
* update `lolight` to 1.0.0
* update `scar` to 1.2.0
## v0.29.1 - *2019-01-20*
* replace `babel-preset-es2015` with `babel-preset-env`
* update `eslint` to 5.14.1
* update `ghu` to 0.12.0
* update `jsdom` to 9.2.0
* update `kjua` to 0.1.2
* update `lolight` to 0.6.0
* update `marked` to 0.6.1
* update `normalize.css` to 8.0.1
* update `scar` to 1.0.0
## v0.29.0 - *2016-08-12* ## v0.29.0 - *2016-08-12*
* back to cleaner visual experience * back to cleaner visual experience

View File

@@ -32,7 +32,7 @@ requires [`node 6.0+`][node] to be installed).
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 Lars Jung (https://larsjung.de) Copyright (c) 2019 Lars Jung (https://larsjung.de)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

8
ghu.js
View File

@@ -18,7 +18,7 @@ const webpackCfg = include => ({
loader: 'babel-loader', loader: 'babel-loader',
query: { query: {
cacheDirectory: true, cacheDirectory: true,
presets: ['es2015'] presets: ['babel-preset-env']
} }
}, },
{ {
@@ -62,10 +62,6 @@ ghu.task('clean', 'delete build folder', () => {
return remove(BUILD); return remove(BUILD);
}); });
ghu.task('lint', 'lint all JavaScript files with eslint', () => {
return run('eslint .', {stdio: 'inherit'});
});
ghu.task('build:scripts', runtime => { ghu.task('build:scripts', runtime => {
return read(`${SRC}/_h5ai/public/js/scripts.js`) return read(`${SRC}/_h5ai/public/js/scripts.js`)
.then(newerThan(mapper, `${SRC}/_h5ai/public/js/**`)) .then(newerThan(mapper, `${SRC}/_h5ai/public/js/**`))
@@ -108,7 +104,7 @@ ghu.task('build:copy', runtime => {
read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.pug, ! **/conf/*.json`) read(`${SRC}: **, ! **/*.js, ! **/*.less, ! **/*.pug, ! **/conf/*.json`)
.then(newerThan(mapper)) .then(newerThan(mapper))
.then(each(obj => { .then(each(obj => {
if (/index\.php$/.test(obj.source)) { if ((/index\.php$/).test(obj.source)) {
obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version); obj.content = obj.content.replace('{{VERSION}}', runtime.pkg.version);
} }
})) }))

6930
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "h5ai", "name": "h5ai",
"version": "0.29.0", "version": "0.29.2",
"description": "Modern HTTP web server index.", "description": "Modern HTTP web server index.",
"homepage": "https://larsjung.de/h5ai/", "homepage": "https://larsjung.de/h5ai/",
"bugs": "https://github.com/lrsjng/h5ai/issues", "bugs": "https://github.com/lrsjng/h5ai/issues",
@@ -11,22 +11,25 @@
"url": "https://github.com/lrsjng/h5ai.git" "url": "https://github.com/lrsjng/h5ai.git"
}, },
"scripts": { "scripts": {
"build": "node ghu release" "lint": "eslint .",
"test": "node test",
"build": "node ghu release",
"precommit": "npm run lint && npm run test"
}, },
"devDependencies": { "devDependencies": {
"babel-loader": "6.2.4", "babel-loader": "7.1.1",
"babel-preset-es2015": "6.13.2", "babel-preset-env": "1.7.0",
"eslint": "3.2.2", "eslint": "5.15.3",
"ghu": "0.11.0", "ghu": "0.13.0",
"jsdom": "9.4.2", "jsdom": "14.0.0",
"kjua": "0.1.1", "kjua": "0.2.0",
"lolight": "0.3.0", "lolight": "1.0.0",
"marked": "0.3.6", "marked": "0.6.1",
"normalize.css": "4.2.0", "normalize.css": "8.0.1",
"null-loader": "0.1.1", "null-loader": "0.1.1",
"scar": "0.17.0" "scar": "1.2.0"
}, },
"engines": { "engines": {
"node": ">=6.0.0" "node": ">=10.0.0"
} }
} }

View File

@@ -122,7 +122,7 @@
- alwaysVisible: boolean, always show download button (defaults to download the current folder) - alwaysVisible: boolean, always show download button (defaults to download the current folder)
*/ */
"download": { "download": {
"enabled": false, "enabled": true,
"type": "php-tar", "type": "php-tar",
"packageName": null, "packageName": null,
"alwaysVisible": false "alwaysVisible": false
@@ -157,7 +157,7 @@
- type: string, "php" (sloooow) or "shell-du" (sloow) - type: string, "php" (sloooow) or "shell-du" (sloow)
*/ */
"foldersize": { "foldersize": {
"enabled": false, "enabled": true,
"type": "php" "type": "php"
}, },
@@ -180,7 +180,7 @@
- qrColor: string, QR-Code fill color - qrColor: string, QR-Code fill color
*/ */
"info": { "info": {
"enabled": false, "enabled": true,
"show": false, "show": false,
"qrcode": true, "qrcode": true,
"qrFill": "#999", "qrFill": "#999",
@@ -318,7 +318,7 @@
- checkboxes: boolean, show a checkbox on mouse over item - checkboxes: boolean, show a checkbox on mouse over item
*/ */
"select": { "select": {
"enabled": false, "enabled": true,
"clickndrag": true, "clickndrag": true,
"checkboxes": true "checkboxes": true
}, },

View File

@@ -49,7 +49,7 @@ const addListener = (el, type, fn) => el.addEventListener(type, fn);
const removeListener = (el, type, fn) => el.removeEventListener(type, fn); const removeListener = (el, type, fn) => el.removeEventListener(type, fn);
const readyPromise = new Promise(resolve => { const readyPromise = new Promise(resolve => {
if (/^(i|c|loade)/.test(doc.readyState)) { if ((/^(i|c|loade)/).test(doc.readyState)) {
resolve(); resolve();
} else { } else {
addListener(doc, 'DOMContentLoaded', () => resolve()); addListener(doc, 'DOMContentLoaded', () => resolve());

View File

@@ -1,5 +1,6 @@
if (!global.window) { if (!global.window) {
global.window = require('jsdom').jsdom().defaultView; const JSDOM = require('jsdom').JSDOM;
global.window = new JSDOM('').window;
} }
const {test} = require('scar'); const {test} = require('scar');