-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from drashland/minor-chores
chore: Remove bloat
- Loading branch information
Showing
6 changed files
with
58 additions
and
199 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
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 |
---|---|---|
|
@@ -19,23 +19,9 @@ | |
|
||
--- | ||
|
||
`dmm` (pronounced "dim") is a Deno module manager. It can update your `deps.ts` file, check if any of your dependencies are out of date, and give you information about any module in the Deno world. Managing your dependencies hasn't been easier. | ||
`dmm` is a Deno module manager. It can update your `deps.ts` file, check if any of your dependencies are out of date, and give you information about any module in the Deno world. Managing your dependencies hasn't been easier. | ||
|
||
# Table of Contents | ||
|
||
* [Documentation](#documentation) | ||
* [Features](#features) | ||
* [Quick Start](#quick-start) | ||
* [How it Works](#how-it-works) | ||
* [Mirrors](#mirrors) | ||
* [Contributing](#contributing) | ||
* [License](#license) | ||
|
||
# Documentation | ||
|
||
* [Full Documentation](https://drash.land/dmm/) | ||
|
||
# Features | ||
### Features | ||
|
||
* Zero dependencies | ||
* Easy and simple to use | ||
|
@@ -47,47 +33,16 @@ | |
* No variants of `node_modules` and `package.json` | ||
* No extra configuration around import maps | ||
|
||
# Quick Start | ||
|
||
There are two ways you can use this module: | ||
|
||
1. You can install it through the `deno` command. | ||
```sh | ||
$ deno install \ | ||
--allow-net='cdn.deno.land,api.deno.land,x.nest.land,raw.githubusercontent.com,github.com,api.github.com' \ | ||
--allow-read='.' \ | ||
--allow-write='deps.ts' \ | ||
https://deno.land/x/[email protected]/mod.ts | ||
|
||
$ dmm help | ||
```` | ||
### Getting Started | ||
|
||
2. Run it through a URL. | ||
```sh | ||
$ deno run \ | ||
--allow-net='cdn.deno.land,api.deno.land,x.nest.land,raw.githubusercontent.com,github.com,api.github.com' \ | ||
--allow-read='.' \ | ||
--allow-write='deps.ts' \ | ||
https://deno.land/x/[email protected]/mod.ts \ | ||
help | ||
``` | ||
Get started [here](https://drash.land/dmm/#/#quickstart) with a basic example. | ||
|
||
# How It Works | ||
### How It Works | ||
|
||
dmm reads the `deps.ts` file at the current working directory -- checking versioned `import` and `export` statements and checking to see if they can be updated. If any dependency can be updated, it lets you know which ones can be updated; and if you want to update them, dmm will rewrite your `deps.ts` file so that your dependencies reflect their latest versions. | ||
|
||
_Note: nest.land may not reflect the latest Deno Standard Modules version immediately after Deno releases a new version. Please keep this in mind when importing your modules via nest.land._ | ||
|
||
## Mirrors | ||
|
||
* https://nest.land/package/dmm | ||
|
||
## Contributing | ||
|
||
Contributors are welcomed! | ||
|
||
Please read through our [contributing guidelines](./.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. | ||
|
||
## License | ||
--- | ||
|
||
By contributing your code, you agree to license your contribution under the [MIT License](./LICENSE). | ||
Want to contribute? Follow the Contributing Guidelines [here](https://github.com/drashland/.github/blob/master/CONTRIBUTING.md). All code is released under the [MIT License](./LICENSE). |
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,46 @@ | ||
import { version } from "../../src/commands/version.ts"; | ||
|
||
export const expectedHelpMessage = ` | ||
A module manager for Deno. | ||
USAGE | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v${version}/mod.ts | ||
dmm [SUBCOMMAND] | ||
SUBCOMMANDS | ||
check [modules] | ||
Checks the specified modules for newer version. Will check all if modules are | ||
omitted. | ||
update [modules] | ||
Updates the specified modules to the newest version. Will update all if modules | ||
are omitted. | ||
info [modules] | ||
Displays information about the given modules, be it std or 3rd party. The 3rd | ||
party module must be referenced at https://deno.land/x/ | ||
help, --help | ||
Prints the help message | ||
version, --version | ||
Prints the current dmm version | ||
EXAMPLE USAGE | ||
Install dmm | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v${version}/mod.ts | ||
Check a single module | ||
dmm check fs | ||
Update a single module | ||
dmm update fs | ||
Get information about a module | ||
dmm info http | ||
`; |
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,5 +1,6 @@ | ||
import { assertEquals, colours } from "../../deps.ts"; | ||
import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; | ||
import { expectedHelpMessage } from "../data/expected_help_message.ts"; | ||
|
||
Deno.test({ | ||
name: "No Purpose", | ||
|
@@ -18,50 +19,7 @@ Deno.test({ | |
const stderr = new TextDecoder("utf-8").decode(error); | ||
assertEquals( | ||
stdout, | ||
` | ||
A module manager for Deno. | ||
USAGE | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/[email protected]/mod.ts | ||
dmm [SUBCOMMAND] | ||
SUBCOMMANDS | ||
check [modules] | ||
Checks the specified modules for newer version. Will check all if modules are | ||
omitted. | ||
update [modules] | ||
Updates the specified modules to the newest version. Will update all if modules | ||
are omitted. | ||
info [modules] | ||
Displays information about the given modules, be it std or 3rd party. The 3rd | ||
party module must be referenced at https://deno.land/x/ | ||
help, --help | ||
Prints the help message | ||
version, --version | ||
Prints the current dmm version | ||
EXAMPLE USAGE | ||
Install dmm | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/[email protected]/mod.ts | ||
Check a single module | ||
dmm check fs | ||
Update a single module | ||
dmm update fs | ||
Get information about a module | ||
dmm info http | ||
`, | ||
expectedHelpMessage, | ||
); | ||
assertEquals(stderr, ""); | ||
assertEquals(status.code, 0); | ||
|
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,6 +1,7 @@ | ||
import { assertEquals, colours } from "../../deps.ts"; | ||
import { version } from "../../src/commands/version.ts"; | ||
import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; | ||
import { expectedHelpMessage } from "../data/expected_help_message.ts"; | ||
|
||
Deno.test({ | ||
name: "Help", | ||
|
@@ -20,50 +21,7 @@ Deno.test({ | |
assertEquals(stderr, ""); | ||
assertEquals( | ||
stdout, | ||
` | ||
A module manager for Deno. | ||
USAGE | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/[email protected]/mod.ts | ||
dmm [SUBCOMMAND] | ||
SUBCOMMANDS | ||
check [modules] | ||
Checks the specified modules for newer version. Will check all if modules are | ||
omitted. | ||
update [modules] | ||
Updates the specified modules to the newest version. Will update all if modules | ||
are omitted. | ||
info [modules] | ||
Displays information about the given modules, be it std or 3rd party. The 3rd | ||
party module must be referenced at https://deno.land/x/ | ||
help, --help | ||
Prints the help message | ||
version, --version | ||
Prints the current dmm version | ||
EXAMPLE USAGE | ||
Install dmm | ||
deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/[email protected]/mod.ts | ||
Check a single module | ||
dmm check fs | ||
Update a single module | ||
dmm update fs | ||
Get information about a module | ||
dmm info http | ||
`, | ||
expectedHelpMessage, | ||
); | ||
assertEquals(status.code, 0); | ||
assertEquals(status.success, true); | ||
|