Compilation Steps
Setup development tools
1 - Install current nodejs LTS (currently using v16.14.2)
2 - Download all necessary packages in ESP3D-WEBUI directory (repository root)
Start dev server
in ESP3D-WEBUI directory (repository root)
- where
<system>
iscnc
(CNC system, laser, spindle..) ,printer
(3D printer),sand
(Sand Table) - where
<firmware>
is :grbl
,grblhal
forcnc
marlin
,marlin-embedded
(esp3dlib),repetier
,smoothieware
forprinter
grbl
forsand
will open http://localhost:8088 which display the webUI using a local test server
Build index.html.gz to /dist folder
in ESP3D-WEBUI directory (repository root)
Will generate production version for each target and firmware in dist directory
to build specific index.html.gz
- where
<system>
iscnc
(CNC system, laser, spindle..) ,printer
(3D printer),sand
(Sand Table) - where
<firmware>
is :grbl
,grblhal
forcnc
marlin
,marlin-embedded
(esp3dlib),repetier
,smoothieware
forprinter
grbl
forsand
Code Formating
How to do code formating?
.js/.css/.scss/.json files of embedded directory
The code must be formatted using the prettier tool. The configuration style is .prettierrc
present in the root directory. The configuration file is as follows:
{
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"overrides": [
{
"files": "*.js",
"options": {
"parser": "babel"
}
},
{"files": "*.css",
"options": {
"parser": "css"
}
},
{"files": "*.scss",
"options": {
"parser": "scss"
}
},
{"files": "*.json",
"options": {
"printWidth": 120,
}
}
]
}
The tool can be added as extension in vscode, and installed using :
Prettier will format one active file at once per request or during saving process according your vscode settings.A python script is also available in the repository, in directory tools
: format_sources.py
, this script can be used to format all files of the directories config
and src
, and all subdirectories at once.
When to do code formating?
Before any pull request or before submit any code, the code must be formatted. The CI will check the code formatting, and will eventually fail if the code is not formatted correctly.