Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
👕 Markdown linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cakecatz committed Feb 16, 2016
1 parent 199cb19 commit 8df8275
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 21 deletions.
9 changes: 9 additions & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ignore third-party packages
node_modules

# Ignore third-party icon sets
iconsets

# Ignore Atom folder when running Travis
atom

6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ notifications:
env:
- APM_TEST_PACKAGES="tool-bar flex-tool-bar"

script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
script:
- 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
- './node_modules/.bin/remark .'

git:
depth: 10
depth: 10
55 changes: 36 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,50 @@

[![Build Status](https://travis-ci.org/cakecatz/flex-toolbar.svg)](https://travis-ci.org/cakecatz/flex-toolbar)

### Easily Customizable Toolbar for Atom
## About

This is a plugin for the [Atom Tool Bar](https://atom.io/packages/tool-bar) package.
This is a plugin for
the [Atom Tool Bar](https://atom.io/packages/tool-bar) package.

You can configure your toolbar buttons with a `CSON`, `JSON`, `JSON5` file to perform specific actions in Atom or to open web sites in your default browser.
You can configure your toolbar buttons with a `CSON`, `JSON`, `JSON5` file
to perform specific actions in Atom
or to open web sites in your default browser.

![screenshot](https://raw.githubusercontent.com/cakecatz/flex-toolbar/docs/screenshot_cson.png)

To edit your config file, type `Flex Tool Bar: Edit Config File` in the Atom command palette.
To edit your config file,
type `Flex Tool Bar: Edit Config File` in the Atom command palette.

### Configuration
## Configuration

**Flex Tool Bar** has three `type`s you can configure:
`button`, `url` and `spacer`.

- `button` creates default buttons for your toolbar.
- `button` creates default buttons for your toolbar.

You can use it to set actions like `application:new-file`.

- `url` creates buttons pointing to specific web pages.
- `url` creates buttons pointing to specific web pages.

Use this to open any web site, such as your GitHub notifications, in your default browser. See this feature in action in this [screencast](http://quick.as/b5vafe4g).
Use this to open any web site, such as your GitHub notifications,
in your default browser. See this feature in action in this [screencast](http://quick.as/b5vafe4g).

If you have the package [browser-plus](https://atom.io/packages/browser-plus) installed, you can use it to open your links. Just check the box in flex-toolbar's settings.
If you have the package [browser-plus](https://atom.io/packages/browser-plus)
installed, you can use it to open your links.
Just check the box in flex-toolbar's settings.

- `spacer` adds separators between toolbar buttons.
- `spacer` adds separators between toolbar buttons.

### Features

- multiple callback
- button style
- hide/disable a button in certain cases
- multiple callback
- button style
- hide/disable a button in certain cases

### Button style

Can use CSS Property.

```coffeescript
style: {
color: "red"
Expand All @@ -47,22 +55,26 @@ style: {
```

### Multiple callback

```coffeescript
callback: ["callback1", "callback2"]
```

### Hide(Show), Disable(Enable) button

You can hide or disable buttons when a certain grammar is used in the active file or a specified file is matched.
You can hide or disable buttons when a certain grammar is
used in the active file or a specified file is matched.

If you set `disable` (`show`, `hide` or `enable`) this way:

```coffeescript
disable: "coffee"
```

It will disable the button if a CoffeeScript file is open.

You can also look for a specific file using [globs](https://tr.im/glob):

```coffeescript
show: {
pattern: 'gulpfile.js'
Expand All @@ -72,13 +84,16 @@ show: {
}
```

The package uses [tree-match-sync](https://github.com/boredz/tree-match-sync) that depends on the `tree` command, [install it](https://github.com/boredz/tree-match-sync#installation) before using this feature.

The options are explained [here](https://github.com/isaacs/minimatch#options) and it has an extra field: `maxDepth`, it translates to `tree`'s option `-L`, you should always set it.

The package uses [tree-match-sync](https://github.com/boredz/tree-match-sync)
that depends on the `tree` command, [install it](https://github.com/boredz/tree-match-sync#installation)
before using this feature.

The options are explained [here](https://github.com/isaacs/minimatch#options)
and it has an extra field: `maxDepth`,
it translates to `tree`'s option `-L`, you should always set it.

Of course, you can set it as an array.

```coffeescript
disable: [
"json"
Expand All @@ -87,19 +102,21 @@ disable: [
```

You can use `!` :laughing:

```coffeescript
hide: "!Markdown"
```

This will hide button when opened any file except Markdown.

```coffeescript
show: "Markdown"
```

This is same above.

### Example

### Sample Code
```coffeescript
[
{
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@
"^0.1.0": "consumeToolBar"
}
}
},
"devDependencies": {
"remark": "^4.0.0",
"remark-lint": "^3.0.0"
}
}

0 comments on commit 8df8275

Please sign in to comment.