add VERSION property (closes #239)

pull/240/head
Rich Harris 8 years ago
parent eafe310da5
commit 46469d4ef4

@ -62,6 +62,7 @@
"rollup": "^0.39.0", "rollup": "^0.39.0",
"rollup-plugin-buble": "^0.15.0", "rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-commonjs": "^7.0.0",
"rollup-plugin-json": "^2.1.0",
"rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-node-resolve": "^2.0.0",
"source-map": "^0.5.6", "source-map": "^0.5.6",
"source-map-support": "^0.4.8" "source-map-support": "^0.4.8"

@ -1,5 +1,6 @@
import nodeResolve from 'rollup-plugin-node-resolve'; import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs'; import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
export default { export default {
entry: 'src/index.js', entry: 'src/index.js',
@ -9,7 +10,8 @@ export default {
], ],
plugins: [ plugins: [
nodeResolve({ jsnext: true, module: true }), nodeResolve({ jsnext: true, module: true }),
commonjs() commonjs(),
json()
], ],
external: [ 'magic-string' ], external: [ 'magic-string' ],
globals: { globals: {

@ -2,6 +2,7 @@ import parse from './parse/index.js';
import validate from './validate/index.js'; import validate from './validate/index.js';
import generate from './generators/dom/index.js'; import generate from './generators/dom/index.js';
import generateSSR from './generators/server-side-rendering/index.js'; import generateSSR from './generators/server-side-rendering/index.js';
import { version } from '../package.json';
function normalizeOptions ( options ) { function normalizeOptions ( options ) {
return Object.assign( { return Object.assign( {
@ -45,4 +46,4 @@ export function compile ( source, _options ) {
return compiler( parsed, source, options, names ); return compiler( parsed, source, options, names );
} }
export { parse, validate }; export { parse, validate, version as VERSION };

Loading…
Cancel
Save