Set up separate cli tool

Summary:
Discussed that we want this to be both a library and a CLI
tool. Also added a README stub.

Reviewed By: nikoant

Differential Revision: D19969788

fbshipit-source-id: 2c54935ce5953d2053c7bdf601debe0e5e911647
This commit is contained in:
Pascal Hartig
2020-02-21 03:40:16 -08:00
committed by Facebook Github Bot
parent eaf253e60f
commit 05a1c70bc7
5 changed files with 46 additions and 5 deletions

21
pkg/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Facebook, Inc. and its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

8
pkg/README.md Normal file
View File

@@ -0,0 +1,8 @@
# flipper-pkg
`flipper-pkg` is a **work-in-progress** tool for bundling and publishing
Flipper plugins.
## License
[MIT](LICENSE)

View File

@@ -29,7 +29,7 @@
"test": "jest --config jestconfig.json --passWithNoTests", "test": "jest --config jestconfig.json --passWithNoTests",
"lint": "eslint -c ../../sonar/.eslintrc.js src/**/* --ext .js,.ts && tsc --noemit", "lint": "eslint -c ../../sonar/.eslintrc.js src/**/* --ext .js,.ts && tsc --noemit",
"fix": "eslint -c ../../sonar/.eslintrc.js src/**/* --fix --ext .js,.ts", "fix": "eslint -c ../../sonar/.eslintrc.js src/**/* --fix --ext .js,.ts",
"run": "yarn run build && node lib/index.js" "run": "yarn run build && node lib/cli.js"
}, },
"files": [ "files": [
"lib/**/*" "lib/**/*"
@@ -41,4 +41,4 @@
"dependencies": { "dependencies": {
"@types/node": "^12.12.12" "@types/node": "^12.12.12"
} }
} }

14
pkg/src/cli.ts Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {PKG} from '.';
(async () => {
console.log(`Hello, ${PKG}.`);
})();

View File

@@ -7,6 +7,4 @@
* @format * @format
*/ */
(async () => { export const PKG = 'flipper-pkg';
console.log('Hello, flipper-pkg.');
})();