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

Generate files on compile time instead of adding them to version control #29

Open
Timple opened this issue Jan 26, 2018 · 5 comments
Open
Assignees

Comments

@Timple
Copy link
Member

Timple commented Jan 26, 2018

This way the changes and pull requests become much more clear on what is actually changed.

@Timple Timple self-assigned this Jan 26, 2018
@MatthijsBurgh
Copy link
Member

I was able to figure out the following (From https://github.com/tue-robotics/tue_mobile_ui/blob/master/CONTRIBUTING.md and some testing).

required packages:

  • apt: nodejs, libgif-dev
  • npm: grunt-cli bower (Both for challenge_open only)

Install/build steps:

  • go to folder of ui
  • npm install (installs all deps)
  • npm run build (generates the 'dist')

Install/build steps (challenge_open):

  • go to folder of ui
  • npm install (installs all npm deps)
  • bower install (installs all bower deps)
  • grunt build (generate the 'dist')

I haven't figured out yet:

  • what should be in a install script?
  • how to incorporate the rest in CMake?
  • how to prevent rebuilding, when no changes.
  • how to correctly depend on robot-api. Do we build robot-api also from source? Or do we depend on the released version? But how do you develop in that way? So can you switch from released to local source? How to release robot-api?

@Rayman Is it correct what I figured out and could you help us with the remaining issues?

@Timple
Copy link
Member Author

Timple commented Mar 26, 2019

Another option is to compile in CI and only download the resulting files in the tue-env target

I have some code snippets that would accomplish this if anyone is interested

@reinzor
Copy link
Contributor

reinzor commented Mar 29, 2019

Something like this in CMAKE would work:

find_program(NPM npm REQUIRED)
execute_process(COMMAND ${NPM} install WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
execute_process(COMMAND ${NPM} run build WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

@reinzor
Copy link
Contributor

reinzor commented Mar 29, 2019

Better to switch fully to npm btw instead of using and npm and grunt and bower

@Rayman
Copy link
Member

Rayman commented Mar 29, 2019

Grunt isn't used anymore. It's only npm install, npm run build

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

4 participants