Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdothtml committed Dec 26, 2018
0 parents commit 0306c23
Show file tree
Hide file tree
Showing 12 changed files with 508 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_style = tab
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
yarn rollup -c
yarn terser --compress -- dist/index.js -o dist/index.js -b "beautify=false,preamble='//@ts-ignore'"

tests:
deno index.test.js
2 changes: 2 additions & 0 deletions dist/index.js

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

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './dist/index.js'
9 changes: 9 additions & 0 deletions index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { test, assertEqual } from 'https://deno.land/x/testing/testing.ts'
import minimatch from './index.js'

test({
name: 'minimatch',
fn () {
assertEqual(minimatch('bar.foo', '*.foo'), true)
}
})
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"engines": {
"node": ">=11",
"yarn": ">=1.12"
},
"devDependencies": {
"minimatch": "^3.0.4",
"rollup": "^0.68.1",
"rollup-plugin-alias": "^1.5.1",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"terser": "^3.13.1"
}
}
24 changes: 24 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# deno-minimatch

> A [deno](https://github.com/denoland/deno) port of [minimatch](https://github.com/isaacs/minimatch)
# Use

See [minimatch docs](https://github.com/isaacs/minimatch#usage) for full usage info

```js
import minimatch from 'https://raw.githubusercontent.com/chrisdothtml/deno-minimatch/master/index.js'

minimatch('bar.foo', '*.foo')
//> true
```

# Contributing

```sh
# build dist file
make build

# run tests
make tests
```
25 changes: 25 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import alias from 'rollup-plugin-alias'
import cjs from 'rollup-plugin-commonjs'
import path from 'path'
import resolve from 'rollup-plugin-node-resolve'

export default {
input: 'src/index.js',
output: {
dir: 'dist',
file: 'index.js',
format: 'esm'
},
external: [
'https://deno.land/x/path/index.ts'
],
plugins: [
resolve({
preferBuiltins: false
}),
cjs(),
alias({
path: path.resolve(__dirname, 'src/path.js')
}),
]
}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'minimatch'
2 changes: 2 additions & 0 deletions src/path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import * as path from 'https://deno.land/x/path/index.ts'
export default path
Loading

0 comments on commit 0306c23

Please sign in to comment.