Skip to content

Commit

Permalink
Remove format-date dependency, add documentation, fix dist (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed Apr 9, 2016
1 parent bfab7d8 commit f076cc1
Show file tree
Hide file tree
Showing 54 changed files with 852 additions and 2,511 deletions.
7 changes: 3 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"presets": ["es2015"],
"plugins": [
"transform-class-properties",
"transform-export-extensions"
"presets": [
"es2015",
"stage-0"
]
}
31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/esdoc
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src
/esdoc
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# ics-js
Create ICS files in ES6.

Create ICS files in ES6. Works in Node.js or in the browser.

## Status

[![npm version](https://badge.fury.io/js/ics-js.svg)](http://badge.fury.io/js/ics-js)
[![Build Status](https://secure.travis-ci.org/angeloashmore/ics-js.svg?branch=master)](http://travis-ci.org/angeloashmore/ics-js?branch=master)
[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat)](https://github.com/gajus/canonical)

## Installation

`npm install ics-js`
```shell
npm install --save ics-js
```

## Documentation

[![Documentation](https://doc.esdoc.org/github.com/angeloashmore/ics-js/badge.svg)](https://doc.esdoc.org/github.com/angeloashmore/ics-js/)

## Usage
[View documentation on ESDoc](https://doc.esdoc.org/github.com/angeloashmore/ics-js/).

## Quick Guide

Import the module:

Expand All @@ -34,11 +44,14 @@ The following components are implenented:
### Add properties to a component

```js
// Component#addProp(name, value, props)
//
// name: Name of the property
// value: Value of the property
// props: Object with properties for the property
/**
* Component#addProp(name, value, props = {}, skipTransformer = false)
*
* @param {string} name - Name of the property (e.g. DTSTAMP).
* @param {*} [value] - Value of the property.
* @param {Object} [props={}] - Object of properties for the property. Object keys and values are directly injected.
* @param {boolean} [skipTransformer=false] - Explicitly determine if the property's value is transformed.
*/

cal.addProp('VERSION', 2) // Number(2) is converted to '2.0'
cal.addProp('PRODID', 'XYZ Corp');
Expand Down Expand Up @@ -87,7 +100,3 @@ cal.toString(); // Returns a string
cal.toBlob(); // Returns a Blob
cal.toBase64(); // Returns a Promise with a base64 string as the resolved value
```

## Acknowledgements

Inspired by [nwcell/ics.js](https://github.com/nwcell/ics.js)
Loading

0 comments on commit f076cc1

Please sign in to comment.