This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): add like vue's vm.$emit function
- add vue's vm.$emit function ``` javascript // emit props['onClick'] bind this.$emit("Click", 1); ``` - render function add params createElement function ``` javascript // auto bind event function this is here conmponent render: function(props, state, content, createElement); ```
- Loading branch information
Showing
21 changed files
with
348 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const rollupTypescript = require('rollup-plugin-typescript') | ||
const uglify = require('rollup-plugin-uglify') | ||
const { minify } = require('uglify-es') | ||
const replace = require('rollup-plugin-replace') | ||
const pkg = require('../package.json') | ||
const commonjs = require('rollup-plugin-commonjs'); | ||
|
||
const isProduction = process.env.NODE_ENV === 'production' | ||
|
||
const rollupTypescriptPlugin = rollupTypescript() | ||
const replacePlugin = replace({ | ||
VERSION_ENV: JSON.stringify(pkg.version), | ||
ENV: JSON.stringify(process.env.NODE_ENV) | ||
}) | ||
const commonjsPlugin = commonjs({ | ||
include: 'node_modules/**' | ||
}) | ||
|
||
module.exports = { | ||
plugins: !isProduction ? [ | ||
rollupTypescriptPlugin, | ||
replacePlugin, | ||
commonjsPlugin | ||
] : [ | ||
rollupTypescriptPlugin, | ||
uglify({}, minify), | ||
replacePlugin, | ||
commonjsPlugin | ||
], | ||
sourcemap: !isProduction | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const baseConfig = require('./rollup.base.config') | ||
|
||
const config = Object.assign({ | ||
input: 'src/ie8.ts', | ||
name: 'zreact', | ||
output:[ | ||
{ | ||
format: 'umd', | ||
file: 'dist/zreact.ie8.js' | ||
} | ||
] | ||
}, baseConfig) | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import "./polyfill"; | ||
|
||
import zreact from "./zreact"; | ||
|
||
export default zreact; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.