2.0.6 • Published 6 years ago

lightdm-webkit2-typescript v2.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Typescript definitions for lightdm-webkit2

npm.io

This package delivers typescript definitions for lightdm-webkit2's javascript API. The intention is to make developing themes for lightdm-webkit2 a breeze with included type specifications and helpers with linting. This package does not include any other definitions than those given by the lightdm-webkit2 library, hence if you want jquery (@types/jquery), moment.js(@types/moment) or Cookie(@types/js-cookie), you have to include those type-definitions yourself.

Installation

Use npm install --save-dev lightdm-webkit2-typescript to install this definition as a dev dependency, and then define a tsconfig.json according to Typescriptlang.org.

One example for a tsconfig.json that will work well for lightdm-webkit2 developing is:

{
  "compilerOptions": {
    "target": "ES5",
    "lib": [
      "DOM",
      "ES2015",
      "ES2016",
      "ES2017",
      "ES2015.Iterable"
    ],
    "typeRoots": [
      "./node_modules/@types",
      "./node_modules/lightdm-webkit2-typescript"
    ],
    "outFile": "./greeter.js"
  },
  "include": [
    "./**/*.ts"
  ],
  "exclude": [
    "node_modules",
    "**/*.spec.ts"
  ]
}

In the config above the important part to notice is typeRoots, which has to be defined with the path to this node module.

  • typeRoots defines the files that will compiled as .d.ts-library files.
  • outFile defines the file that will be the result of the typescript-compilation.
  • include defines the files that will be compiled to the results (currently a glob which specifies all .ts files in project directory)

See tsconfig.json documentation here

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago