Skip to content

Commit

Permalink
Replace deno.land/x/ with deno.land/std/ (denoland#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
hayd authored and ry committed Mar 6, 2019
1 parent d430a24 commit 0fc13ff
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion benching/example.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions benching/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion colors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!"))));
```
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 changes: 1 addition & 1 deletion examples/gist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("/");
Expand Down
4 changes: 2 additions & 2 deletions examples/ws.ts
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
2 changes: 1 addition & 1 deletion flags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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));
```
Expand Down
2 changes: 1 addition & 1 deletion fs/path/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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";
```
4 changes: 2 additions & 2 deletions http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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"
```
2 changes: 1 addition & 1 deletion log/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions media_types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
```
Expand All @@ -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"
```
Expand All @@ -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" ]
```
Expand All @@ -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"
```
Expand Down
8 changes: 4 additions & 4 deletions prettier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0fc13ff

Please sign in to comment.