Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
feat: add version
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromake committed Aug 31, 2017
1 parent cd3bfdb commit 22324be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const isProduction = process.env.NODE_ENV === 'production'
// set new typescript
const rollupTypescriptPlugin = rollupTypescript()
const replacePlugin = replace({
DEVTOOLS_ENV: JSON.stringify(process.env.DEVTOOLS_ENV),
VERSION_ENV: JSON.stringify(pkg.version),
ENV: JSON.stringify(process.env.NODE_ENV)
})
export default {
Expand Down
4 changes: 4 additions & 0 deletions src/zreact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { IKeyValue } from "./types";
import { IVDom } from "./vdom/index";
import { IVNode } from "./vnode";

declare const VERSION_ENV: string;
const version = VERSION_ENV;
export default {
Component,
PureComponent,
Expand All @@ -22,6 +24,7 @@ export default {
options,
render,
rerender,
version,
};

export {
Expand All @@ -35,4 +38,5 @@ export {
options,
render,
rerender,
version,
};

0 comments on commit 22324be

Please sign in to comment.