Skip to content

Commit

Permalink
Split classes out to separate files for easier authoring, merge using…
Browse files Browse the repository at this point in the history
… shell script, lint JS
  • Loading branch information
dotherightthing committed Sep 23, 2020
1 parent 3307562 commit c0285a4
Show file tree
Hide file tree
Showing 10 changed files with 1,155 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ Design Pattern: [Listbox](https://www.w3.org/TR/wai-aria-practices/#Listbox)
## Cross-platform testing

```shell
cd ~
ngrok http http://127.0.0.1:8080/
cd ~ && ./ngrok http http://127.0.0.1:8080/
```
21 changes: 21 additions & 0 deletions build-scripts/merge-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

#!/bin/bash

# File: ./build-scripts/merge-js.sh
# Allows classes to be authored in separate files but merged into frontend.js
# for linting and transpiling to frontend-es5.js via wpdtrt-npm-scripts.
# This script can be run via npm run merge:js
#
# Note:
# chmod a+x = Change access permissions of this file, to 'e[x]ecutable' for '[a]ll users'
#
# Example:
# ---
# chmod a+x build-scripts/*.sh
# ---

# e: exit the script if any statement returns a non-true return value
# v: print shell input lines as they are read (including all comments!)
set -e

cat ./js/classes/_config.js ./js/classes/*.js ./js/init.js > ./js/frontend.js
2 changes: 2 additions & 0 deletions js/classes/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable max-classes-per-file */
/* eslint-disable no-redeclare */
Loading

0 comments on commit c0285a4

Please sign in to comment.