mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-24 03:31:18 +08:00
parent
aed52560a7
commit
ffaee0b0c3
@ -39,6 +39,7 @@
|
|||||||
#include "recipe/lang/Node.js/pnpm.c"
|
#include "recipe/lang/Node.js/pnpm.c"
|
||||||
#include "recipe/lang/Node.js/Yarn.c"
|
#include "recipe/lang/Node.js/Yarn.c"
|
||||||
#include "recipe/lang/Node.js/Node.js.c"
|
#include "recipe/lang/Node.js/Node.js.c"
|
||||||
|
#include "recipe/lang/Node.js/Bun.c"
|
||||||
#include "recipe/lang/Node.js/nvm.c"
|
#include "recipe/lang/Node.js/nvm.c"
|
||||||
|
|
||||||
#include "recipe/lang/Perl.c"
|
#include "recipe/lang/Perl.c"
|
||||||
|
73
src/recipe/lang/Node.js/Bun.c
Normal file
73
src/recipe/lang/Node.js/Bun.c
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/** ------------------------------------------------------------
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
* -------------------------------------------------------------
|
||||||
|
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||||
|
* Contributors : Nul None <nul@none.org>
|
||||||
|
* Created On : <2024-09-29>
|
||||||
|
* Last Modified : <2024-09-29>
|
||||||
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chsrc get bun
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
pl_nodejs_bun_getsrc (char *option)
|
||||||
|
{
|
||||||
|
chsrc_view_file ("~/.bun/bunfig.toml");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @consult https://bun.sh/guides/install/custom-registry
|
||||||
|
* @consult https://github.com/RubyMetric/chsrc/issues/83
|
||||||
|
*
|
||||||
|
* chsrc set bun
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
pl_nodejs_bun_setsrc (char *option)
|
||||||
|
{
|
||||||
|
char *chsrc_type = xy_streql (option, ChsrcTypeReset) ? ChsrcTypeReset : ChsrcTypeManual;
|
||||||
|
chsrc_yield_source (pl_nodejs);
|
||||||
|
|
||||||
|
char *file = xy_strjoin(3, "[install]\n"
|
||||||
|
"registry = \"", source.url, "\"");
|
||||||
|
|
||||||
|
chsrc_note2 (xy_strjoin (3, "请您手动写入以下内容到 ", xy_uniform_path ("~/.bun/bunfig.toml"), " 文件中:"));
|
||||||
|
puts (file);
|
||||||
|
|
||||||
|
chsrc_conclude (&source, chsrc_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chsrc reset bun
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
pl_nodejs_bun_resetsrc (char *option)
|
||||||
|
{
|
||||||
|
pl_nodejs_bun_setsrc (ChsrcTypeReset);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chsrc ls bun
|
||||||
|
*/
|
||||||
|
FeatInfo
|
||||||
|
pl_nodejs_bun_feat (char *option)
|
||||||
|
{
|
||||||
|
FeatInfo fi = {0};
|
||||||
|
|
||||||
|
fi.can_get = true;
|
||||||
|
fi.can_reset = true;
|
||||||
|
|
||||||
|
fi.stcan_locally = CanFully;
|
||||||
|
fi.locally = NULL;
|
||||||
|
fi.can_english = true;
|
||||||
|
fi.can_user_define = true;
|
||||||
|
|
||||||
|
fi.note = NULL;
|
||||||
|
return fi;
|
||||||
|
}
|
||||||
|
|
||||||
|
// def_target_gsrf(pl_nodejs_bun);
|
||||||
|
TargetInfo pl_nodejs_bun_target = {def_target_inner_gsrf(pl_nodejs_bun),def_target_sourcesn(pl_nodejs)};
|
@ -5,45 +5,48 @@
|
|||||||
* Contributors : Nil Null <nil@null.org>
|
* Contributors : Nil Null <nil@null.org>
|
||||||
* Created On : <2023-09-01>
|
* Created On : <2023-09-01>
|
||||||
* Major Revision : 1
|
* Major Revision : 1
|
||||||
* Last Modified : <2024-09-23>
|
* Last Modified : <2024-09-29>
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
/* Begin Target Matrix */
|
/* Begin Target Matrix */
|
||||||
#define t(a) (const char*)(a)
|
#define t(a) (const char*)(a)
|
||||||
static const char
|
static const char
|
||||||
*pl_ruby [] = {"gem", "ruby", "rb", "rubygem", "rubygems", "bundler", NULL, t(&pl_ruby_target)},
|
*pl_ruby [] = {"gem", "ruby", "rb", "rubygem", "rubygems", "bundler", NULL, t(&pl_ruby_target)},
|
||||||
*pl_python[] = {"python", "pypi", "py", NULL, t(&pl_python_target)},
|
|
||||||
*pl_python_pip[] = {"pip", NULL, t(&pl_python_pip_target)},
|
|
||||||
*pl_python_poetry[] = {"poetry", NULL, t(&pl_python_poetry_target)},
|
|
||||||
*pl_python_pdm[] = {"pdm", NULL, t(&pl_python_pdm_target)},
|
|
||||||
|
|
||||||
*pl_nodejs[] = {"node", "nodejs", NULL, t(&pl_nodejs_target)},
|
*pl_python[] = {"python", "pypi", "py", NULL, t(&pl_python_target)},
|
||||||
*pl_nodejs_npm[] = {"npm", NULL, t(&pl_nodejs_npm_target)},
|
*pl_python_pip[] = {"pip", NULL, t(&pl_python_pip_target)},
|
||||||
*pl_nodejs_yarn[] = {"yarn", NULL, t(&pl_nodejs_yarn_target)},
|
*pl_python_poetry[] = {"poetry", NULL, t(&pl_python_poetry_target)},
|
||||||
*pl_nodejs_pnpm[] = {"pnpm", NULL, t(&pl_nodejs_pnpm_target)},
|
*pl_python_pdm[] = {"pdm", NULL, t(&pl_python_pdm_target)},
|
||||||
*pl_nodejs_nvm[] = {"nvm", NULL, t(&pl_nodejs_nvm_target)},
|
|
||||||
|
|
||||||
*pl_perl [] = {"perl", "cpan", NULL, t(&pl_perl_target)},
|
*pl_nodejs[] = {"node", "nodejs", NULL, t(&pl_nodejs_target)},
|
||||||
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},
|
*pl_nodejs_bun[] = {"bun", NULL, t(&pl_nodejs_bun_target)},
|
||||||
*pl_lua [] = {"lua", "luarocks", NULL, t(&pl_lua_target)},
|
*pl_nodejs_npm[] = {"npm", NULL, t(&pl_nodejs_npm_target)},
|
||||||
*pl_go [] = {"go", "golang", "goproxy", NULL, t(&pl_go_target)} ,
|
*pl_nodejs_yarn[] = {"yarn", NULL, t(&pl_nodejs_yarn_target)},
|
||||||
*pl_rust [] = {"rust", "cargo", "crate", "crates", NULL, t(&pl_rust_target)},
|
*pl_nodejs_pnpm[] = {"pnpm", NULL, t(&pl_nodejs_pnpm_target)},
|
||||||
*pl_java [] = {"java", "maven", "mvn", "gradle", NULL, t(&pl_java_target)},
|
*pl_nodejs_nvm[] = {"nvm", NULL, t(&pl_nodejs_nvm_target)},
|
||||||
*pl_clojure[]= {"clojure","clojars","cloj", "lein", "leiningen", NULL, t(&pl_clojure_target)},
|
|
||||||
|
|
||||||
*pl_dart [] = {"dart", "pub", NULL, t(&pl_dart_target)},
|
*pl_perl [] = {"perl", "cpan", NULL, t(&pl_perl_target)},
|
||||||
*pl_dart_flutter [] = {"flutter",NULL, t(&pl_dart_flutter_target)},
|
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},
|
||||||
|
*pl_lua [] = {"lua", "luarocks", NULL, t(&pl_lua_target)},
|
||||||
|
*pl_go [] = {"go", "golang", "goproxy", NULL, t(&pl_go_target)} ,
|
||||||
|
*pl_rust [] = {"rust", "cargo", "crate", "crates", NULL, t(&pl_rust_target)},
|
||||||
|
*pl_java [] = {"java", "maven", "mvn", "gradle", NULL, t(&pl_java_target)},
|
||||||
|
*pl_clojure[]= {"clojure","clojars","cloj", "lein", NULL, t(&pl_clojure_target)},
|
||||||
|
|
||||||
*pl_nuget[] = {"nuget", "net", ".net", "dotnet", NULL, t(&pl_nuget_target)},
|
*pl_dart [] = {"dart", "pub", NULL, t(&pl_dart_target)},
|
||||||
*pl_haskell[]= {"haskell", "cabal", "stack", "hackage", NULL, t(&pl_haskell_target)},
|
*pl_dart_flutter [] = {"flutter", NULL, t(&pl_dart_flutter_target)},
|
||||||
*pl_ocaml[] = {"ocaml", "opam", NULL, t(&pl_ocaml_target)},
|
|
||||||
*pl_r [] = {"cran", "r", NULL, t(&pl_r_target)},
|
*pl_nuget[] = {"nuget", "net", ".net", "dotnet", NULL, t(&pl_nuget_target)},
|
||||||
*pl_julia [] = {"julia", NULL, t(&pl_julia_target)},
|
*pl_haskell[]= {"haskell", "cabal", "stack", "hackage", NULL, t(&pl_haskell_target)},
|
||||||
|
*pl_ocaml[] = {"ocaml", "opam", NULL, t(&pl_ocaml_target)},
|
||||||
|
*pl_r [] = {"cran", "r", NULL, t(&pl_r_target)},
|
||||||
|
*pl_julia [] = {"julia", NULL, t(&pl_julia_target)},
|
||||||
**pl_packagers[] =
|
**pl_packagers[] =
|
||||||
{
|
{
|
||||||
pl_ruby,
|
pl_ruby,
|
||||||
pl_python, pl_python_pip, pl_python_poetry, pl_python_pdm,
|
pl_python, pl_python_pip, pl_python_poetry, pl_python_pdm,
|
||||||
pl_nodejs, pl_nodejs_npm, pl_nodejs_pnpm, pl_nodejs_yarn,
|
pl_nodejs, pl_nodejs_bun,
|
||||||
|
pl_nodejs_npm, pl_nodejs_pnpm, pl_nodejs_yarn,
|
||||||
pl_nodejs_nvm,
|
pl_nodejs_nvm,
|
||||||
pl_perl, pl_php,
|
pl_perl, pl_php,
|
||||||
pl_lua,
|
pl_lua,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user