Skip to content

Commit

Permalink
Convert to atom-transpile plugin
Browse files Browse the repository at this point in the history
Reap the benefits of [atom-transpile]:
* Standardised ways of transpiling in Atom
* Contextually relevant menu items
* Less cluttered menus
* Easy plugin maintenance

[atom-transpile]: https://atom.io/packages/transpile
  • Loading branch information
danielbayley committed Jul 10, 2016
1 parent 76a2b6d commit 80a9b09
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 230 deletions.
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# js2coffee package for Atom
# Atom _[js2coffee]_

[![apm](https://img.shields.io/apm/v/js2coffee.svg)](https://atom.io/packages/js2coffee)
[![apm](https://img.shields.io/apm/dm/js2coffee.svg)](https://atom.io/packages/js2coffee)
[![Travis](https://img.shields.io/travis/jdcrensh/atom-js2coffee.svg)](https://travis-ci.org/jdcrensh/atom-js2coffee)
[![CircleCI](https://img.shields.io/circleci/project/jdcrensh/atom-js2coffee.svg)](https://circleci.com/gh/jdcrensh/atom-js2coffee)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/9klcrhye8alqfogt?svg=true)](https://ci.appveyor.com/project/jdcrensh/atom-js2coffee)
[![apm]](https://atom.io/packages/transpile-js2coffee)
[![downloads]](https://atom.io/packages/transpile-js2coffee)

Transpile JavaScript to [CoffeeScript] in [Atom] with _[js2coffee]_.

Atom.io wrapper around [js2coffee](https://github.com/js2coffee/js2coffee)

![js2coffee gif](https://raw.github.com/jdcrensh/atom-js2coffee/master/js2coffee.gif)

## Features

* Allows you to use js2coffee on whole files or selected text
* Uses tab length from your Atom preferences
* Reports js2coffee errors using Atom's js console
[Another] plugin for _[atom-transpile]_.

## Installation

Install 'js2coffee' via Atom's settings UI, or run `apm install js2coffee`
`apm install transpile-js2coffee` or search “js2coffee” under Packages within Atom.

## License

## Contributing
[MIT] © [Jon Crenshaw] et [al]

Pull requests are very much welcome. Fork, make your commit, and open a pull request.
[MIT]: LICENSE.md
[Jon Crenshaw]: https://github.com/jdcrensh
[al]: https://github.com/jdcrensh/atom-transpile-js2coffee/graphs/contributors
[atom]: https://atom.io
[apm]: https://img.shields.io/apm/v/transpile-js2coffee.svg?style=flat-square
[downloads]: https://img.shields.io/apm/dm/transpile-js2coffee.svg?style=flat-square

The PR should pass all builds before it can be merged, including linter [rules](./coffeelint.json).
[atom-transpile]: https://atom.io/packages/transpile
[Another]: https://atom.io/packages/search?q=transpile-
[CoffeeScript]: http://coffeescript.org
[js2coffee]: http://js2.coffee
27 changes: 0 additions & 27 deletions appveyor.yml

This file was deleted.

10 changes: 0 additions & 10 deletions circle.yml

This file was deleted.

14 changes: 14 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports =
package: require './package.json'
activate: ->
name: @package.name
from:
scopeName: 'source.js'
#fileTypes: ['[data-name*=".js"]:not([data-name*=json])']
to: scopeName: 'source.coffee'

transpile: (source) ->
{allowUnsafeEval} = require 'loophole'
{build} = allowUnsafeEval -> require 'js2coffee'
{code} = build source
return code
Binary file removed js2coffee.gif
Binary file not shown.
11 changes: 0 additions & 11 deletions keymaps/js2coffee.cson

This file was deleted.

64 changes: 0 additions & 64 deletions lib/js2coffee.coffee

This file was deleted.

36 changes: 0 additions & 36 deletions lib/range-finder.coffee

This file was deleted.

17 changes: 0 additions & 17 deletions menus/js2coffee.cson

This file was deleted.

30 changes: 19 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"name": "js2coffee",
"main": "./lib/js2coffee",
"name": "transpile-js2coffee",
"version": "0.19.1",
"private": true,
"description": "Convert selected lines or an entire file into coffeescript.",
"repository": "https://github.com/jdcrensh/atom-js2coffee",
"description": "JavaScript to CoffeeScript provider for atom-transpile.",
"repository": "https://github.com/jdcrensh/atom-transpile-js2coffee",
"license": "MIT",
"author": "Chandler Abraham <[email protected]>",
"contributors": [
"Jon Crenshaw <[email protected]>"
"Jon Crenshaw <[email protected]>",
"Daniel Bayley <[email protected]> (https://github.com/danielbayley)"
],
"engines": {
"atom": "*"
"devDependencies": {
"coffeelint": "^1.15.7"
},
"dependencies": {
"atom-message-panel": "~1.2.4",
"js2coffee": "~2.2.0",
"loophole": "~1.0.0"
},
"devDependencies": {
"coffeelint": "^1.15.7",
"temp": "~0.8.1"
"scripts": {
"preinstall": "apm install transpile"
},
"engines": {
"atom": "*"
},
"providedServices": {
"transpile": {
"versions": {
"1.0.0": "activate"
}
}
}
}

0 comments on commit 80a9b09

Please sign in to comment.