I would suggest to remove the current front-end configuration (making amber more lightweight and less complex) . Then we would offer a configurable amber watch (see #476), so amber could include just a basic vanilla js css and finally we can provide examples or scaffolding to add npm, yarn, webpack, rollup, laravel-mix, parcel, browserfy, and so on.
Recently on my projects I'm removing all default JavaScript, css and webpack config, also I'm commenting this line all time. Mainly Because I'm not using complex front-ends on my projects and removing NPM does my workflow faster (sometimes I removed it to use yarn ) :sweat_smile:
Not applicable
Expected behavior: Not applicable
Actual behavior: Not applicable
Reproduces how often: Not applicable
v0.6.7
See original comment here: https://github.com/amberframework/amber/issues/692#issuecomment-372379819
@amberframework/contributors WDYT?
What would the default front end workflow look like? Just putting the amber.js script straight in the public folder?
Just putting the amber.js script straight in the public folder?
Actually, I think we can make current front-end workflow optional, so we should provide a basic main.js and styles.css on public folder as you said, but we can have the option to scaffold a default front-end like this: amber g frontend, so people creating api or simple apps with custom front-end don't have to delete our webpack config and folders that comes by default, WDYT?
BTW, We can provide some guide for developers about how to create their own font-end generators
So, Hopefully we could have:
targets:
amber_parcel:
main: /lib/amber_parcel/src/cli.cr
dependencies:
amber_parcel:
github: jondoe/amber_parcel
An then they can do something like: bin/amber_parcel g frontend
Related issue: https://github.com/amberframework/amber/issues/573
I like that idea.
What about amber g webpack-frontend instead?
If frontends will be standard as plugins, what about:
amber g frontend webpack
or will that get too complicated with options, etc. that could be passed to the generators?
amber g frontend webpack
I like this one :+1: so we should be able to do:
amber g frontend rollup
amber g frontend yarn
amber g frontend npm
amber g frontend parcel
amber g frontend browserfy
amber g frontend npm
# and so on ...
or will that get too complicated with options, etc. that could be passed to the generators?
I think that's not an issue, we can figure out how to do that.
Interesting comment here: https://github.com/amberframework/amber/issues/580#issuecomment-379435659
Seems recipe feature is going to fix a lot of issues :wink:
This should be addressed using recipes. Closing this.
Most helpful comment
I like that idea.
What about
amber g webpack-frontendinstead?