housekeeping
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { IAugmentedJQuery, IComponentOptions } from 'angular'
|
||||
import { fromPairs } from 'lodash'
|
||||
import fromPairs = require('lodash.frompairs')
|
||||
import NgComponent from 'ngcomponent'
|
||||
import * as React from 'react'
|
||||
import { render, unmountComponentAtNode } from 'react-dom'
|
||||
@@ -30,7 +30,8 @@ export function react2angular<Props>(
|
||||
super()
|
||||
}
|
||||
render() {
|
||||
render(<Class {...this.props} />, this.$element[0])
|
||||
// TODO: rm any when https://github.com/Microsoft/TypeScript/pull/13288 is merged
|
||||
render(<Class {...(this.props as any)} />, this.$element[0])
|
||||
}
|
||||
componentWillUnmount() {
|
||||
unmountComponentAtNode(this.$element[0])
|
||||
|
||||
+17
-19
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "react2angular",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"description": "The easiest way to embed React components in Angular 1 apps!",
|
||||
"main": "index.js",
|
||||
"main:esnext": "index.es2015.js",
|
||||
"typings": "index.d.ts",
|
||||
"scripts": {
|
||||
"build": "npm run clean; tsc -d -m es2015 && mv ./index.js ./index.es2015.js && tsc -m commonjs -t es5",
|
||||
"build": "npm run clean; tsc -d -t es2015 && mv ./index.js ./index.es2015.js && tsc -t es5",
|
||||
"clean": "rm ./*.d.ts; rm ./*.map; exit 0",
|
||||
"pretest": "npm run build",
|
||||
"prepublish": "npm test",
|
||||
@@ -28,33 +28,31 @@
|
||||
"homepage": "https://github.com/coatue-oss/react2angular#readme",
|
||||
"devDependencies": {
|
||||
"@types/angular-mocks": "^1.5.9",
|
||||
"@types/jasmine": "^2.5.43",
|
||||
"@types/react-addons-test-utils": "^0.14.17",
|
||||
"angular-mocks": "^1.6.2",
|
||||
"jasmine": "^2.5.3",
|
||||
"karma": "^1.5.0",
|
||||
"@types/jasmine": "^2.5.47",
|
||||
"angular-mocks": "^1.6.4",
|
||||
"jasmine": "^2.6.0",
|
||||
"karma": "^1.6.0",
|
||||
"karma-browserify": "^5.1.1",
|
||||
"karma-chrome-launcher": "^2.0.0",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-mocha-reporter": "^2.2.2",
|
||||
"karma-mocha-reporter": "^2.2.3",
|
||||
"karma-source-map-support": "^1.2.0",
|
||||
"ngimport": "^0.6.0",
|
||||
"ngimport": "^0.6.1",
|
||||
"npm-run-all": "^4.0.2",
|
||||
"react-addons-test-utils": "^15.4.2",
|
||||
"rollupify": "^0.3.9",
|
||||
"tslint": "^5.0.0",
|
||||
"typescript": "^2.2.1",
|
||||
"tslint": "^5.1.0",
|
||||
"typescript": "^2.3.1",
|
||||
"watchify": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/angular": "^1.6.7",
|
||||
"@types/lodash.frompairs": "^4.0.1",
|
||||
"@types/react": "^15.0.12",
|
||||
"@types/angular": "^1.6.16",
|
||||
"@types/lodash.frompairs": "^4.0.2",
|
||||
"@types/react": "^15.0.23",
|
||||
"@types/react-dom": "^15.5.0",
|
||||
"angular": "^1.6.2",
|
||||
"angular": ">=1.5.0",
|
||||
"lodash.frompairs": "^4.0.1",
|
||||
"ngcomponent": "^3.0.0",
|
||||
"react": "^15.4.2",
|
||||
"react-dom": "^15.4.2"
|
||||
"ngcomponent": "^3.0.1",
|
||||
"react": "^15.5.4",
|
||||
"react-dom": "^15.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { bootstrap, element as $, ICompileService, mock, module } from 'angular'
|
||||
import 'angular-mocks'
|
||||
import { $rootScope } from 'ngimport'
|
||||
import * as React from 'react'
|
||||
import { Simulate } from 'react-addons-test-utils'
|
||||
import { Simulate } from 'react-dom/test-utils'
|
||||
import { react2angular } from './'
|
||||
|
||||
class TestOne extends React.Component<Props, void> {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"allowSyntheticDefaultImports": false,
|
||||
"declaration": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react",
|
||||
@@ -18,7 +18,7 @@
|
||||
"pretty": true,
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es6"
|
||||
"target": "es2015"
|
||||
},
|
||||
"files": [
|
||||
"index.tsx",
|
||||
|
||||
Reference in New Issue
Block a user