Skip to content
This repository was archived by the owner on Sep 25, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
'plugins': [
'vue',
'standard'
],
'extends': [
'standard',
'plugin:vue/recommended'
],
'parserOptions': {
'ecmaVersion': 8,
'sourceType': 'module'
}
}
74 changes: 74 additions & 0 deletions .github/CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at grahammbarber@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
86 changes: 86 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing to vue-trianglify

Hey, thank you so much. We appreciate that you want to contribute to vue-trianglify. Your time is valuable, and your contributions mean a lot to us.

## Important!

By contributing to this project, you:

* Agree that you have authored 100% of the content
* Agree that you have the necessary rights to the content
* Agree that you have received the necessary permissions from your employer to make the contributions (if applicable)
* Agree that the content you contribute may be provided under the Project license

## Getting started

**What does "contributing" mean?**

Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following:

- Updating or correcting documentation
- Feature requests
- Bug reports

If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information.

**Showing support for vue-trianglify**

Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use.

Don't have time to contribute? No worries, here are some other ways to show your support for vue-trianglify:

- Star the [project](https://github.com/multi-cell/vue-trianglify.git)
- Shoutout the project on Twitter
- Tell your friends and/or family all about us
<!-- - tweet your support for <%= ask("name") %> -->

## Issues

### Before creating an issue

Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the README will have advice about where to go to create issues.

Try to follow these guidelines:

- **Avoid creating issues for implementation help**. It's much better for discoverability, SEO, and semantics to keep the issue tracker focused on bugs and feature requests. To ask implementation-related questions, post on [stackoverflow.com](so)
- **Investigate the issue**: The more you can find out about the origins of the issue, the easier it is for us to fix it. Do some basic debugging to give us an edge over broken code.
- **Check the README** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue.
- Create the issue in the appropriate repository.

### Creating an issue

Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue:

- **Version**: please note the version of vue-trianglify are you using
- **Extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using
- **Error messages**: please paste any error messages into the issue, or a [gist](https://gist.github.com/)

### Closing issues

The original poster or the maintainer's of vue-trianglify may close an issue at any time. Typically, but not exclusively, issues are closed when:

- The issue is resolved
- The project's maintainers have determined the issue is out of scope
- An issue is clearly a duplicate of another issue, in which case the duplicate issue will be linked.
- A discussion has clearly run its course

## Next steps

**Tips for creating idiomatic issues**

Spending just a little extra time to review best practices and brush up on your contributing skills will, at minimum, make your issue easier to read, easier to resolve, and more likely to be found by others who have the same or similar issue in the future. At best, it will open up doors and potential career opportunities by helping you be at your best.

The following resources were hand-picked to help you be the most effective contributor you can be:

- The [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) is a great place for newcomers to start, but there is also information for experienced contributors there.
- Take some time to learn basic markdown. We can't stress this enough. Don't start pasting code into GitHub issues before you've taken a moment to review this [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601)
- The GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/) is another great markdown resource.
- Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/).

At the very least, please try to:

- Use backticks to wrap code. This ensures that it retains its formatting and isn't modified when it's rendered by GitHub, and makes the code more readable to others.
- When applicable, use syntax highlighting by adding the correct language name after the first "code fence".


[so]: http://stackoverflow.com/questions/tagged/vue-trianglify
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## What are the minimum necessary steps to reproduce this issue?

1. …
2. …
3. …

## What happens?


## What were you expecting to happen?


## Please paste any error or log messages here

(If your log is long, please [link to a gist](https://gist.github.com/))

## Any other details

10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Description

Please describe the purpose of the pull request.

## Checklist

- [ ] New stories were created to address changes in PR, if necessary
- [ ] Updated README and/or documentation, if necessary

Thanks for contributing!
16 changes: 16 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { configure } from '@storybook/vue'

import Vue from 'vue'

// Import your custom components.
const Trianglify = require('../src/Trianglify.js')

// Register custom components.
Vue.component('trianglify', Trianglify)

function loadStories() {
// You can require as many stories as you need.
require('../src/stories')
}

configure(loadStories, module)
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
# vue-trianglify
A Vue component for generating beautiful polygonal graphics
A Vue component for generating awesome polygonal art. It uses the Trianglify library, which you can check out [here](https://github.com/qrohlf/trianglify).

## Usage

First, install the package:

```sh
npm install vue-trianglify
# or
yarn add vue-trianglify
```

Currently, the package only supports usage as an imported component, so you don't want to use it in multiple places if you're bundling.

```html
<template>
<div>
<trianglify/>
</div>
</template>

<script>
import {Trianglify} from 'vue-trianglify'

export default {
components: {
Trianglify
}
}
</script>
```

Note the destructured import. If you don't do this, Vue will tell you that the `trianglify` component is missing a template or render function.

## Documentation
Props documentation to come.

## Caveats
I don't know how to use the canvas output option with a Vue component, so I'm going to wait on implementing that. If you know how to add it, by all means, please do.
Binary file added docs/favicon.ico
Binary file not shown.
24 changes: 24 additions & 0 deletions docs/iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base target="_parent">
<script>
if (window.parent !== window) {
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
window.parent.__VUE_DEVTOOLS_CONTEXT__ = window.document;
}
</script>
<title>Storybook</title>


</head>
<body>
<div id="root"></div>
<div id="error-display"></div>
<script src="static/preview.1c9c62ea15d3febfb3fa.bundle.js"></script>
</body>
</html>

46 changes: 46 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="storybook-version" content="3.2.15">
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<title>Storybook</title>
<style>
/*
When resizing panels, the drag event breaks if the cursor
moves over the iframe. Add the 'dragging' class to the body
at drag start and remove it when the drag ends.
*/
.dragging iframe {
pointer-events: none;
}

/* Styling the fuzzy search box placeholders */
.searchBox::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #ddd;
font-size: 16px;
}

.searchBox::-moz-placeholder { /* Firefox 19+ */
color: #ddd;
font-size: 16px;
}

.searchBox:focus{
border-color: #EEE !important;
}

.btn:hover{
background-color: #eee
}
</style>

</head>
<body style="margin: 0;">
<div id="root"></div>
<script src="static/manager.e4d12eab5be4616934e2.bundle.js"></script>
</body>
</html>

1 change: 1 addition & 0 deletions docs/static/manager.e4d12eab5be4616934e2.bundle.js

Large diffs are not rendered by default.

Loading