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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Node for building assets instead of Java #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Asuza
Copy link
Collaborator

@Asuza Asuza commented Oct 10, 2020

I was looking at improving the README file and was trying to decide how to get this up and running. Someone had commented on the prerequisites, so I thought I would try working towards #54 by removing the dependency on Java and yuicompressor.

Since less-css is already a prereq, this has now been included locally via package.json, along with a tool for minifying the JavaScript. While I believe these are working as expected, I can't say for sure until I have the app running. So, it's a bit more dependent on node modules, but no longer dependent on Java.

I haven't included the new built assets or the node_modules folder in this PR because I wanted to get your thoughts on the whole thing first.

Here is the output when running ./build.sh with these changes:

Checking for folders and clearing them...
Clearing and remaking icon folder...
Exporting icon Inkscape SVG to PNG and plain SVG...
Background RRGGBBAA: aa6e3300
Area 0:0:168:144 exported to 168 x 144 pixels (96 dpi)
Bitmap saved as: assets/icons/sprites.png
Converting app LESS and compressing output CSS...
yarn run v1.22.10
$ /home/pi/dev/DavesMapper/node_modules/.bin/cleancss -o ./assets/css/compiled.css
Done in 3.83s.
Converting print LESS and compressing output CSS...
yarn run v1.22.10
$ /home/pi/dev/DavesMapper/node_modules/.bin/cleancss -o ./assets/css/compiled_print.css
Done in 2.93s.
Combining and compressing global JS...
Combining and compressing app JS...
Combining and compressing keyboard shortcut JS...
Updating and compressing service worker JS...
Build complete!

@Asuza Asuza requested a review from davmillar October 10, 2020 18:33
@davmillar
Copy link
Owner

Looks great so far! I’ll give it a try on my machine soon and see how it behaves but it looks promising.

beporter added a commit to beporter/DavesMapper that referenced this pull request Oct 25, 2021
Builds on davmillar#91 to add the existing asset pipeline tooling to (only) the vagrant box.

This work conflicts with davmillar#90 somewhat. In general, davmillar#90 is preferable as it moves things forward and this PR merely meets the project where it's at. If anything, I'd recommend merging this one first, then adapting davmillar#90 to:

1. Not use yarn. It's unnecessary.
2. Replace yarn.lock with package-lock.json.
3. Remove the unnecessary yui-compressor from the Vagrantfile provisioning block.
beporter added a commit to beporter/DavesMapper that referenced this pull request Oct 30, 2021
Builds on davmillar#91 to add the existing asset pipeline tooling to (only) the vagrant box.

This work conflicts with davmillar#90 somewhat. In general, davmillar#90 is preferable as it moves things forward and this PR merely meets the project where it's at. If anything, I'd recommend merging this one first, then adapting davmillar#90 to:

1. Not use yarn. It's unnecessary.
2. Replace yarn.lock with package-lock.json.
3. Remove the unnecessary yui-compressor from the Vagrantfile provisioning block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants