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

Commit

Permalink
request sender #2 -- Add http sender package boilerplate
Browse files Browse the repository at this point in the history
Summary: boilerplate for http sender package

Reviewed By: jgebhardt

Differential Revision: D3807371

fbshipit-source-id: aab89cf5cd43a8abf4267572a724d9f34216a672
  • Loading branch information
johnislarry authored and Facebook Github Bot 8 committed Sep 23, 2016
1 parent f36f9bf commit 610f043
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkg/nuclide-http-request-sender/lib/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
'use babel';
/* @flow */

/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/

import xfetch from '../../commons-node/xfetch';
import {CompositeDisposable} from 'atom';
import createPackage from '../../commons-atom/createPackage';

class Activation {
_disposables: CompositeDisposable;

constructor(): void {
this._disposables = new CompositeDisposable(
atom.commands.add('atom-workspace', {
'nuclide-http-request-sender:send-http-request': () => {
xfetch('facebook.com', {});
},
}),
);
}

dispose(): void {
this._disposables.dispose();
}
}

export default createPackage(Activation);
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"menu": [
{
"label": "Nuclide",
"submenu": [
{
"label": "HTTP Request Sender",
"submenu": [
{
"label": "Send HTTP Request",
"command": "nuclide-http-request-sender:send-http-request"
}
]
}
]
}
]
}
13 changes: 13 additions & 0 deletions pkg/nuclide-http-request-sender/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "nuclide-http-request-sender",
"repository": "https://github.com/facebook/nuclide",
"main": "./lib/main.js",
"version": "0.0.0",
"description": "Send HTTP requests from Nuclide.",
"atomTestRunner": "../../lib/test-runner.js",
"nuclide": {
"packageType": "Atom",
"testRunner": "apm"
},
"activationCommands": {}
}

0 comments on commit 610f043

Please sign in to comment.