Seed: It should be easy to create a new project from scratch without scaffolding

Created on 20 Oct 2020  路  7Comments  路  Source: seed-rs/seed

Without using any kind of template or "quickstart". And without using tools like "cargo-make" which is Yet Another Task Runner.

Most helpful comment

Could we have a cli to create project and pages/component ?

@arn-the-long-beard When you decide to implement something like this in the future, don't hesitate to use my seeder repo for it. Once usable, we can move the repo to GitHub Seed-rs org.

All 7 comments

Without using any kind of template or "quickstart". And without using tools like "cargo-make" which is Yet Another Task Runner.

IMHO it is easy ;-)
And I never used a "quickstart" template or cargo-make (I can't see the benefits).

Sorry, I didn't mean to imply that it's not easy (that's subjective anyway...).

But it needs to be seen to be easy. The documentation should provide such a choice. :smile:

@teohhanhui See https://github.com/thedodd/trunk and https://github.com/MartinKavik/seeder. A combination of these tools should replace cargo-make scripts in the future and provide commands for easy project scaffolding.

trunk seems to be Yet Another Asset Bundler. Tying the framework to the asset bundler seems like a very bad idea to me. Frontend devs would want to use existing asset bundlers, be it Webpack, Gulp, or something else. Why reinvent the wheel?

There should be a clear separation.

trunk won't be the only option, only the recommended one. You will be able to still use use whatever you want to build Seed projects.

trunk will be the first bundler specialized for Rust projects. An alternative is now basically only wasm-pack, but it has a bit different goals. There are some plugins for Webpack, Parcel, etc but they are often buggy - we want to have fast and reliable tools and escape a bit from JS ecosystem.

Could we have a cli to create project and pages/component ?

example : seed grow my_page

// my_pages.rs

use seed::{prelude::*, *};


pub struct Model {

}

pub enum Msg {

}

pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {

}
pub fn view(model: &Model) -> Node<Msg> {
    div!["My View"]
}

Could be very handy. I am copying / pasting these so many times. We could even play to generate it out from Routes with the custom Router so we have all the base and we can stay lazy and focused .

Does this proposition match your objective @teohhanhui ?

Could we have a cli to create project and pages/component ?

@arn-the-long-beard When you decide to implement something like this in the future, don't hesitate to use my seeder repo for it. Once usable, we can move the repo to GitHub Seed-rs org.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dashed picture dashed  路  5Comments

L0g4n picture L0g4n  路  4Comments

jgrund picture jgrund  路  6Comments

sbditto85 picture sbditto85  路  3Comments

MartinKavik picture MartinKavik  路  5Comments