Git Product home page Git Product logo

Comments (5)

koute avatar koute commented on May 23, 2024 4

I've just pushed an initial version of the cargo web deploy subcommand to the master. Right now it has a preset output path ($crate_root/target/deploy) and I haven't yet fully tested it out yet, but you can check it out if you want. (How it works is still subject to change, so if you have any wishes or suggestions regarding that I'm all ears.)

from cargo-web.

koute avatar koute commented on May 23, 2024 2

Definitely! I also think this is where we could put stuff like minification, amalgamation of third party libraries, SASS to CSS preprocessing, etc. But what would a deployable package be, I wonder? It seems to me that it would definitely make sense to support a "copy everything into a directory I give you" mode and maybe a "pack everything into a .tgz so that I can copy it over easily".

As far as naming goes I kinda like cargo-web deploy as, unlike cargo-web package, it doesn't suggest that a package (as in - a .tgz or something) is going to be built and it doesn't require fiddling around with extra arguments.

Should be simple enough to support the initial "copy into a directory" use case; the only other issue is - to which directory we deploy by default? From every possibility I can think of I like ./target/static the most - it's in target, so it will be in people's .gitignore already, and the name static is consistent with the static we might have in the root of the crate, suggesting a close correlation between the two.

from cargo-web.

anowell avatar anowell commented on May 23, 2024

I can definitely see how this fits into a bigger pre-processing pipeline. I look forward to it.

  1. cargo-web deploy first sounded like the kind of command that will deploy an app to GH Pages or S3 or somewhere of my choosing, but your concern about cargo-web package is also valid. Perhaps "deploy to a path" and "deploy to a remote location" are conceptually similar enough.

  2. yeah, i chose target/static to fit into the scheme you already had started. I do wonder if target/asmjs-unknown-emscripten/release/static would be better. It's certainly not as pretty, but it works for debug vs release artifacts and asmjs vs wasm once you start supporting that. Of course, it still remains to be seen how you distinguishing building asm.js vs wasm. :-)

from cargo-web.

Pauan avatar Pauan commented on May 23, 2024

I'm trying to write a Chrome extension using cargo-web + stdweb, and right now I have to run cargo web build and then manually copy-paste the generated .js + .wasm files into another folder.

So it would definitely help me out if cargo-web could handle all of that for me with a single command. I'm willing to send a pull request implementing this, though I might need some pointers if I run into any trouble.

P.S. My suggestion would be to use the name cargo web bundle or cargo web release, but I'm not too attached to any particular name.

from cargo-web.

koute avatar koute commented on May 23, 2024

Just published a new version which has an initial version of this added, so closing!

from cargo-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.