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

Add build configuration to Site package instead of project root #33

Open
1 task done
Kleisli opened this issue May 24, 2023 · 4 comments
Open
1 task done

Add build configuration to Site package instead of project root #33

Kleisli opened this issue May 24, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kleisli
Copy link

Kleisli commented May 24, 2023

What should be improved?

On one hand personally I like to have the frontend build stack including node_modules inside the Private Resources folder of my Site packages, but I also think about distribution of Site packages.

Currently the configuration defaults are copied to the root of a project, and the Styles and Scripts are built within the Site packages, but for portability or when I want to publish a Site package, I can only ship it with the built assets and they can't be changed and built again without manually copying the configuration files to the root.

Describe the solution you would like

I'm not sure what works best, but a solution could be a carbon pipeline command controller that takes care of the initialization instead of the "installer-resource-folders" in composer that always copies to the root.
./flow carbon.pipeline:init would copy the files to the root like the current way
./flow carbon.pipeline:init Vendor.Site would copy the files to DistributionPackages/Vendor.Site
in the second case the paths to the build scripts would have to be adjusted to ../../Build/Carbon.Pipeline

but I don't get if the build scripts have to be adjusted too.

Possible alternatives

No response

Additional context

to be honest I didn't try it yet, but if you are okay with the idea, I would first test it manually to add all the files to a site package and could also write the command controller. I couldn't help with the javascript though..

Are you willing to work on this?

  • Yes, I would like to help
@Kleisli Kleisli added the enhancement New feature or request label May 24, 2023
@jonnitto
Copy link
Member

Sorry, that I didn't answer you yet. Yes, please start a PR, I'm sure we can handle all js troubles ;-)

@jonnitto
Copy link
Member

jonnitto commented Apr 22, 2024

Commands are not available for neos-build packages.
But I've figured out on how to run some actions on composer update:

image

Based on that, we could add an additional question

@jonnitto
Copy link
Member

jonnitto commented Sep 9, 2024

@Kleisli Are you still interested in this?

@Kleisli
Copy link
Author

Kleisli commented Nov 11, 2024

Hej @jonnitto Sorry, I was quite busy this year with different things...
But thank you, this looks very nice. :-)

I just tried to set that up manually in a new project, but there is one thing that are currently not resolvable.. I have two requirements that are not compatible

  1. having the build configuration files and installing the node_modules in DistributionPackages/My.Site/Resources/Private/Frontend
  2. installing the the generic build scripts as dependencies e.g. in Build/Carbon.Pipeline

this only works when I copy all the build scripts into the site package, because the scripts can't auto-find their dependencies when they are installed in a subfolder. And I only want the configuration files for building in my site package, but install the build scripts as a dependency.

I have limited understanding of node.js, but I think this could work if the build scripts were installed with the node module instead of the Neos package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants