Skip to content

Commit f2014c6

Browse files
Restructured project to work as library
1 parent 004659b commit f2014c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+16
-41
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.gcc-flags.json
44
*Thumbs.db
55
/data/www
6-
/lib/framework/WWWData.h
6+
src/WWWData.h
77
/interface/build
88
/interface/node_modules
99
/interface/.eslintcache
File renamed without changes.
File renamed without changes.
File renamed without changes.

interface/config-overrides.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function override(config, env) {
2222
terserPlugin.options.extractComments = false;
2323

2424
// build progmem data files
25-
config.plugins.push(new ProgmemGenerator({ outputPath: "../lib/framework/WWWData.h", bytesPerLine: 20 }));
25+
config.plugins.push(new ProgmemGenerator({ outputPath: "../src/WWWData.h", bytesPerLine: 20 }));
2626
}
2727
return config;
2828
};

lib/readme.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

platformio.ini

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ framework = arduino
3030
monitor_speed = 115200
3131

3232
extra_scripts =
33-
pre:scripts/build_interface.py
33+
pre:lib/esp8266-react/scripts/build_interface.py
3434

3535
lib_deps =
3636
ArduinoJson@>=6.0.0,<7.0.0
@@ -46,9 +46,16 @@ board = esp12e
4646
board_build.f_cpu = 160000000L
4747
board_build.filesystem = littlefs
4848

49-
[env:node32s]
5049
; Comment out min_spiffs.csv setting if disabling PROGMEM_WWW with ESP32
50+
51+
[env:node32s]
5152
board_build.partitions = min_spiffs.csv
5253
platform = espressif32
5354
board = node32s
5455
board_build.filesystem = littlefs
56+
57+
[env:esp32dev]
58+
board_build.partitions = min_spiffs.csv
59+
platform = espressif32
60+
board = esp32dev
61+
board_build.filesystem = littlefs

scripts/build_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
from subprocess import check_output, Popen, PIPE, STDOUT, CalledProcessError
44
import os
55
import gzip
6+
import inspect
67

78
Import("env")
89

10+
filename = inspect.getframeinfo(inspect.currentframe()).filename
11+
dir_path = os.path.dirname(os.path.abspath(filename))
12+
913
def gzipFile(file):
1014
with open(file, 'rb') as f_in:
1115
with gzip.open(file + '.gz', 'wb') as f_out:
@@ -19,7 +23,7 @@ def flagExists(flag):
1923
return True
2024

2125
def buildWeb():
22-
os.chdir("interface")
26+
os.chdir(dir_path + '/../interface')
2327
print("Building interface with npm")
2428
try:
2529
env.Execute("npm install")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)