Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipskevin committed May 9, 2019
0 parents commit d36d36e
Show file tree
Hide file tree
Showing 11 changed files with 216 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
51 changes: 51 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"globals": {
"steal": true,
"can": true,
"Zepto": true,
"QUnit": true,
"System": true,
"SimpleDOM": true,
"test": true,
"asyncTest": true,
"expect": true,
"module": true,
"ok": true,
"equal": true,
"notEqual": true,
"deepEqual": true,
"notDeepEqual": true,
"strictEqual": true,
"notStrictEqual": true,
"raises": true,
"start": true,
"stop": true,
"global": true,
"customElements": true
},
"curly": true,
"eqeqeq": true,
"freeze": true,
"indent": 2,
"latedef": true,
"noarg": true,
"undef": true,
"unused": true,
"trailing": true,
"maxdepth": 4,
"boss" : true,
"eqnull": true,
"evil": true,
"loopfunc": true,
"smarttabs": true,
"maxerr" : 200,
"jquery": true,
"dojo": true,
"mootools": true,
"yui": true,
"browser": true,
"phantom": true,
"rhino": true,
"node": true,
"esnext": true
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to can-stache-define-element

Check out the [contribution guide on CanJS.com](https://canjs.com/doc/guides/contribute.html) for information on:

- [Code of Conduct](https://canjs.com/doc/guides/contribute.html#CodeofConduct)
- [Getting Help](https://canjs.com/doc/guides/contribute.html#GettingHelp)
- [Project Organization](https://canjs.com/doc/guides/contributing/project-organization.html)
- [Reporting Bugs](https://canjs.com/doc/guides/contributing/bug-report.html)
- [Suggesting Features](https://canjs.com/doc/guides/contributing/feature-suggestion.html)
- [Finding Ways to Contribute](https://canjs.com/doc/guides/contributing/finding-ways-to-contribute.html)

The rest of this guide has information that’s specific to this repository.

## Developing Locally

This section will walk you through setting up the [repository](https://github.com/canjs/can-stache-define-element) on your computer.

### Signing up for GitHub

If you don’t already have a GitHub account, you’ll need to [create a new one](https://help.github.com/articles/signing-up-for-a-new-github-account/).

### Forking & cloning the repository

A “fork” is a copy of a repository in your personal GitHub account. “Cloning” is the process of getting the repository’s source code on your computer.

GitHub has a guide for [forking a repo](https://help.github.com/articles/fork-a-repo/). To fork can-stache-define-element, you can start by going to its [fork page](https://github.com/canjs/can-stache-define-element/fork).

Next, you’ll want to clone the repo. [GitHub’s cloning guide](https://help.github.com/articles/cloning-a-repository/) explains how to do this on Linux, Mac, or Windows.

GitHub’s guide will [instruct you](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork) to clone it with a command like:

```shell
git clone https://github.com/YOUR-USERNAME/can-stache-define-element
```

Make sure you replace `YOUR-USERNAME` with your GitHub username.

### Installing the dependencies

After you’ve forked & cloned the repository, you’ll need to install the project’s dependencies.

First, make sure you’ve [installed Node.js and npm](https://docs.npmjs.com/getting-started/installing-node).

If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone:

```shell
cd can-stache-define-element
```

Next, install the project’s dependencies with npm:

```shell
npm install
```

### Running the tests

You can manually run this repository’s tests in any browser by starting the dev server (see the section above) and visiting this page: http://localhost:8080/test/test.html

Firefox is used to run the repository’s automated tests from the command line. If you don’t already have it, [download Firefox](https://www.mozilla.org/en-US/firefox/new/). Mozilla has guides for installing it on [Linux](https://support.mozilla.org/t5/Install-and-Update/Install-Firefox-on-Linux/ta-p/2516), [Mac](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Mac/ta-p/3453), and [Windows](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Windows/ta-p/2210).

After Firefox is installed, you can run:

```shell
npm test
```
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2019 Bitovi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7 changes: 7 additions & 0 deletions can-stache-define-element-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import QUnit from "steal-qunit";

QUnit.module("can-stache-define-element");

QUnit.test("basics", function(assert) {
assert.ok(true);
});
Empty file added can-stache-define-element.js
Empty file.
49 changes: 49 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "can-stache-define-element",
"description": "Create custom elements with can-stache, can-define-class, and JavaScript classes",
"version": "0.0.6",
"author": {
"name": "Bitovi",
"email": "[email protected]",
"url": "http://bitovi.com"
},
"bugs": {
"url": "https://github.com/canjs/can-stache-define-element/issues"
},
"dependencies": {
"can-define-class": "0.0.6",
"can-define-lazy-value": "^1.1.0",
"can-observe": "^2.3.0",
"can-reflect": "^1.17.9",
"can-stache": "^4.0.0",
"can-stache-bindings": "^4.0.0",
"can-symbol": "^1.6.4"
},
"devDependencies": {
"detect-cyclic-packages": "^1.1.0",
"fixpack": "^2.3.1",
"jshint": "^2.9.1",
"steal": "^2.2.1",
"steal-qunit": "^2.0.0",
"testee": "^0.9.0"
},
"homepage": "https://github.com/canjs/can-stache-define-element",
"keywords": [
"CanJS"
],
"license": "MIT",
"main": "can-stache-define-element.js",
"repository": {
"type": "git",
"url": "git://github.com/canjs/can-stache-define-element.git"
},
"scripts": {
"detect-cycle": "detect-cyclic-packages",
"jshint": "jshint ./*.js --config",
"lint": "fixpack && npm run jshint",
"postversion": "git push --follow-tags",
"preversion": "npm test",
"test": "npm run detect-cycle && npm run lint && npm run testee",
"testee": "testee test/test.html --browsers firefox"
}
}
26 changes: 26 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# can-stache-define-element

[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-611f69.svg)](https://www.bitovi.com/community/slack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join our Discourse](https://img.shields.io/discourse/https/forums.bitovi.com/posts.svg)](https://forums.bitovi.com/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/canjs/can-stache-define-element/blob/master/LICENSE.md)
[![npm version](https://badge.fury.io/js/can-stache-define-element.svg)](https://www.npmjs.com/package/can-stache-define-element)
[![Travis build status](https://travis-ci.com/canjs/can-stache-define-element.svg?branch=master)](https://travis-ci.com/canjs/can-stache-define-element)
[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-stache-define-element.svg)](https://greenkeeper.io/)

Import/require **can-stache-define-element** and use the Element to derive your own classes. Calling `customElements.define` will register your element with the window's registry of custom elements.

## Documentation

Read the [can-stache-define-element API docs on CanJS.com](https://v3.canjs.com/doc/can-stache-define-element.html).

## Changelog

See the [latest releases on GitHub](https://github.com/canjs/can-stache-define-element/releases).

## Contributing

The [contribution guide](https://github.com/canjs/can-stache-define-element/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more.

## License

[MIT](https://github.com/canjs/can-stache-define-element/blob/master/LICENSE.md)
4 changes: 4 additions & 0 deletions test/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!doctype html>
<title>can-stache-define-element Tests</title>
<script src="../node_modules/steal/steal.js" main="test/test"></script>
<div id="qunit-fixture"></div>
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "../can-stache-define-element-test";

0 comments on commit d36d36e

Please sign in to comment.