Amber: [Enhancement] Simplify default front-end

Created on 12 Mar 2018  路  7Comments  路  Source: amberframework/amber

Description

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:

Steps to Reproduce

Not applicable

Expected behavior: Not applicable

Actual behavior: Not applicable

Reproduces how often: Not applicable

Versions

v0.6.7

Additional Information

See original comment here: https://github.com/amberframework/amber/issues/692#issuecomment-372379819

@amberframework/contributors WDYT?

enhancement wip

Most helpful comment

I like that idea.

What about amber g webpack-frontend instead?

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaysneg picture jaysneg  路  5Comments

sumwatt picture sumwatt  路  4Comments

ZeroPointEnergy picture ZeroPointEnergy  路  4Comments

faustinoaq picture faustinoaq  路  5Comments

faustinoaq picture faustinoaq  路  5Comments