Skip to content

Commit

Permalink
Refactor code - replacing nested events with direct calls.
Browse files Browse the repository at this point in the history
Added path to top of list.
  • Loading branch information
dom111 committed Sep 2, 2022
1 parent 41ea62f commit ae519a8
Show file tree
Hide file tree
Showing 57 changed files with 1,915 additions and 1,567 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SHELL = /bin/bash
build: node_modules
npm run build

.PHONY: watch
watch: node_modules
npm run watch

.PHONY: test
test: node_modules
docker-compose run --rm -e BASE_URL=http://webdav test npm run test
Expand Down
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
- [x] Add end-to-end UI testing
- [x] Move to TypeScript
- [x] Support keyboard navigation whilst overlay is visible
- [x] Maybe a refactor...
- [x] Add eventMap to `Event` object. - Replaced with `typed-event-emitter`
- [ ] Add drag and drop tests
- [ ] Allow uploading of directories ([#48](https://github.com/dom111/webdav-js/issues/48))
- [ ] Add functionality for copying and moving files and directories
- [ ] Add progress bar for file uploads
- [ ] ReactJS implementation
- [ ] VueJS implementation
- [ ] Maybe a refactor...
- [ ] Add eventMap to `Event` object.
2 changes: 1 addition & 1 deletion assets/css/style-min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/style.css

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

7 changes: 7 additions & 0 deletions assets/css/webdav.css.map

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

File renamed without changes.
2 changes: 1 addition & 1 deletion build/examples-branch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[ ! -d ./tmp ] && mkdir -p ./tmp;

node src/example.generator.js --cdn --version "$(git rev-parse --abbrev-ref HEAD)" > ./tmp/example-cdn.js;
node build/example.generator.js --cdn --version "$(git rev-parse --abbrev-ref HEAD)" > ./tmp/example-cdn.js;
npm run --silent terser -- ./tmp/example-cdn.js -c -m -e > ./tmp/example-cdn-min.js;

printf 'javascript:' > ./examples/bookmarklet/source-min.js;
Expand Down
2 changes: 1 addition & 1 deletion build/examples-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

VERSION="$1";

node src/example.generator.js --cdn --version "$VERSION" > ./tmp/example-cdn.js;
node build/example.generator.js --cdn --version "$VERSION" > ./tmp/example-cdn.js;
npm run --silent terser -- ./tmp/example-cdn.js -c -m -e > ./tmp/example-cdn-min.js;

printf 'javascript:' > ./examples/bookmarklet/source-min.js;
Expand Down
4 changes: 2 additions & 2 deletions build/examples.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[ ! -d ./tmp ] && mkdir -p ./tmp;

node src/example.generator.js > ./tmp/example-local.js;
node build/example.generator.js > ./tmp/example-local.js;
npm run --silent terser -- ./tmp/example-local.js -c -m -e > ./tmp/example-local-min.js;
node src/example.generator.js --cdn > ./tmp/example-cdn.js;
node build/example.generator.js --cdn > ./tmp/example-cdn.js;
npm run --silent terser -- ./tmp/example-cdn.js -c -m -e > ./tmp/example-cdn-min.js;

printf 'javascript:' > ./examples/bookmarklet/source-min.js;
Expand Down
8 changes: 8 additions & 0 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ const { build } = require('esbuild'),
from: ['./dist/webdav.js'],
to: ['./src/webdav-min.js'],
},
{
from: ['./dist/webdav.js.map'],
to: ['./src/webdav.js.map'],
},
{
from: ['./dist/webdav.css'],
to: ['./assets/css/style.css', './assets/css/style-min.css'],
},
{
from: ['./dist/webdav.css.map'],
to: ['./assets/css/webdav.css.map'],
},
],
}),
],
Expand Down
Loading

0 comments on commit ae519a8

Please sign in to comment.