==> Development: Building <==
This page will give you a guide on how to build this skin from source.
->> Build environment <<-
Setting up the development environment is easy:
- clone / download repository from github
- install npm packages (
yarn install
) - for easy testing you can create a symlink from your
/path/to/weewx/skins/neowx-material
to thesrc
directory
Styling is done via SCSS, compile it to css/style.css
by running: yarn run build-css
.
->> Build scripts <<-
The package.json file contains some scripts which will help you by all tasks while building this skin.
Please run yarn install
before you execute any commands.
As we use yarn you can simply call them by executing:
yarn run $script_name
These scripts are available in the src directory:
Script name | Description |
---|---|
build-css |
Builds the css/style.css file out of
all SCSS files. By default the skin uses the minified version in the
head.inc . This is only used for development.
|
build-minify-css |
Builds the css/style.min.css file out of
all SCSS files. By default the skin uses this file.
|
copy-directories |
Copies all directories from src to the correct
dist directory.
This is used internally for the build command and uses rsync.
|
copy-directories |
Copies all files from src to the correct
dist directory.
This is used internally for the build command and uses rsync.
|
delete-build |
Removes all files from dist/skins/neowx-material/
This is used for cleanup before a new build gets created and uses
rm -Rf .
|
cleanup-build |
Removes all unneeded development files from
dist/skins/neowx-material/
which got copied by the copy commands and uses
rm -Rf .
|
build |
This will run the following commands:
|
create-zip |
Will create a zip file of the dist directory.
YOu will find the neowx-material-latest.zip
file in the root directory.
|
->> Build for production <<-
When you're done developing and want to create the final package, simply run this script in the src directory:
yarn run build
You may want to adjust the version in skin.conf
,
package.json
and
dist/install.py
before you build so the version number is correct displayed.
You can now find the final skin package in
dist/skins/neowx-material
If you want to create a zip file which can be installed by
wee_extension
create a zip file of the dist
directory. Make sure that the root of the zip file only contains the dist dir
which will contain all further data:
yarn run create-zip
You can then install the zip package like described in the quick start guide.