Skip to content

Commit

Permalink
remove unused files and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Aug 11, 2017
1 parent 31736c5 commit 920f463
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 126 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,4 +1,4 @@
Copyright (c) 2017 <Your name here>
copyright (c) 2017 chee

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
28 changes: 25 additions & 3 deletions README.md
@@ -1,5 +1,27 @@
# camel-case-mode package
# camelCaseMode

A short description of your package.
press a key to enable *__camelCaseMode__*, which capitalises the letter pressed
after `space`. so like:

![A screenshot of your package](https://f.cloud.github.com/assets/69169/2290250/c35d867a-a017-11e3-86be-cd7c5bf3ff9b.gif)
please<kbd>space</kbd>help<kbd>space</kbd>me<kbd>space</kbd>mrs<kbd>space</kbd>jones comes out like `pleaseHelpMeMrsJones`

you can press space again to get out of *__camelCaseMode__*

can enable some kind of indication for yoself that you in camelCaseMode by way of

```less
// styles.less
.camel-case-mode {
border: 1px solid #ff2a50;
}
```

(`.camel-case-mode` is set on `atom-text-editor`)

## TODO

* write tests
* deactivate on <kbd>C-c</kbd>, <kbd>C-g</kbd>, <kbd>Esc</kbd>
* apologise to everybody for everything i've ever done
* meet a princess and live in a castle
* or a prince
29 changes: 0 additions & 29 deletions lib/camel-case-mode-view.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/camel-case-mode.js
Expand Up @@ -4,7 +4,6 @@ import {CompositeDisposable} from 'atom'
import {MODE_CLASS} from '../constants'

export default {
camelCaseModeView: null,
modalPanel: null,
subscriptions: null,
isEnabled: false,
Expand Down
4 changes: 2 additions & 2 deletions menus/camel-case-mode.json
Expand Up @@ -2,7 +2,7 @@
"context-menu": {
"atom-text-editor": [
{
"label": "Toggle camel-case-mode",
"label": "Toggle camelCaseMode",
"command": "camel-case-mode:toggle"
}
]
Expand All @@ -12,7 +12,7 @@
"label": "Packages",
"submenu": [
{
"label": "camel-case-mode",
"label": "camelCaseMode",
"submenu": [
{
"label": "Toggle",
Expand Down
10 changes: 4 additions & 6 deletions package.json
Expand Up @@ -2,17 +2,15 @@
"name": "camel-case-mode",
"main": "./lib/camel-case-mode",
"version": "0.0.0",
"description": "A short description of your package",
"keywords": [
],
"description": "type camel case words with space bar like normal word person",
"keywords": [],
"activationCommands": {
"atom-workspace": "camel-case-mode:toggle"
},
"repository": "https://github.com/atom/camel-case-mode",
"repository": "https://github.com/chee/camel-case-mode",
"license": "MIT",
"engines": {
"atom": ">=1.0.0 <2.0.0"
},
"dependencies": {
}
"dependencies": {}
}
72 changes: 1 addition & 71 deletions spec/camel-case-mode-spec.js
@@ -1,73 +1,3 @@
'use babel'

import CamelCaseMode from '../lib/camel-case-mode'

// Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
//
// To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
// or `fdescribe`). Remove the `f` to unfocus the block.

describe('CamelCaseMode', () => {
let workspaceElement, activationPromise

beforeEach(() => {
workspaceElement = atom.views.getView(atom.workspace)
activationPromise = atom.packages.activatePackage('camel-case-mode')
})

describe('when the camel-case-mode:toggle event is triggered', () => {
it('hides and shows the modal panel', () => {
// Before the activation event the view is not on the DOM, and no panel
// has been created
expect(workspaceElement.querySelector('.camel-case-mode')).not.toExist()

// This is an activation event, triggering it will cause the package to be
// activated.
atom.commands.dispatch(workspaceElement, 'camel-case-mode:toggle')

waitsForPromise(() => {
return activationPromise
})

runs(() => {
expect(workspaceElement.querySelector('.camel-case-mode')).toExist()

let camelCaseModeElement = workspaceElement.querySelector('.camel-case-mode')
expect(camelCaseModeElement).toExist()

let camelCaseModePanel = atom.workspace.panelForItem(camelCaseModeElement)
expect(camelCaseModePanel.isVisible()).toBe(true)
atom.commands.dispatch(workspaceElement, 'camel-case-mode:toggle')
expect(camelCaseModePanel.isVisible()).toBe(false)
})
})

it('hides and shows the view', () => {
// This test shows you an integration test testing at the view level.

// Attaching the workspaceElement to the DOM is required to allow the
// `toBeVisible()` matchers to work. Anything testing visibility or focus
// requires that the workspaceElement is on the DOM. Tests that attach the
// workspaceElement to the DOM are generally slower than those off DOM.
jasmine.attachToDOM(workspaceElement)

expect(workspaceElement.querySelector('.camel-case-mode')).not.toExist()

// This is an activation event, triggering it causes the package to be
// activated.
atom.commands.dispatch(workspaceElement, 'camel-case-mode:toggle')

waitsForPromise(() => {
return activationPromise
})

runs(() => {
// Now we can test for view visibility
let camelCaseModeElement = workspaceElement.querySelector('.camel-case-mode')
expect(camelCaseModeElement).toBeVisible()
atom.commands.dispatch(workspaceElement, 'camel-case-mode:toggle')
expect(camelCaseModeElement).not.toBeVisible()
})
})
})
})
// TODO
9 changes: 0 additions & 9 deletions spec/camel-case-mode-view-spec.js

This file was deleted.

2 changes: 1 addition & 1 deletion styles/camel-case-mode.less
Expand Up @@ -5,5 +5,5 @@
@import "ui-variables";

.camel-case-mode {
border: 1px solid @text-color;
// border: 1px solid #ff2a50;
}

0 comments on commit 920f463

Please sign in to comment.