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

Fetch dependencies from npm #19

Open
TimKam opened this issue Jan 20, 2020 · 3 comments
Open

Fetch dependencies from npm #19

TimKam opened this issue Jan 20, 2020 · 3 comments
Assignees

Comments

@TimKam
Copy link
Collaborator

TimKam commented Jan 20, 2020

Instead of pointing to CDNs for the JavaScript dependencies, install them via NPM. For now, don't set up a "full" build (webpack or similar) to avoid the overhead that comes with it.

@cleberjamaral
Copy link
Collaborator

Hi Timotheus,
I have started this job in the branch "testjs". The original idea was adding tests on the client-side. After many issues, I realised that first, it would be necessary to restructure the javascript code. In this branch the js source is in /src/js, using "./gradlew build" it generates in /src/resources/js the bundle file jacamoweb.js. (currently occupying 44kB). Please, have a look, you will probably find many issues and ways to improve the way I am proposing.
Cheers

@TimKam
Copy link
Collaborator Author

TimKam commented Feb 3, 2020

I think generally, it makes sense. I will checkout the branch and see what else we need to do to get this fully working.

@TimKam
Copy link
Collaborator Author

TimKam commented Feb 6, 2020

Some notes:

  • I needed to run npm install -g webpack && npm webpack-cli to make the build work. This should be handled by the built script.
  • Currently, the build result is checked in (should be ignored).
  • The dependencies are still included in the HTML files.
  • The gradle run task does not compile changes made to the JavaScript source files.

@cleberjamaral cleberjamaral pinned this issue Feb 7, 2020
@cleberjamaral cleberjamaral unpinned this issue Feb 7, 2020
@cleberjamaral cleberjamaral assigned cleberjamaral and unassigned TimKam Mar 1, 2023
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

No branches or pull requests

2 participants