Skip to content
Permalink
Browse files

Replace deno.land/x/ with deno.land/std/ (denoland#239)

  • Loading branch information...
hayd authored and ry committed Mar 6, 2019
1 parent d430a24 commit 0fc13fffbdb59d6aee2b11ff17a5de382273126b
Showing with 27 additions and 27 deletions.
  1. +1 −1 benching/example.ts
  2. +2 −2 benching/readme.md
  3. +1 −1 colors/README.md
  4. +3 −3 examples/README.md
  5. +1 −1 examples/gist.ts
  6. +2 −2 examples/ws.ts
  7. +1 −1 flags/README.md
  8. +1 −1 fs/path/README.md
  9. +2 −2 http/README.md
  10. +1 −1 log/README.md
  11. +7 −7 media_types/README.md
  12. +4 −4 prettier/README.md
  13. +1 −1 testing/README.md
@@ -1,4 +1,4 @@
// https://deno.land/x/benching/mod.ts
// https://deno.land/std/benching/mod.ts
import { BenchmarkTimer, runBenchmarks, bench } from "./mod.ts";

// Simple
@@ -5,7 +5,7 @@ Basic benchmarking module. Provides flintstone millisecond resolution.
## Import

```ts
import * as benching from "https://deno.land/x/benching/mod.ts";
import * as benching from "https://deno.land/std/benching/mod.ts";
```

## Usage
@@ -15,7 +15,7 @@ import {
BenchmarkTimer,
runBenchmarks,
bench
} from "https://deno.land/x/benching/mod.ts";
} from "https://deno.land/std/benching/mod.ts";
// Simple
bench(function forIncrementX1e9(b: BenchmarkTimer) {
@@ -11,7 +11,7 @@ The main modules exports several functions which can color the output to the
console:

```ts
import { bgBlue, red, bold } from "https://deno.land/x/std/colors/mod.ts";
import { bgBlue, red, bold } from "https://deno.land/std/colors/mod.ts";
console.log(bgBlue(red(bold("Hello world!"))));
```
@@ -1,11 +1,11 @@
# Deno Example Programs

These files are accessible for import via "https://deno.land/x/examples/".
These files are accessible for import via "https://deno.land/std/examples/".

Try it:

```
> deno https://deno.land/x/examples/gist.ts README.md
> deno https://deno.land/std/examples/gist.ts README.md
```

## Alias Based Installation
@@ -14,5 +14,5 @@ Add this to your `.bash_profile`

```
export GIST_TOKEN=ABC # Generate at https://github.com/settings/tokens
alias gist="deno https://deno.land/x/examples/gist.ts --allow-net --allow-env"
alias gist="deno https://deno.land/std/examples/gist.ts --allow-net --allow-env"
```
@@ -2,7 +2,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.

const { args, env, exit, readFile } = Deno;
import { parse } from "https://deno.land/x/flags/mod.ts";
import { parse } from "https://deno.land/std/flags/mod.ts";

function pathBase(p: string): string {
const parts = p.split("/");
@@ -1,10 +1,10 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { serve } from "https://deno.land/x/http/mod.ts";
import { serve } from "https://deno.land/std/http/mod.ts";
import {
acceptWebSocket,
isWebSocketCloseEvent,
isWebSocketPingEvent
} from "https://deno.land/x/ws/mod.ts";
} from "https://deno.land/std/ws/mod.ts";

async function main(): Promise<void> {
console.log("websocket server is running on 0.0.0.0:8080");
@@ -6,7 +6,7 @@ Command line arguments parser for Deno based on minimist

```ts
const { args } = Deno;
import { parse } from "https://deno.land/x/flags/mod.ts";
import { parse } from "https://deno.land/std/flags/mod.ts";
console.dir(parse(args));
```
@@ -3,5 +3,5 @@
Usage:

```ts
import * as path from "https://deno.land/x/fs/path.ts";
import * as path from "https://deno.land/std/fs/path.ts";
```
@@ -5,7 +5,7 @@ A framework for creating HTTP/HTTPS server.
## Example

```typescript
import { serve } from "https://deno.land/x/http/server.ts";
import { serve } from "https://deno.land/std/http/server.ts";
const s = serve("0.0.0.0:8000");
async function main() {
@@ -24,5 +24,5 @@ A small program for serving local files over HTTP.
Add the following to your `.bash_profile`

```
alias file_server="deno https://deno.land/x/http/file_server.ts --allow-net"
alias file_server="deno https://deno.land/std/http/file_server.ts --allow-net"
```
@@ -3,7 +3,7 @@
## Usage

```ts
import * as log from "https://deno.land/x/std/log/mod.ts";
import * as log from "https://deno.land/std/log/mod.ts";
// simple default logger, you can customize it
// by overriding logger and handler named "default"
@@ -13,7 +13,7 @@ extension or the full path name. If the content type cannot be determined the
function returns `undefined`:

```ts
import { lookup } from "https://deno.land/x/std/media_types/mod.ts";
import { lookup } from "https://deno.land/std/media_types/mod.ts";
lookup("json"); // "application/json"
lookup(".md"); // "text/markdown"
@@ -29,8 +29,8 @@ content type first. A default charset is added if not present. The
function will return `undefined` if the content type cannot be resolved:

```ts
import { contentType } from "https://deno.land/x/std/media_types/mod.ts";
import * as path from "https://deno.land/x/std/path/mod.ts";
import { contentType } from "https://deno.land/std/media_types/mod.ts";
import * as path from "https://deno.land/std/path/mod.ts";
contentType("markdown"); // "text/markdown; charset=utf-8"
contentType("file.json"); // "application/json; charset=utf-8"
@@ -46,7 +46,7 @@ Return a default extension for a given content type. If there is not an
appropriate extension, `undefined` is returned:

```ts
import { extension } from "https://deno.land/x/std/media_types/mod.ts";
import { extension } from "https://deno.land/std/media_types/mod.ts";
extension("application/octet-stream"); // "bin"
```
@@ -57,7 +57,7 @@ Lookup the implied default charset for a given content type. If the content
type cannot be resolved, `undefined` is returned:

```ts
import { charset } from "https://deno.land/x/std/media_types/mod.ts";
import { charset } from "https://deno.land/std/media_types/mod.ts";
charset("text/markdown"); // "UTF-8"
```
@@ -67,7 +67,7 @@ charset("text/markdown"); // "UTF-8"
A `Map` of extensions by content type, in priority order:

```ts
import { extensions } from "https://deno.land/x/std/media_types/mod.ts";
import { extensions } from "https://deno.land/std/media_types/mod.ts";
extensions.get("application/javascript"); // [ "js", "mjs" ]
```
@@ -77,7 +77,7 @@ extensions.get("application/javascript"); // [ "js", "mjs" ]
A `Map` of content types by extension:

```ts
import { types } from "https://deno.land/x/std/media_types/mod.ts";
import { types } from "https://deno.land/std/media_types/mod.ts";
types.get("ts"); // "application/javascript"
```
@@ -7,19 +7,19 @@ Prettier APIs and tools for deno
To formats the source files, run:

```console
deno --allow-run --allow-write https://deno.land/x/std/prettier/main.ts
deno --allow-run --allow-write https://deno.land/std/prettier/main.ts
```

You can format only specific files by passing the arguments.

```console
deno --allow-run --allow-write https://deno.land/x/std/prettier/main.ts path/to/script.ts
deno --allow-run --allow-write https://deno.land/std/prettier/main.ts path/to/script.ts
```

You can format files on specific directory by passing the directory's path.

```console
deno --allow-run --allow-write https://deno.land/x/std/prettier/main.ts path/to/script.ts
deno --allow-run --allow-write https://deno.land/std/prettier/main.ts path/to/script.ts
```

## Use API
@@ -30,7 +30,7 @@ You can use APIs of prettier as the following:
import {
prettier,
prettierPlugins
} from "https://deno.land/x/std/prettier/prettier.ts";
} from "https://deno.land/std/prettier/prettier.ts";
prettier.format("const x = 1", {
parser: "babel",
@@ -47,7 +47,7 @@ import {
test,
assert,
equal
} from "https://deno.land/x/testing/mod.ts";
} from "https://deno.land/std/testing/mod.ts";
test({
name: "testing example",

0 comments on commit 0fc13ff

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.