Comments (5)
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.
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.
I can definitely see how this fits into a bigger pre-processing pipeline. I look forward to it.
-
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 aboutcargo-web package
is also valid. Perhaps "deploy to a path" and "deploy to a remote location" are conceptually similar enough. -
yeah, i chose
target/static
to fit into the scheme you already had started. I do wonder iftarget/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.
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.
Just published a new version which has an initial version of this added, so closing!
from cargo-web.
Related Issues (20)
- Update Emscripten support HOT 2
- cargo web build ignores dependency features HOT 1
- cargo web start for single page applications
- https support?
- Error when installing
- cargo-web tet fails, no .js file found HOT 5
- Option to include the wasm file content into the generated .js runtime?
- cargo web uses color even when not supported
- cli: expose option use_system_emscripten - and/or allow to use cached download HOT 1
- Cargo panic when running web build HOT 6
- thread 'main' panicked at 'unknown name section chunk type: 7' HOT 13
- cargo web build does not have the default html shell in the build folder
- cargo web start does not correctly serve the sourcemap
- cargo web doesn't serve or deploy Emscripten .data files
- Cash on cargo web build in WSL HOT 1
- Cargo web redownloads emscripten
- error: usage of `--profile` requires `-Z unstable-options`
- Maintenance status HOT 2
- cargo-web 0.6.26 rustc 1.60 [Release flag is ignored] HOT 1
- Installation instruction for precompiled binaries no longer works
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-web.