Set up project skeleton for flipper-pkg
Summary: TypeScript cli tool basics. Reviewed By: jknoxville, nikoant Differential Revision: D19856513 fbshipit-source-id: da148d1435c09221f74dc94285b655bed53d0494
This commit is contained in:
committed by
Facebook Github Bot
parent
00bfa39992
commit
6f15e29b99
2
pkg/.gitignore
vendored
Normal file
2
pkg/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/lib
|
||||||
|
/node_modules/
|
||||||
7
pkg/jestconfig.json
Normal file
7
pkg/jestconfig.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"transform": {
|
||||||
|
"^.+\\.(t|j)sx?$": "ts-jest"
|
||||||
|
},
|
||||||
|
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||||
|
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
|
||||||
|
}
|
||||||
44
pkg/package.json
Normal file
44
pkg/package.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"name": "flipper-pkg",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "Utility for building and publishing Flipper plugins",
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"types": "lib/index.d.ts",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jest": "^24.0.21",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^2.8.0",
|
||||||
|
"eslint": "^6.6.0",
|
||||||
|
"eslint-plugin-babel": "^5.3.0",
|
||||||
|
"eslint-plugin-flowtype": "^4.5.2",
|
||||||
|
"eslint-plugin-header": "^3.0.0",
|
||||||
|
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||||
|
"eslint-plugin-prettier": "^3.1.1",
|
||||||
|
"eslint-plugin-react": "^7.16.0",
|
||||||
|
"jest": "^24.9.0",
|
||||||
|
"prettier": "^1.19.1",
|
||||||
|
"ts-jest": "^24.1.0",
|
||||||
|
"tslint-config-prettier": "^1.18.0",
|
||||||
|
"typescript": "^3.7.2"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"prepare": "yarn run build",
|
||||||
|
"prepublishOnly": "yarn test && yarn run lint",
|
||||||
|
"preversion": "yarn run lint",
|
||||||
|
"test": "jest --config jestconfig.json --passWithNoTests",
|
||||||
|
"lint": "eslint -c ../../sonar/.eslintrc.js src/**/* --ext .js,.ts && tsc --noemit",
|
||||||
|
"fix": "eslint -c ../../sonar/.eslintrc.js src/**/* --fix --ext .js,.ts",
|
||||||
|
"run": "yarn run build && node lib/index.js"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib/**/*"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"Flipper"
|
||||||
|
],
|
||||||
|
"author": "Facebook, Inc",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "^12.12.12"
|
||||||
|
}
|
||||||
|
}
|
||||||
12
pkg/src/index.ts
Normal file
12
pkg/src/index.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
console.log('Hello, flipper-pkg.');
|
||||||
|
})();
|
||||||
12
pkg/tsconfig.json
Normal file
12
pkg/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": ["es7", "dom", "es2017"],
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"declaration": true,
|
||||||
|
"outDir": "./lib",
|
||||||
|
"strict": true
|
||||||
|
},
|
||||||
|
"include": ["src"],
|
||||||
|
"exclude": ["node_modules", "**/__tests__/*"]
|
||||||
|
}
|
||||||
3
pkg/tslint.json
Normal file
3
pkg/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": ["tslint:recommended", "tslint-config-prettier"]
|
||||||
|
}
|
||||||
3981
pkg/yarn.lock
Normal file
3981
pkg/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user