diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index 3acffed..3932253 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -1,6 +1,12 @@ name: Build and test application on push to remote -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build: @@ -9,7 +15,6 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: 12 - - run: yarn install - - run: yarn build - - run: yarn test + node-version: 16 + - run: make build + - run: make test diff --git a/Makefile b/Makefile index 6324613..abb64ee 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,12 @@ SHELL = /bin/bash .PHONY: build -build: docker-compose.override.yml - docker-compose run --rm web npm run build +build: node_modules + npm run build .PHONY: test -test: docker-compose.override.yml - docker-compose run --rm test npm run test +test: node_modules + docker-compose run --rm -e BASE_URL=http://webdav test npm run test -docker-compose.override.yml: - @echo "version: '3'" > docker-compose.override.yml - @echo >> docker-compose.override.yml - @echo "services:" >> docker-compose.override.yml - @echo " web:" >> docker-compose.override.yml - @echo " user: `id -u`:`id -g`" >> docker-compose.override.yml - -dist/js/app.js: -dist/js/app.js: build \ No newline at end of file +node_modules: + npm install diff --git a/README.md b/README.md index a910cf3..1a80480 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ without the need for using a third party application. The application has since been rewritten to not rely on jQuery and use more modern methods and provide a single runtime file. Now that there's more separation between the interface code and the library code, I'd like to investigate using other frontend approaches to see which I prefer (and also to weigh up the differences between the currently available -frameworks). There's still work to do around code separation andhopefully this will be something I can continue to work +frameworks). There's still work to do around code separation and hopefully this will be something I can continue to work on (as time allows) I feel it's at least as stable as the previous version. ## Tested in: @@ -16,7 +16,6 @@ on (as time allows) I feel it's at least as stable as the previous version. - Chrome - Firefox - Edge -- IE11 (I may drop support for this to reduce the package size in the future - unless anyone REALY needs it?) ## Implementations diff --git a/TODO.md b/TODO.md index a1772cf..3bfd990 100644 --- a/TODO.md +++ b/TODO.md @@ -1,12 +1,11 @@ +- [x] Add more unit tests for the UI +- [x] Add end-to-end UI testing +- [x] Move to TypeScript +- [ ] 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 -- [ ] Add more unit tests for the UI -- [ ] Add end-to-end UI testing (although it seems that drag and drop might be a problem) - [ ] Support keyboard navigation whilst overlay is visible -- [ ] Improve code in `item.js` - maybe split out the functionality into each action? -- [ ] Look into moving to TypeScript - [ ] ReactJS implementation - [ ] VueJS implementation -- [ ] Native Web Components implementation -- [ ] Angular implementation +- [ ] Maybe a refactor... diff --git a/build/sass.sh b/build/sass.sh deleted file mode 100644 index d6257b4..0000000 --- a/build/sass.sh +++ /dev/null @@ -1,5 +0,0 @@ -> assets/css/style.css; -for file in node_modules/{basiclightbox/src/styles/main.scss,prismjs/themes/prism.css} assets/scss/style.scss; do - echo '/* '$file' */' >> assets/css/style.css; - npm run --silent node-sass -- --output-style=expanded $file >> assets/css/style.css; -done \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7068090..7d7450f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,4 +28,4 @@ services: # https://stackoverflow.com/a/53975412/3145856 # https://github.com/docker/compose/issues/5574 security_opt: - - seccomp:"./docker/test/chrome.json" + - seccomp:./docker/test/chrome.json diff --git a/index.html b/index.html index 2e5a034..a0bcba1 100644 --- a/index.html +++ b/index.html @@ -44,13 +44,41 @@ display: none; } +
+ > + +Whilst this started out as a very simple bookmarklet with some basic styling (and it's still not much more than that!), I'd like to - continue improve it somewhat, adding in new features and using it as - a testbed for front-end framework experience. I'd like to + continue to improve it somewhat, adding in new features and using it + as a testbed for front-end framework experience. I'd like to investigate more thorough testing using it too, ideally performing full end-to-end testing for all the features currently implemented.
@@ -202,29 +205,5 @@