1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 23:59:59 -05:00

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

Original: 0fc13fffbd
This commit is contained in:
Andy Hayden 2019-03-06 07:24:53 -08:00 committed by Ryan Dahl
parent c6075f373e
commit d29957ad17
13 changed files with 27 additions and 27 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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!"))));
```

View file

@ -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"
```

View file

@ -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("/");

View file

@ -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");

View file

@ -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));
```

View file

@ -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";
```

View file

@ -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"
```

View file

@ -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"

View file

@ -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"
```

View file

@ -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",

View file

@ -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",