Skip to content

Commit

Permalink
Update dependencies; update project structure; improve testing manage…
Browse files Browse the repository at this point in the history
…ment and scripts
  • Loading branch information
Antonio Pintus committed Aug 25, 2017
1 parent adf74f7 commit 53a4a8a
Show file tree
Hide file tree
Showing 13 changed files with 5,425 additions and 58 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage
typings

dist
test/ts/*.js
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sudo: false
dist: trusty,
language: node_js
cache:
directories:
Expand All @@ -9,9 +10,9 @@ branches:
notifications:
email: false
node_js:
- '7'
- '8'
before_install:
- npm i -g npm@^2.0.0

before_script:
- npm prune
script:
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# TypeScript Projects Boilerplate

This project is a simple boilerplate to start new projects in TypeScript. It includes testing, code coverage mocks and related configuration, including the integration with Travis CI. The latter, at the end of the process, increments the version, creates a new release on Github and publishes the package to NPM registry.
This project is a simple boilerplate to start new projects in TypeScript. It includes testing scripts, code coverage mocks and related configuration, including the integration with Travis CI. The latter, at the end of the process, increases the version, creates a new release on Github and publishes the package to NPM registry.

The project is configured to put built sources into the `dist` directory, while compiled tests are kept in the `test` directory.
Tests can be written in TypeScript or JavaScript.
The project is configured to put built sources into the `dist` directory.

Tests can be written in TypeScript or JavaScript. The `test` directory contains two subfolders:

- `ts`: put here the test files written in Typescript, remember to import entities to test from the `../../dist` dir, see test sample. Compiled TypeScript tests are kept in the `test/ts` directory;
- `js`: put here the test files written in JavaScript.

See `package.json` to discover all the defined scripts.

Expand Down
2 changes: 1 addition & 1 deletion dist/sample.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare function fetchHeaders(url: string): Promise<object>;
export declare function fetchHeaders(url: string): Promise<any>;
Loading

0 comments on commit 53a4a8a

Please sign in to comment.