Skip to content

Commit

Permalink
Replace standard with personal config
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdothtml committed Jun 18, 2019
1 parent d01d3fd commit 5c24d5a
Show file tree
Hide file tree
Showing 6 changed files with 504 additions and 544 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": "@chrisdothtml"
}
11 changes: 5 additions & 6 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ import minimatch from './index.js'

test({
name: 'minimatch',
fn () {
fn() {
const mmInstance = new minimatch.Minimatch('*.js')

assertEquals(minimatch('bar.foo', '*.foo'), true)
assertEquals(minimatch('bar.foo', '*.+(bar|foo)'), true)
assertEquals(minimatch('bar.foo', '*.bar'), false)
assertEquals(
['foo.js', 'foo.txt'].filter(minimatch.filter('*.js')),
['foo.js']
)
assertEquals(['foo.js', 'foo.txt'].filter(minimatch.filter('*.js')), [
'foo.js',
])
assertEquals(mmInstance.match('foo.js'), true)
assertEquals(mmInstance.makeRe() instanceof RegExp, true)
}
},
})

runTests()
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
},
"scripts": {
"build": "rollup -c",
"lint": "standard --verbose | snazzy",
"lint": "eslint .",
"pretest": "yarn build",
"test": "yarn lint && deno run index.test.js"
},
"standard": {
"ignore": [
"index.js"
]
},
"eslintIgnore": [
"index.js"
],
"devDependencies": {
"@chrisdothtml/eslint-config": "^0.1.6",
"eslint": "^5.16.0",
"minimatch": "^3.0.4",
"rollup": "^1.0.0",
"rollup-plugin-alias": "^1.5.1",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"snazzy": "^8.0.0",
"standard": "^12.0.1"
"rollup-plugin-node-resolve": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# deno-minimatch

[![StandardJS code style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![chrisdothtml code style](https://img.shields.io/badge/code_style-chrisdothtml-brightgreen.svg)](https://github.com/chrisdothtml/eslint-config)
[![travis-ci build status](https://api.travis-ci.org/chrisdothtml/deno-minimatch.svg?branch=master)](https://travis-ci.org/chrisdothtml/deno-minimatch)

> A [deno](https://github.com/denoland/deno) port of [minimatch](https://github.com/isaacs/minimatch)
Expand Down
16 changes: 7 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import path from 'path'
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: {
file: 'index.js',
format: 'esm'
format: 'esm',
},
external: [
'https://deno.land/x/fs/path/mod.ts'
],
external: ['https://deno.land/x/fs/path/mod.ts'],
plugins: [
resolve({
preferBuiltins: false
preferBuiltins: false,
}),
cjs(),
alias({
path: path.resolve(__dirname, 'src/path.js')
})
]
path: path.resolve(__dirname, 'src/path.js'),
}),
],
}
Loading

0 comments on commit 5c24d5a

Please sign in to comment.