Skip to content

Commit

Permalink
Add travis implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
danang-id committed May 28, 2018
1 parent 74c2e5e commit 6f007be
Show file tree
Hide file tree
Showing 4 changed files with 1,185 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "node"
script:
- npm test
after_success: npm run coverage
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* [SimpleCrypto 2.0.0](#simplecrypto-200)
* [List of Contents](#list-of-contents)
* [Changes Log (What's New)](#changes-log-whats-new)
* [Getting Started](#getting-started)
* [Installation](#installation)
* [Documentation](#documentation)
Expand All @@ -22,6 +23,15 @@
* [License](#license)
* [Acknowledgments](#acknowledgments)

## Changes Log (What's New)

* Using only these functions to encrypt or decrypt: `encrypt()` and `decrypt()` (accepts string, object, number, or boolean data type). Function `encryptObject()` and `decryptObject()` is in deprecation as these functions are enough.
* Securing instance's properties from public access. Access to instance properties, like `instance.secret`, is not allowed anymore.
* New TypeScript definition file of this library is now available.
* Fixed documentation (typos, diction, etc).
* For contributor: Using `mocha`, `chai` and `coveralls` to create full unit-testing of the library. You could see testing result on top of this README.
* For contributor: Using `gulp` to compile the TypeScript source code into JavaScript ES5.

## Getting Started

This library is availabe through package manager ([npm](https://www.npmjs.org/) and [yarn](https://www.yarnpkg.com/)) and (soon) through CDN.
Expand Down Expand Up @@ -52,6 +62,15 @@ However, if you are using ECMAScript 5 and older, use the require statement:
var SimpleCrypto = require("simple-crypto-js").default;
```

If you're writing a project using [TypeScript](https://www.typescriptlang.org/) language, you might want to install TypeScript definition file to your project devDependencies.
```bash
# If you're using NPM
npm install --save-dev @types/simple-crypto-js

# If you're using Yarn
yarn add @types/simple-crypto-js --dev
```

## Documentation

**_SimpleCrypto_** has a single class with only two instance's functions and a single static function. This is by intention to keep it's simplicity. This is full documentation about the library and how to use it on your project. All examples work on both ECMAScript 6 (and later) and ECMAScript 5 (and older).
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"homepage": "https://github.com/danang-id/simple-crypto-js",
"scripts": {
"build": "gulp scripts",
"test": "mocha --reporter spec --require ts-node/register 'test/**/*.test.ts'"
"test": "mocha --reporter spec --require ts-node/register 'test/**/*.test.ts'",
"test:watch": "mocha --watch --reporter spec --require ts-node/register 'test/**/*.test.ts'",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
"crypto-js": "^3.1.9-1"
Expand All @@ -18,9 +20,11 @@
"@types/crypto-js": "^3.1.39",
"@types/mocha": "^5.2.0",
"chai": "^4.1.2",
"coveralls": "^3.0.1",
"gulp": "^3.9.1",
"gulp-typescript": "^4.0.2",
"mocha": "^5.2.0",
"nyc": "^11.8.0",
"ts-node": "^6.0.5",
"typescript": "^2.8.3"
}
Expand Down
Loading

0 comments on commit 6f007be

Please sign in to comment.