generate-google-calendar-link

0.0.5 • Public • Published

generate-google-calendar-link

Genelate a link to add a new event to the Google Calendar.

Google Calendarに予定を追加するlinkを生成します。

This function will return a dom element.

DOM 要素を返します。

Usage

実行例

var a = generateLink({
    start: new Date(2014, 10, 15, 10),
    end: new Date(2014, 10, 15, 18),
    title: 'New event',
    location: 'Some where',
    details: 'http://event.description.example.com/11234'
})

Parameters

See generate-google-calendar-url

Setup

For Node.js

インストール

npm install generate-google-calendar-link

実行例

var document = require('global/document')
var generateLink = require('generate-google-calendar-link')
var a = generateLink({
    start: new Date(2014, 10, 15, 10),
    end: new Date(2014, 10, 15, 18),
    title: 'New event',
    location: 'Some where',
    details: 'http://event.description.example.com/11234'
})

document.getElementById('result').appendChild(a)

For browsers

Use browserify.

For example:

browserify example.js -o bundle.js

htmlにscriptタグを埋め込みます。

<span id="result"></span>
<script src="bundle.js"></script>

For bower

bower install generate-google-calendar-link

htmlにscriptタグを埋め込みます。

<link rel="stylesheet" href="bower_components/generate-google-calendar-link/index.css">
<div id="result"></div>
<script src="bower_components/generate-google-calendar-link/index.js"></script>
<script>
var a = generateLink({
    start: new Date(2014, 10, 15, 10),
    end: new Date(2014, 10, 15, 18),
    title: 'New event',
    location: 'Some where',
    details: 'http://event.description.example.com/11234'
})

document.getElementById('result').appendChild(a)
</script>

Contributing

contributeするには

  1. Fork it.
  2. Create a branch (git checkout -b my_function)
  3. Commit your changes (git commit -am "Added My Function")
  4. Push to the branch (git push origin my_function)
  5. Open a Pull Request
  6. Enjoy a refreshing coffe and wait

Test

Standalone

mocha is used to test.

mochaを使います。

npm install
npm test

Deploy

npm

Update package.json.

package.jsonを更新します。

npm install
npm test
npm publish

bower

See generate-google-calendar-link-bower.

Readme

Keywords

Package Sidebar

Install

npm i generate-google-calendar-link

Weekly Downloads

192

Version

0.0.5

License

MIT

Unpacked Size

4.88 kB

Total Files

5

Last publish

Collaborators

  • ledsun