Skip to content

Commit

Permalink
Update project tools
Browse files Browse the repository at this point in the history
- Update to `tubo-gulp`: add support for typed lint rules,
  continuous deployment and simpler configuration.
- Update dependencies
- Update Typescript

Closes #54
  • Loading branch information
demurgos committed Nov 12, 2017
1 parent 21397fa commit 927688d
Show file tree
Hide file tree
Showing 63 changed files with 7,676 additions and 3,530 deletions.
14 changes: 7 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
# This does break VS it causes BOM to be added to files:
# https://developercommunity.visualstudio.com/content/problem/21744/vs2017-rc-breaks-the-encoding-of-my-files.html
# charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_brace_style = K&R
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = true
max_line_length = 100
35 changes: 0 additions & 35 deletions .npmignore

This file was deleted.

10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
language: node_js

notifications:
email:
on_success: never
on_failure: change

node_js:
- stable

before_install:
- npm install -g typings gulp-cli npm typedoc
before_script:
- npm run prepare
- npm install -g gulp-cli

script:
- npm test
- ./travis-ci/deploy-gh-pages.sh
- if [[ -n "${NPM_TOKEN}" ]]; then echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && ./tools/continuous-deployment.travis.sh; fi
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Next

- **[Internal]** Update project tools to [turbo-gulp](https://www.npmjs.com/package/turbo-gulp)

# 0.0.13 (2017-07-16)

- **[Breaking]** Allow `Contact.name.first` and `Contact.surname.first` to be null. This matches the Skype
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm](https://img.shields.io/npm/v/skype-http.svg?maxAge=2592000)](https://www.npmjs.com/package/skype-http)
[![Build status](https://img.shields.io/travis/ocilo/skype-http/master.svg?maxAge=2592000)](https://travis-ci.org/ocilo/skype-http)
[![GitHub repository](https://img.shields.io/badge/Github-ocilo%2Fskype--http-blue.svg)](https://github.com/ocilo/skype-http)

Unofficial Skype API for Node.js via HTTP.
This relies on the Skype Web Application and requires the credentials of the account you want to use: use it with care.
Expand Down Expand Up @@ -49,9 +50,9 @@ set the status to `"Online"` and start to respond to messages.
Here are the main commands available for the project.
The project requires `gulp-cli` and `npm` 4.
The project has three targets:
- `lib-es2015`: Build the core library. This is what is published to npm.
- `lib`: Build the core library. This is what is published to npm.
- Sources: `src/lib`
- `lib-test`: Build the library with the _mocha_ unit-tests.
- `test`: Build the library with the _mocha_ unit-tests.
- Sources: `src/lib` and `src/test`
- `example`: Build the example command-line application.
- Sources: `src/lib` and `src/example`
Expand All @@ -66,12 +67,11 @@ the configuration.

**Note**: This command is executed automatically as part of `npm install`.

### `gulp <target>:build`
### `gulp lib:build`

Build the specified target. Example: `gulp lib-es2015:build`.
The output directory is `build/<target>` (example: `build/lib-es2015`).
Build the library.

### `gulp <target>:watch`
### `gulp lib:watch`

Watch the sources and rebuild on change.

Expand All @@ -85,9 +85,9 @@ Build `example` and run it.

Static analysis with `tslint`.

### `gulp lib-test`
### `gulp test`

Build the `lib-test` target and run the unit tests. Prints the report to
Build the `test` target and run the unit tests. Prints the report to
the terminal.

### `npm test`
Expand All @@ -102,10 +102,11 @@ If you just want to create a bot, take a look at <https://github.com/Microsoft/B
You can find the decompiled source code of the Skype Web Application on [the `skype-web-reversed` repository](https://github.com/demurgos/skype-web-reversed).

## What's not working and probably never will.
* [Old P2P group chats](https://github.com/ShyykoSerhiy/skyweb/issues/6). According to [Skype community site ](http://community.skype.com/t5/Skype-for-Web-Beta/Group-chats-missing-on-skype-web/td-p/3884218) only new, Cloud based group chats are shown in SkypeWeb Beta(therefore works in this API). The old P2P group chats are not.

* [Old P2P group chats](https://github.com/ShyykoSerhiy/skyweb/issues/6). According to [Skype community site ](http://community.skype.com/t5/Skype-for-Web-Beta/Group-chats-missing-on-skype-web/td-p/3884218) only new, Cloud based group chats are shown in SkypeWeb Beta(therefore works in this API). The old P2P group chats are not.

## Project Background

This project started as a fork of the https://github.com/ShyykoSerhiy/skyweb after slow progress from 3rd party patches. The goal is to provide stronger guarantees about the objects returned by the API (through checks and normalization) and better error management, because scrapping/unofficial API calls are unreliable so the library should be resilient.

## Disclaimer
Expand Down
83 changes: 0 additions & 83 deletions gulpfile.js

This file was deleted.

102 changes: 102 additions & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import * as buildTools from "turbo-gulp";

import * as gulp from "gulp";
import * as minimist from "minimist";
import { ParsedArgs } from "minimist";

interface Options {
devDist?: string;
}

const options: Options & ParsedArgs = minimist(process.argv.slice(2), {
string: ["devDist"],
default: {devDist: undefined},
alias: {devDist: "dev-dist"},
});

const project: buildTools.Project = {
root: __dirname,
packageJson: "package.json",
buildDir: "build",
distDir: "dist",
srcDir: "src",
tslint: {
configuration: {
rules: {
"number-literal-format": false,
},
},
},
};

const lib: buildTools.LibTarget = {
project,
name: "lib",
srcDir: "src/lib",
scripts: ["**/*.ts"],
mainModule: "index",
dist: {
packageJsonMap: (old: buildTools.PackageJson): buildTools.PackageJson => {
const version: string = options.devDist !== undefined ? `${old.version}-build.${options.devDist}` : old.version;
return <any> {...old, version, scripts: undefined, private: false};
},
npmPublish: {
tag: options.devDist !== undefined ? "next" : "latest",
},
},
customTypingsDir: "src/custom-typings",
tscOptions: {
skipLibCheck: true,
},
typedoc: {
dir: "typedoc",
name: "Incident",
deploy: {
repository: "git@github.com:demurgos/incident.git",
branch: "gh-pages",
},
},
clean: {
dirs: ["build/lib", "dist/lib"],
},
};

const example: buildTools.NodeTarget = {
project,
name: "example",
srcDir: "src",
scripts: ["example/**/*.ts", "lib/**/*.ts"],
tsconfigJson: "src/example/tsconfig.json",
mainModule: "example/main",
customTypingsDir: "src/custom-typings",
tscOptions: {
skipLibCheck: true,
},
clean: {
dirs: ["build/example", "dist/example"],
},
};

const test: buildTools.MochaTarget = {
project,
name: "test",
srcDir: "src",
scripts: ["test/**/*.ts", "lib/**/*.ts"],
customTypingsDir: "src/custom-typings",
tsconfigJson: "src/test/tsconfig.json",
tscOptions: {
skipLibCheck: true,
},
copy: [{files: ["test/test-resources/**/*"]}],
clean: {
dirs: ["build/test"],
},
};

const libTasks: any = buildTools.registerLibTasks(gulp, lib);
buildTools.registerMochaTasks(gulp, test);
buildTools.registerNodeTasks(gulp, example);
buildTools.projectTasks.registerAll(gulp, project);

gulp.task("all:tsconfig.json", gulp.parallel("lib:tsconfig.json", "test:tsconfig.json", "example:tsconfig.json"));
gulp.task("dist", libTasks.dist);
Loading

0 comments on commit 927688d

Please sign in to comment.