Skip to content

Commit

Permalink
update src
Browse files Browse the repository at this point in the history
  • Loading branch information
migliori committed Dec 13, 2023
1 parent ad867a0 commit 422e730
Show file tree
Hide file tree
Showing 9 changed files with 2,936 additions and 2,048 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
MEMO.txt
.vscode
.htaccess
apple-touch-icon.png
browserconfig.xml
favicon-16x16.png
favicon-32x32.png
favicon.ico
manifest.json
mstile-150x150.png
node_modules
safari-pinned-tab.svg
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Clone / download or install with npm
}
};

var ft = new fileTree('file-tree-wrapper', options);
var ft = new FileTree('file-tree-wrapper', options);
});
</script>
```
Expand Down Expand Up @@ -128,7 +128,7 @@ They are located in *dist/templates/*
template: 'your-custom-template'
};
var ft = new fileTree('file-tree-wrapper', options);
var ft = new FileTree('file-tree-wrapper', options);
});
</script>
```
Expand Down Expand Up @@ -158,7 +158,7 @@ You can write your own in any server language (nodeJs, ASP, ...). ie:
connector: 'asp'
};

var ft = new fileTree('file-tree-wrapper', options);
var ft = new FileTree('file-tree-wrapper', options);
});
</script>
```
Expand Down
8 changes: 4 additions & 4 deletions demo-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">

<head>
<title>File Tree Generator Demo 2 - Bootstrap modal Image Picker</title>
<title>File Tree Demo 2 - Bootstrap modal Image Picker</title>
<meta name="description" content="Retrieves directories and files recursively with Ajax from a main directory and displays the tree structure. Programmed in pure Javascript / CSS without any dependency. PHP connector is provided, you can write your own in any server language (NodeJS, ASP, ...)">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand All @@ -13,14 +13,14 @@

<body>

<h1 class="pt-5 text-center">File Tree Generator Demo 2 - Bootstrap modal Image Picker</h1>
<h1 class="pt-5 text-center">File Tree Demo 2 - Bootstrap modal Image Picker</h1>

<div class="d-flex mx-auto justify-content-center my-3" role="group">
<a href="index.html" class="btn btn-primary mr-4">Demo 1</a>
<a href="#" class="btn btn-secondary disabled">Demo 2</a>
</div>

<p class="text-center">Documentation &amp; Download: <a href="https://github.com/migliori/file-tree-generator" title="File Tree Generator">https://github.com/migliori/file-tree-generator</a></p>
<p class="text-center">Documentation &amp; Download: <a href="https://github.com/migliori/file-tree" title="File Tree">https://github.com/migliori/file-tree</a></p>
<!-- Button trigger modal -->
<div class="text-center my-5">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#file-tree-modal">Choose an image</button>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h5 class="modal-title" id="file-tree-modal-label">Choose an image</h5>
}
};

var ft = new fileTree('file-tree-wrapper', options);
var ft = new FileTree('file-tree-wrapper', options);
});
</script>
</body>
Expand Down
39 changes: 19 additions & 20 deletions dist/js/file-tree.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/file-tree.js.map

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var tsify = require('tsify');
var fancy_log = require('fancy-log');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var buffer = require('vinyl-buffer');
var paths = {
const gulp = require('gulp');
const browserify = require('browserify');
const source = require('vinyl-source-stream');
const watchify = require('watchify');
const tsify = require('tsify');
const fancy_log = require('fancy-log');
const uglify = require('gulp-uglify');
const sourcemaps = require('gulp-sourcemaps');
const buffer = require('vinyl-buffer');
const paths = {
files: ['src/ajax/*.*', 'src/connectors/*.*', 'src/lib/*?/*.*', 'src/templates/*.*', 'src/icons/fonts/*.*', 'src/icons/style.css']
};

var watchedBrowserify = watchify(browserify({
const watchedBrowserify = watchify(browserify({
basedir: '.',
debug: true,
entries: ['src/ts/file-tree.ts'],
cache: {},
packageCache: {}
}).plugin(tsify));

function bundle() {
function bundle () {
return watchedBrowserify
/* .transform('babelify', {
presets: ['es2015'],
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">

<head>
<title>File Tree Generator Demo</title>
<title>File Tree Demo</title>
<meta name="description" content="Retrieves directories and files recursively with Ajax from a main directory and displays the tree structure. Programmed in pure Javascript / CSS without any dependency. PHP connector is provided, you can write your own in any server language (NodeJS, ASP, ...)">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand All @@ -13,15 +13,15 @@

<body>

<h1 class="pt-5 text-center">File Tree Generator Demo</h1>
<h1 class="pt-5 text-center">File Tree Demo</h1>

<div class="d-flex mx-auto justify-content-center my-3" role="group">
<a href="#" class="btn btn-secondary mr-4 disabled">Demo 1</a>
<a href="demo-2.html" class="btn btn-primary">Demo 2</a>
</div>
<div class="container py-2 mb-4 text-center">
<p class="lead">This script scans a directory recursively and allows to navigate inside it like a file explorer.<br> It normally allows to drag and drop files from one directory to another.<br> This feature is disabled in the demo.</p>
<p class="text-center">Documentation &amp; Download: <a href="https://github.com/migliori/file-tree-generator" title="File Tree Generator">https://github.com/migliori/file-tree-generator</a></p>
<p class="text-center">Documentation &amp; Download: <a href="https://github.com/migliori/file-tree" title="File Tree">https://github.com/migliori/file-tree</a></p>
</div>
<div class="py-2 mb-4 text-center text-muted border">
<p id="ft-output" class="small mb-0">&nbsp;<br>&nbsp;</p>
Expand All @@ -39,7 +39,7 @@ <h1 class="pt-5 text-center">File Tree Generator Demo</h1>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var options = {
const options = {
mainDir: 'demo-files',
dragAndDrop: false,
elementClick: function (filePath, fileName) {
Expand All @@ -53,7 +53,7 @@ <h1 class="pt-5 text-center">File Tree Generator Demo</h1>
}
};

var ft = new fileTree('file-tree-wrapper', options);
const ft = new FileTree('file-tree-wrapper', options);
});
</script>
</body>
Expand Down
Loading

0 comments on commit 422e730

Please sign in to comment.