Skip to content

Commit

Permalink
feat: convert to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 6, 2021
1 parent b3b336c commit e334fc6
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atom-ide-signature-help",
"main": "./lib/main.js",
"main": "./dist/main.js",
"version": "0.14.1",
"description": "A replacement of the SignatureHelp functionality from the original Atom-IDE / Nuclide package developed by Facebook.",
"keywords": [
Expand All @@ -15,6 +15,9 @@
},
"scripts": {
"format": "prettier --write .",
"clean": "shx rm -rf dist",
"dev": "npm run clean && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=true rollup -c -w",
"build": "npm run clean && cross-env NODE_ENV=production cross-env BABEL_KEEP_MODULES=true rollup -c",
"bump": "ncu -u"
},
"package-deps": [
Expand All @@ -30,6 +33,11 @@
"@types/node": "^14.14.22",
"prettier": "^2.2.1",
"npm-check-updates": "^11.1.1",
"rollup": "^2.38.5",
"rollup-plugin-atomic": "^2.0.1",
"shx": "^0.3.3",
"tslib": "^2.1.0",
"typescript": "^4.1.3",
"build-commit": "^0.1.4"
},
"activationHooks": [
Expand Down
19 changes: 19 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { createPlugins } from "rollup-plugin-atomic"

const plugins = createPlugins([["ts", { tsconfig: "./lib/tsconfig.json" }, true], "js", "json"])

export default [
{
input: "lib/main.ts",
output: [
{
dir: "dist",
format: "cjs",
sourcemap: true,
},
],
// loaded externally
external: ["atom"],
plugins: plugins,
},
]
32 changes: 32 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"compilerOptions": {
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noFallthroughCasesInSwitch": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"incremental": true,
"inlineSourceMap": true,
"inlineSources": true,
"preserveSymlinks": true,
"removeComments": true,
"jsx": "react",
"jsxFactory": "etch.dom",
"lib": ["ES2018", "dom"],
"target": "ES2018",
"allowJs": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"module": "commonjs",
"moduleResolution": "node",
"importHelpers": false,
"outDir": "../dist"
},
"compileOnSave": false
}

0 comments on commit e334fc6

Please sign in to comment.