Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

point to nanocomponent-adapters-angular #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
50 changes: 0 additions & 50 deletions angular.js

This file was deleted.

8 changes: 1 addition & 7 deletions example.js → examples/button.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
var Nanocomponent = require('nanocomponent')
var reactDom = require('react-dom')
var react = require('react')
var html = require('bel')
var toReact = require('./react')

// create new nanocomponent
function Button () {
Expand Down Expand Up @@ -31,7 +28,4 @@ Button.prototype.update = function ({newColor}) {
return newColor !== this.color
}

var ReactButton = toReact(Button, react)
var el = document.createElement('div')
document.body.appendChild(el)
reactDom.render(react.createElement(ReactButton, { color: 'green' }), el)
module.exports = Button
12 changes: 12 additions & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"private": true,
"name": "examples",
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "MIT"
}
9 changes: 9 additions & 0 deletions examples/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var Button = require('./button')
var reactDom = require('react-dom')
var react = require('react')
var toReact = require('../react')

var ReactButton = toReact(Button, react)
var el = document.createElement('div')
document.body.appendChild(el)
reactDom.render(react.createElement(ReactButton, { color: 'green' }), el)
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports.customElementV0 = require('./custom-element-v0')
module.exports.customElementV1 = require('./custom-element-v1')
module.exports.angularjs = require('nanocomponent-adapters-angularjs')
module.exports.angular = require('./angular')
module.exports.angular = require('nanocomponent-adapters-angular')
module.exports.react = require('./react')
Loading