Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system integration using vue-cli. #62

Merged
merged 7 commits into from
May 31, 2020
Merged

Conversation

bastienwirtz
Copy link
Owner

@bastienwirtz bastienwirtz commented May 25, 2020

Description

馃憢 Hi!
This pull request introduce a build system, which will, among others, makes new features & maintainability easier.
The whole project structure must have been reworked (laaarge diff but was necessary) and I took the opportunity to add some requested features:

Anyone willing to test this full rework on the project, give some feedbacks or contribute in any way will be more than welcome! 鉂わ笍

Credits goes to @traeblain for the CSS variables & optionnal header part, thanks a lot! (I integrated the idea of the default configuration, see src/assets/defaults.yml).

Usage

Before build, the config file is located in the public/ directory.

Build command

Use the following command to build and run the project.

yarn install

# run locally (for testing or developement purposes)
yarn serve

# Build the static dashboard:
yarn build

# Alternatively, npm can be used (npm install, npm run serve, npm run build)

New configuration options

header: true
theme: default
colors:
  light:
    highlight-primary: "#3367d6"
    highlight-secondary: "#4285f4"
    highlight-hover: "#5a95f5"
    background: "#f5f5f5"
    card-background: "#ffffff"
    text: "#363636"
    text-header: "#ffffff"
    text-title: "#303030"
    text-subtitle: "#424242"
    card-shadow: rgba(0, 0, 0, 0.1)
    link-hover: "#363636"
  dark:
    highlight-primary: "#3367d6"
    highlight-secondary: "#4285f4"
    highlight-hover: "#5a95f5"
    background: "#131313"
    card-background: "#2b2b2b"
    text: "#eaeaea"
    text-header: "#ffffff"
    text-title: "#fafafa"
    text-subtitle: "#f5f5f5"
    card-shadow: rgba(0, 0, 0, 0.4)
    link-hover: "#ffdd57"

Copy link
Contributor

@fbartels fbartels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I gave the pr a quick read and made a really quick test with my current config.yml.

With my current config.yml I have the following error:
image

title: "Overview page"
subtitle: "Home"
icon: "fas fa-home"

It looks like using the font for the icon does no longer replace the image.

Initially I wanted to simply expose the /public directory with my local webserver, but the realized that the directory only holds some template files used during build like your config.yml. Maybe the directory could be renamed in case others would make the same connection.

What is a bit of a pity is that the way this pr is right now I always need to run a build at least once to have the final result in the dist directory. The main system I am running Homer on is an openwrt router (no yarn, no docker), which means that I would need to run the build on another system and then copy the dist folder to the final device afterwards.

Another small thing. Scrolling through the source it seems that there are now defaults coded into the files, which means whatever I don't override in the config.yml is using default values (this is great!). To make management a bit easier it would be great if the example config.yml is renamed to config.yml.dist and the actual file added to .gitignore. This would make it easier to manage local changes to it. (and in a similar vein I would drop the example config.yml from the readme and simply link to the actual file, makes management easier imho).

items:
- name: "Awesome app"
logo: "assets/tools/sample.png"
subtitle: "Bookmark exemple"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example

README.md Outdated
npm run serve
```

### themes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Themes (capital t)

README.md Outdated

### themes

Theme are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Themes are meant..

README.md Outdated
@@ -81,7 +161,7 @@ services:
subtitle: "Continuous integration server"
tag: "CI"
url: "#"
target: '_blank' # optional html a tag target attribute
target: "_blank" # optional html a tag target attribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop the "a"

@bastienwirtz
Copy link
Owner Author

Thanks so much for the review @fbartels!
Just fixed typos & moved config.yml to dist. I'll look at the icon issue soon.

Regarding the build, I'm pretty sure I can automate the creation of github releases with the build result attached as assets, you would be able to just download a tar.gz or something like that. Would that works?

@fbartels
Copy link
Contributor

You're welcome. I cannot comment much on the Vue parts, though.

Yes, having release assets would probably do the trick.

@bastienwirtz bastienwirtz merged commit 5fa6b6c into master May 31, 2020
@bastienwirtz bastienwirtz deleted the dev/build-system branch May 31, 2020 06:22
@bastienwirtz
Copy link
Owner Author

@fbartels I fixed the icon issue, and automated the build & ready to use release, you can find a homer.zip file for each new versions here https://github.com/bastienwirtz/homer/releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants