Skip to content

Commit

Permalink
Tweak Path
Browse files Browse the repository at this point in the history
Remove the `/` sugar for now. Because the idiom differs sometime (some
folks prefer // for example). Providing this out of the box would be a
bit too opinionated. Folks can easily alias if they want anyway.
  • Loading branch information
chenglou committed Jan 23, 2020
1 parent 0f0bd0b commit dcf69fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
24 changes: 3 additions & 21 deletions src/Path.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions src/Path.re
Expand Up @@ -26,8 +26,6 @@ external join: array(string) => string = "join";

[@bs.module "path"] external join2: (string, string) => string = "join";

let (/) = join2;

[@bs.module "path"] external normalize: string => string = "normalize";

[@bs.module "path"] external parse: string => t = "parse";
Expand Down Expand Up @@ -71,8 +69,6 @@ module Posix = {
[@bs.module "path"] [@bs.scope "posix"]
external join2: (string, string) => string = "join";

let (/) = join2;

[@bs.module "path"] [@bs.scope "posix"]
external normalize: string => string = "normalize";

Expand Down Expand Up @@ -119,8 +115,6 @@ module Win32 = {
[@bs.module "path"] [@bs.scope "win32"]
external join2: (string, string) => string = "join";

let (/) = join2;

[@bs.module "path"] [@bs.scope "win32"]
external normalize: string => string = "normalize";

Expand Down
9 changes: 9 additions & 0 deletions tests/PathTest.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/PathTest.re
@@ -0,0 +1 @@
Assert.equal(Path.Posix.basename("/tmp/myfile.html"), "myfile.html")

0 comments on commit dcf69fb

Please sign in to comment.