Skip to content

Restructured project to work as library #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.gcc-flags.json
*Thumbs.db
/data/www
/lib/framework/WWWData.h
src/WWWData.h
/interface/build
/interface/node_modules
/interface/.eslintcache
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion interface/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function override(config, env) {
terserPlugin.options.extractComments = false;

// build progmem data files
config.plugins.push(new ProgmemGenerator({ outputPath: "../lib/framework/WWWData.h", bytesPerLine: 20 }));
config.plugins.push(new ProgmemGenerator({ outputPath: "../src/WWWData.h", bytesPerLine: 20 }));
}
return config;
};
36 changes: 0 additions & 36 deletions lib/readme.txt

This file was deleted.

10 changes: 8 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ framework = arduino
monitor_speed = 115200

extra_scripts =
pre:scripts/build_interface.py
pre:lib/esp8266-react/scripts/build_interface.py

lib_deps =
ArduinoJson@>=6.0.0,<7.0.0
Expand All @@ -43,8 +43,14 @@ board = esp12e
board_build.f_cpu = 160000000L
board_build.filesystem = littlefs

[env:node32s]
; Comment out min_spiffs.csv setting if disabling PROGMEM_WWW with ESP32

[env:node32s]
board_build.partitions = min_spiffs.csv
platform = espressif32
board = node32s

[env:esp32dev]
board_build.partitions = min_spiffs.csv
platform = espressif32
board = esp32dev
6 changes: 5 additions & 1 deletion scripts/build_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
from subprocess import check_output, Popen, PIPE, STDOUT, CalledProcessError
import os
import gzip
import inspect

Import("env")

filename = inspect.getframeinfo(inspect.currentframe()).filename
dir_path = os.path.dirname(os.path.abspath(filename))

def gzipFile(file):
with open(file, 'rb') as f_in:
with gzip.open(file + '.gz', 'wb') as f_out:
Expand All @@ -19,7 +23,7 @@ def flagExists(flag):
return True

def buildWeb():
os.chdir("interface")
os.chdir(dir_path + '/../interface')
print("Building interface with npm")
try:
env.Execute("npm install")
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.