Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
* ci(build.yml): Try forked pkg to fix `arm64` build 2 (#292 and #294)
* feat: Set error status when help is printed (#307)
* feat: Add exit code specification (c49f53caa1f6ac94a9c8c884d70d0860f55728c1)
* feat(install): Add commands `install-file` and `install-vc` (#317)
* feat(install): Handle `--force` flag to overwrite installed packages (#317)

## 0.10.x
> Released Jun 13, 2024
Expand Down
31 changes: 31 additions & 0 deletions cmds/core/install-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (C) 2025 the Eask authors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

"use strict";

exports.command = ['install-file [files..]'];
exports.desc = 'Install packages from files, .tar files, or directories';
exports.builder = yargs => yargs
.positional(
'[files..]', {
description: 'files to install as packages',
type: 'array',
});

exports.handler = async (argv) => {
await UTIL.e_call(argv, 'core/install-file', argv.files);
};
31 changes: 31 additions & 0 deletions cmds/core/install-vc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright (C) 2025 the Eask authors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

"use strict";

exports.command = ['install-vc [specs..]'];
exports.desc = 'Install packages directly from the version control';
exports.builder = yargs => yargs
.positional(
'[specs..]', {
description: 'vc specification to install as packages',
type: 'array',
});

exports.handler = async (argv) => {
await UTIL.e_call(argv, 'core/install-vc', argv.specs);
};
26 changes: 21 additions & 5 deletions docs/content/DSL/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Declare package's author.

## 🔍 **package-file** (`file` `version` `description`)

Define this package and its runtime dependencies from the package headers
Define this package and its runtime dependencies from the package headers
of a file (used only for package development).

```elisp
Expand All @@ -65,7 +65,7 @@ of a file (used only for package development).

## 🔍 **package-descriptor** (`pkg-file`)

Declare all package metadata directly by specifying a package descriptor
Declare all package metadata directly by specifying a package descriptor
contained in file with name given by file.

```elisp
Expand Down Expand Up @@ -149,14 +149,30 @@ Specify dependencies that are listed in **archives**:
(depends-on "company")
```

Specify dependencies in **file** format:

```elisp
(depends-on "auto-rename-tag" :file "/path/to/auto-rename-tag")
(depends-on "lsp-ui" :file "/path/to/lsp-ui")
```

Specify dependencies in **vc** format:

```elisp
(depends-on "auto-rename-tag" :vc "jcs-elpa/auto-rename-tag")
(depends-on "lsp-ui" :vc "emacs-lsp/lsp-ui")
```

Specify dependencies in **recipe** format:

```elisp
(depends-on "auto-rename-tag"
:repo "jcs-elpa/auto-rename-tag"
(depends-on "auto-rename-tag"
:repo "jcs-elpa/auto-rename-tag"
:fetcher 'github)
(depends-on "lsp-ui"
(depends-on "lsp-ui"
:repo "emacs-lsp/lsp-ui"
:fetcher 'github
:files '(:defaults "lsp-ui-doc.html" "resources"))
Expand Down
22 changes: 19 additions & 3 deletions docs/content/DSL/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,30 @@ weight: 200
(depends-on "company")
```

以 **file** 格式指定依賴項:

```elisp
(depends-on "auto-rename-tag" :file "/path/to/auto-rename-tag")

(depends-on "lsp-ui" :file "/path/to/lsp-ui")
```

以 **vc** 格式指定依賴項:

```elisp
(depends-on "auto-rename-tag" :vc "jcs-elpa/auto-rename-tag")

(depends-on "lsp-ui" :vc "emacs-lsp/lsp-ui")
```

以 **recipe** 格式指定依賴項:

```elisp
(depends-on "auto-rename-tag"
:repo "jcs-elpa/auto-rename-tag"
(depends-on "auto-rename-tag"
:repo "jcs-elpa/auto-rename-tag"
:fetcher 'github)

(depends-on "lsp-ui"
(depends-on "lsp-ui"
:repo "emacs-lsp/lsp-ui"
:fetcher 'github
:files '(:defaults "lsp-ui-doc.html" "resources"))
Expand Down
10 changes: 10 additions & 0 deletions docs/content/Development-API/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ then,
(message "%s" (eask-command)) ; init
```

## 🔍 Function: eask-command-check (`version`)

Report error if the current command requires minimum `version`.

```elisp
(eask-start
(eask-command-check "27.1") ; The command requires 27.1 and above!
...
```

## 🔍 Function: eask-command-p (`commands`)

Return t if COMMANDS is the current command.
Expand Down
10 changes: 10 additions & 0 deletions docs/content/Development-API/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ eask init
(message "%s" (eask-command)) ; init
```

## 🔍 函式: eask-command-check (`version`)

如果目前的指令需要最低的 `version` 就會報錯。

```elisp
(eask-start
(eask-command-check "27.1") ; 此指令需要 27.1 及以上版本!
...
```

## 🔍 函式: eask-command-p (`commands`)

如果 COMMANDS 是目前命令,則傳回 `t`。
Expand Down
2 changes: 2 additions & 0 deletions docs/content/Getting-Started/Basic-Usage/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Commands:
info Display information about the current package
init [files..] Initialize project to use Eask
install-deps Automatically install package dependencies [aliases: install-dependencies, prepare]
install-file [files..] Install packages from files, .tar files, or directories
install-vc [specs..] Install packages directly from the version control
install [names..] Install packages
keywords List available keywords that can be used in the header section
link <action> Manage links
Expand Down
2 changes: 2 additions & 0 deletions docs/content/Getting-Started/Basic-Usage/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Commands:
info Display information about the current package
init [files..] Initialize project to use Eask
install-deps Automatically install package dependencies [aliases: install-dependencies, prepare]
install-file [files..] Install packages from files, .tar files, or directories
install-vc [specs..] Install packages directly from the version control
install [names..] Install packages
keywords List available keywords that can be used in the header section
link <action> Manage links
Expand Down
36 changes: 26 additions & 10 deletions docs/content/Getting-Started/Commands-and-options/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ Display the state of the workspace.
eask [GLOBAL-OPTIONS] status
```

## 🔍 eask install

To install packages.

```sh
eask [GLOBAL-OPTIONS] install [PACKAGES..]
```

Install packages by specifying arguments:

```sh
eask install auto-complete helm magit
```

Or else, it will install the package from the current development:

```sh
eask install
```

## 🔍 eask install-deps

To install all dependencies.
Expand All @@ -128,24 +148,20 @@ eask [GLOBAL-OPTIONS] install-deps [--dev]
💡 Specify option [--dev] to install dependencies from the development scope.
{{< /hint >}}

## 🔍 eask install
## 🔍 eask install-file

To install packages.
Install packages from files, `.tar` files, or directories.

```sh
eask [GLOBAL-OPTIONS] install [PACKAGES..]
eask [GLOBAL-OPTIONS] install-file [FILES..]
```

Install packages by specifying arguments:
## 🔍 eask install-vc

```sh
eask install auto-complete helm magit
```

Or else, it will install the package from the current development:
Install packages directly from the version control.

```sh
eask install
eask [GLOBAL-OPTIONS] install-vc [SPECS..]
```

## 🔍 eask uninstall
Expand Down
36 changes: 26 additions & 10 deletions docs/content/Getting-Started/Commands-and-options/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,26 @@ eask [GLOBAL-OPTIONS] info
eask [GLOBAL-OPTIONS] status
```

## 🔍 eask install

安裝軟件包。

```sh
eask [GLOBAL-OPTIONS] install [PACKAGES..]
```

通過指定參數安裝包:

```sh
eask install auto-complete helm magit
```

否則,它將安裝當前開發的包:

```sh
eask install
```

## 🔍 eask install-deps

安裝所有依賴項。
Expand All @@ -126,24 +146,20 @@ eask [GLOBAL-OPTIONS] install-deps [--dev]
💡 指定選項 [--dev] 從開發範圍安裝依賴項。
{{< /hint >}}

## 🔍 eask install
## 🔍 eask install-file

安裝軟件包
從檔案、`.tar` 檔案或目錄安裝套件

```sh
eask [GLOBAL-OPTIONS] install [PACKAGES..]
eask [GLOBAL-OPTIONS] install-file [FILES..]
```

通過指定參數安裝包:
## 🔍 eask install-vc

```sh
eask install auto-complete helm magit
```

否則,它將安裝當前開發的包:
直接從版本控制安裝套件。

```sh
eask install
eask [GLOBAL-OPTIONS] install-vc [SPECS..]
```

## 🔍 eask uninstall
Expand Down
Loading