-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cut files with more than 500 lines (#5)
* add future improvement * fix command * cut large files * fix build script * rm output file * fix output file name
- Loading branch information
Showing
5 changed files
with
158 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/dist | ||
/node_modules | ||
zhankai_output.md | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Package Managers and Installation Methods by Language | ||
|
||
1. Python | ||
- pip: `pip install zhankai` | ||
- conda: `conda install zhankai` | ||
|
||
2. PHP | ||
- Composer: `composer require zhankai/zhankai` | ||
|
||
3. Ruby | ||
- RubyGems: `gem install zhankai` | ||
|
||
4. Perl | ||
- CPAN: `cpan Zhankai` | ||
|
||
5. Java | ||
- Maven: Add to `pom.xml` | ||
- Gradle: Add to `build.gradle` | ||
|
||
6. Rust | ||
- Cargo: `cargo install zhankai` | ||
|
||
7. Go | ||
- Go Modules: `go get github.com/username/zhankai` | ||
|
||
8. .NET (C#, F#, etc.) | ||
- NuGet: `dotnet add package Zhankai` | ||
|
||
9. Haskell | ||
- Cabal: `cabal install zhankai` | ||
|
||
10. Scala | ||
- sbt: Add to `build.sbt` | ||
|
||
11. Kotlin | ||
- Gradle: Add to `build.gradle.kts` | ||
|
||
12. Swift | ||
- Swift Package Manager: Add to `Package.swift` | ||
|
||
13. Dart | ||
- Pub: `pub global activate zhankai` | ||
|
||
14. Elixir | ||
- Hex: Add to `mix.exs` | ||
|
||
15. Clojure | ||
- Leiningen: Add to `project.clj` | ||
|
||
16. R | ||
- CRAN: `install.packages("zhankai")` | ||
|
||
17. MATLAB | ||
- Add-On Explorer | ||
|
||
18. Julia | ||
- Pkg: `] add Zhankai` | ||
|
||
19. Lua | ||
- LuaRocks: `luarocks install zhankai` | ||
|
||
20. OCaml | ||
- OPAM: `opam install zhankai` | ||
|
||
21. Erlang | ||
- Rebar3: Add to `rebar.config` | ||
|
||
22. Shell (Bash, Zsh, etc.) | ||
- Homebrew (macOS/Linux): `brew install zhankai` | ||
- apt (Debian/Ubuntu): `sudo apt install zhankai` | ||
- yum (CentOS/RHEL): `sudo yum install zhankai` | ||
|
||
23. Windows | ||
- Chocolatey: `choco install zhankai` | ||
- Scoop: `scoop install zhankai` | ||
|
||
24. Docker | ||
- Docker Hub: `docker pull username/zhankai` | ||
|
||
25. Platform-agnostic | ||
- Binary releases: Downloadable executables for various platforms | ||
- Installation script: `curl -sSL https://install.zhankai.com | bash` | ||
|
||
# Installation objectives | ||
|
||
Ideally, yes, if the installation script is well-designed, users should be able to simply type "zhankai" in their terminal to run the app after using the curl command. However, there are a few important considerations: | ||
|
||
1. Path addition: The installation script would need to add the zhankai executable to the user's PATH. This typically involves: | ||
- Placing the executable in a standard location (e.g., /usr/local/bin on Unix-like systems) | ||
- Or adding the installation directory to the user's PATH environment variable | ||
|
||
2. Shell configuration: If the PATH is modified, the script might need to update the user's shell configuration file (e.g., .bashrc, .zshrc) and prompt them to restart their terminal or source the updated configuration. | ||
|
||
3. Permissions: The script would need to ensure that the installed executable has the correct permissions to be run by the user. | ||
|
||
4. Multiple shells: If the user uses multiple shells, the script should ideally configure zhankai for all of them. | ||
|
||
5. System vs. user installation: The script should handle both system-wide installations (requiring sudo) and user-specific installations appropriately. | ||
|
||
6. Dependencies: If zhankai has any runtime dependencies, the script should check for and possibly install them. | ||
|
||
To ensure this smooth experience, the installation script should: | ||
|
||
1. Detect the user's environment (OS, shell, etc.) | ||
2. Install zhankai in an appropriate location | ||
3. Update PATH if necessary | ||
4. Set correct permissions | ||
5. Provide clear output about what it's doing and any next steps required | ||
|
||
With a well-implemented installation script, users should indeed be able to simply type "zhankai" to run the app immediately after installation. However, in some cases, they might need to open a new terminal window or source their updated shell configuration first. | ||
|
||
It's also good practice for the script to output instructions at the end, such as: | ||
|
||
``` | ||
Installation complete! You can now run zhankai by typing 'zhankai' in your terminal. | ||
If it doesn't work immediately, try opening a new terminal window or running 'source ~/.bashrc' (or your appropriate shell config file). | ||
``` | ||
|
||
This approach provides a smooth, user-friendly installation experience across different systems and shells. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters