Skip to content

Commit 70f0d4b

Browse files
Restructured project to work as library
1 parent baae203 commit 70f0d4b

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

+15
-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: 8 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
@@ -43,8 +43,14 @@ board = esp12e
4343
board_build.f_cpu = 160000000L
4444
board_build.filesystem = littlefs
4545

46-
[env:node32s]
4746
; Comment out min_spiffs.csv setting if disabling PROGMEM_WWW with ESP32
47+
48+
[env:node32s]
4849
board_build.partitions = min_spiffs.csv
4950
platform = espressif32
5051
board = node32s
52+
53+
[env:esp32dev]
54+
board_build.partitions = min_spiffs.csv
55+
platform = espressif32
56+
board = esp32dev

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")

0 commit comments

Comments
 (0)