Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zsytssk/react-laya
Browse files Browse the repository at this point in the history
  • Loading branch information
zsytssk committed Mar 29, 2018
2 parents 2ebdcbc + 2959f1b commit 96d0689
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
npm-debug.log
test/tests.bundle.js
.DS_Store
.idea
.idea
dist/
5 changes: 2 additions & 3 deletions example/example1/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import { render } from "react-dom";
import { Stage, Box, Text, Image } from "react-laya";
const { Stage, Box, Text, Image } = require("../../../dist/bundle");

console.log(process.env.NODE_ENV);
class App extends React.Component<any, any> {
Expand Down Expand Up @@ -42,7 +42,7 @@ class App extends React.Component<any, any> {
render() {
let state = this.state;
return (
<Stage ref={node => console.log(node)} onRightClick={this.handleClick}>
<Stage onRightClick={this.handleClick}>
<Text text={this.state.text} color="#ffffff" />
<Test
skin={this.state.img}
Expand Down Expand Up @@ -78,7 +78,6 @@ class Test extends React.Component<TestProps, any> {
height={184}
/>
<Image
ref={node => console.log(node)}
x={200}
y={200}
anchorX={0.5}
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"license": "MIT",
"licenses": "MIT",
"main": "src/index.js",
"scripts": {
"build": "webpack"
},
"repository": {
"type": "git",
"url": "[email protected]:zsytssk/react-laya.git"
Expand Down
18 changes: 18 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";
const path = require("path");
const webpack = require("webpack");

module.exports = {
entry: "./src/index.js",
target: "node",
output: {
path: __dirname + "\\dist",
filename: "bundle.js",
library: "index",
libraryTarget: "umd"
},
mode: "development",
resolve: {
extensions: [".ts", ".tsx", ".js"]
}
};

0 comments on commit 96d0689

Please sign in to comment.