Skip to content

Commit a12a426

Browse files
init commit
1 parent 9331540 commit a12a426

10 files changed

+6497
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "stage-2"],
3+
}

build/config.gypi

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Do not edit. File was generated by node-gyp's "configure" step
2+
{
3+
"target_defaults": {
4+
"cflags": [],
5+
"default_configuration": "Release",
6+
"defines": [],
7+
"include_dirs": [],
8+
"libraries": []
9+
},
10+
"variables": {
11+
"asan": 0,
12+
"coverage": "false",
13+
"debug_devtools": "node",
14+
"debug_http2": "false",
15+
"debug_nghttp2": "false",
16+
"force_dynamic_crt": 0,
17+
"host_arch": "x64",
18+
"icu_data_file": "icudt59l.dat",
19+
"icu_data_in": "../../deps/icu-small/source/data/in/icudt59l.dat",
20+
"icu_endianness": "l",
21+
"icu_gyp_path": "tools/icu/icu-generic.gyp",
22+
"icu_locales": "en,root",
23+
"icu_path": "deps/icu-small",
24+
"icu_small": "true",
25+
"icu_ver_major": "59",
26+
"llvm_version": 0,
27+
"node_byteorder": "little",
28+
"node_enable_d8": "false",
29+
"node_enable_v8_vtunejit": "false",
30+
"node_install_npm": "true",
31+
"node_module_version": 57,
32+
"node_no_browser_globals": "false",
33+
"node_prefix": "/",
34+
"node_release_urlbase": "https://nodejs.org/download/release/",
35+
"node_shared": "false",
36+
"node_shared_cares": "false",
37+
"node_shared_http_parser": "false",
38+
"node_shared_libuv": "false",
39+
"node_shared_openssl": "false",
40+
"node_shared_zlib": "false",
41+
"node_tag": "",
42+
"node_use_bundled_v8": "true",
43+
"node_use_dtrace": "true",
44+
"node_use_etw": "false",
45+
"node_use_lttng": "false",
46+
"node_use_openssl": "true",
47+
"node_use_perfctr": "false",
48+
"node_use_v8_platform": "true",
49+
"node_without_node_options": "false",
50+
"openssl_fips": "",
51+
"openssl_no_asm": 0,
52+
"shlib_suffix": "57.dylib",
53+
"target_arch": "x64",
54+
"uv_parent_path": "/deps/uv/",
55+
"uv_use_dtrace": "true",
56+
"v8_enable_gdbjit": 0,
57+
"v8_enable_i18n_support": 1,
58+
"v8_enable_inspector": 1,
59+
"v8_no_strict_aliasing": 1,
60+
"v8_optimized_debug": 0,
61+
"v8_promise_internal_field_count": 1,
62+
"v8_random_seed": 0,
63+
"v8_trace_maps": 0,
64+
"v8_use_snapshot": "true",
65+
"want_separate_host_toolset": 0,
66+
"xcode_version": "7.0",
67+
"nodedir": "/Users/danielcherubini/.node-gyp/8.9.0",
68+
"standalone_static_library": 1
69+
}
70+
}

component.vue

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<h2>Hello from {{hellodata}}</h2>
3+
</template>
4+
5+
<script>
6+
module.exports = {
7+
props: {
8+
hellodata: {
9+
default: "default",
10+
type: String,
11+
required: true
12+
}
13+
},
14+
data: function () {
15+
return {
16+
}
17+
}
18+
}
19+
</script>

index.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const express = require('express')
2+
const app = express()
3+
const path = require("path");
4+
const renderer = require("./renderer");
5+
6+
app.get('/', function (req, res) {
7+
const vuefile = path.join(__dirname, "test2.vue")
8+
const data = {
9+
bar: true,
10+
fakehtml: "<p class=\"red\">FAKEHTML</p>"
11+
}
12+
renderer.renderToString(vuefile, data).then(html => {
13+
res.send(html);
14+
}).catch(error => {
15+
res.send(error);
16+
})
17+
18+
})
19+
20+
app.listen(3000, function () {
21+
console.log('Example app listening on port 3000!')
22+
})

0 commit comments

Comments
 (0)