Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove coffee leftovers #38

Merged
merged 5 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ indent_size = 2
indent_style = space
indent_size = 2

[*.coffee]
indent_style = space
indent_size = 2

[*.md]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We are happy to accept any contributions that make sense and respect the rules l
* **Do** use feature branches.
* **Do** conform to existing coding style so that your contribution fits in.
* **Do** use [EditorConfig] to enforce our [whitespace rules](.editorconfig). If your editor is not supported, enforce the settings manually.
* **Do** run `npm test` for CoffeeLint, JSONLint and unit test coverage.
* **Do** run `npm test` for ESLint and unit test coverage.
* **Do not** touch the `version` field in [package.json](package.json).
* **Do not** commit any generated files, unless already in the repo. If absolutely necessary, explain why.
* **Do not** create any top level files or directories. If absolutely necessary, explain why and update [.npmignore](.npmignore).
Expand Down
82 changes: 0 additions & 82 deletions Gruntfile.coffee

This file was deleted.

5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# adbkit

_**Interested in helping to convert the CoffeeScript codebase to plain JavaScript? [Help us](https://github.com/openstf/adbkit/issues/48)!**_

**adbkit** is a pure [Node.js][nodejs] client for the [Android Debug Bridge][adb-site] server. It can be used either as a library in your own application, or simply as a convenient utility for playing with your device.

Most of the `adb` command line tool's functionality is supported (including pushing/pulling files, installing APKs and processing logs), with some added functionality such as being able to generate touch/key events and take screenshots. Some shims are provided for older devices, but we have not and will not test anything below Android 2.3.
Expand Down Expand Up @@ -29,8 +27,6 @@ npm install --save adbkit

We use [debug][node-debug], and our debug namespace is `adb`. Some of the dependencies may provide debug output of their own. To see the debug output, set the `DEBUG` environment variable. For example, run your program with `DEBUG=adb:* node app.js`.

Note that even though the module is written in [CoffeeScript][coffeescript], only the compiled JavaScript is published to [NPM][npm], which means that it can easily be used with pure JavaScript codebases, too.

### Examples

The examples may be a bit verbose, but that's because we're trying to keep them as close to real-life code as possible, with flow control and error handling taken care of.
Expand Down Expand Up @@ -1108,7 +1104,6 @@ See [LICENSE](LICENSE).
Copyright © The OpenSTF Project. All Rights Reserved.

[nodejs]: <http://nodejs.org/>
[coffeescript]: <http://coffeescript.org/>
[npm]: <https://npmjs.org/>
[adb-js]: <https://github.com/flier/adb.js>
[adb-site]: <http://developer.android.com/tools/help/adb.html>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"compile": "tsc -p .",
"lint": "eslint ./ --ext .ts",
"format": "eslint ./ --fix --ext .ts",
"test": "mocha --reporter spec --colors --recursive"
"test": "npm run lint && mocha --reporter spec --colors --recursive"
},
"dependencies": {
"@devicefarmer/adbkit-logcat": "^1.1.0",
Expand Down
16 changes: 8 additions & 8 deletions tasks/keycode.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ const req = https.request(original, function (res) {
let match;
const code = raw.toString();
const date = new Date().toUTCString();
const coffee = [];
coffee.push('// Generated by `npm run keycode` on ' + date);
coffee.push('// KeyEvent.java Copyright (C) 2006 The Android Open Source Project');
coffee.push('');
coffee.push('export = {');
const typescript = [];
typescript.push('// Generated by `npm run keycode` on ' + date);
typescript.push('// KeyEvent.java Copyright (C) 2006 The Android Open Source Project');
typescript.push('');
typescript.push('export = {');
while ((match = regex.exec(code))) {
coffee.push(`\t${match[1]}: ${match[2]},`);
typescript.push(`\t${match[1]}: ${match[2]},`);
}
coffee.push('};\n');
fs.writeFileSync(file, coffee.join('\n'));
typescript.push('};\n');
fs.writeFileSync(file, typescript.join('\n'));
console.log('File ' + file + ' created');
});
});
Expand Down
2 changes: 0 additions & 2 deletions test/adb/command/host-transport/uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ describe('UninstallCommand', function() {
cmd = new UninstallCommand(conn);
setImmediate(function() {
conn.socket.causeRead(Protocol.OKAY);
// coffeelint: disable=max_line_length
conn.socket.causeRead(`
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: foo
Expand All @@ -103,7 +102,6 @@ java.lang.IllegalArgumentException: Unknown package: foo
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3019)
at android.os.Binder.execTransact(Binder.java:565)`);
// coffeelint: enable=max_line_length
return conn.socket.causeEnd();
});
return cmd.execute('foo').then(function() {
Expand Down