GithubHelp home page GithubHelp logo

express-vue / express-vue Goto Github PK

View Code? Open in Web Editor NEW
1.3K 38.0 93.0 2.62 MB

Vue rendering engine for Express.js. Use .Vue files as templates using streams

License: Other

JavaScript 91.89% Vue 8.11%
expressjs express node nodejs vue vuejs vuejs2 vue2 vue2-ssr

express-vue's Introduction

Version Build Status Dependency Status Codecov

express-vue

A Simple way of using Server Side rendered Vue.js 2.0+ natively in Express using streams

If you want to use vue.js and setup a large scale web application that is server side rendered, using Node+Express, but you want to use all the fantastic tools given to you by Vue.js. Then this is the library for you.

The idea is simple use Node+Express for your Controller and Models, and Vue.js for your Views.. you can have a secure server side rendered website without all the hassle. Your Controller will pass in the data to your View through

res.renderVue('view', {data}, [{vueOptions}]).

Table of Contents

Installation

$ npm install --save express-vue

Requirements

Requires Node V6 or greater, and Vue 2.0 or greater. (Latest Vue.js is included in this project)

ES Modules

If using ES module statments like

export default {}
//or
import foo from "foo";

Or any other ES features you will need to also install babel-core and babel-preset-env.

npm i -D babel-core babel-preset-env

Then place a .babelrc file in your root. here's an example targeting last two versions

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["last 2 versions"]
      }
    }]
  ]
}

Example / Starter

An example / starter can be found here

Usage

This is the minimum required setup. If you don't provide a vueVersion it will use the latest one when the project was published. If there is no rootPath it will assume the root is the parent directory of node_modules.

var expressVue = require("express-vue");
var app = express();

//pass your app through express-vue here
//expressVueOptions is optional and explained later in the docs
//this is a promise, so you can either await it or do this.
expressVue.use(app, expressVueOptions).then(() => {
    //the rest of your express routes.
});

In your route, assuming you have a main.vue

router.get('/', (req, res, next) => {
    const data: {
        otherData: 'Something Else'
    };
    req.vueOptions: {
        head: {
            title: 'Page Title',
            metas: [
                { property:'og:title', content: 'Page Title'},
                { name:'twitter:title', content: 'Page Title'},
            ]
        }
    }
    res.renderVue('main.vue', data, req.vueOptions);
})

To use Data binding into the vue files you need to pass data in through the data object as above. express-vue will automatically add anything you put here to the root element of your Vue components. You do not need to have anything in data in your .vue file, but if you did what you put in res.render will overwrite it.

Remember to always write your data objects in your .vue files as functions!

Options

key type description required? default value
rootPath string this is the path the library will use as the base for all lookups optional the directory that your ../node_modules lives in
vueVersion string or object this is where you specify which version of vue.js's library to use from the CDN optional the latest version as of publishing this
layout Object this is the object for customzing the html, body, and template tags optional has default value which is in the example below
vue Object this is the global config for vue for example you can set a global title, or a script tag in your head block everything here is global optional no default value
data Object this is the global data object, this will be merged in to your .vue file's data block on every route, you can override this per route. optional no default value

Here's an example, with the default layout config included for you to see...

const vueOptions = {
    rootPath: path.join(__dirname, '../example/views'),
    head: {
        title: 'Hello this is a global title',
        scripts: [
            { src: 'https://example.com/script.js' },
        ],
        styles: [
            { style: '/assets/rendered/style.css' }
        ]
    },
    data: {
        foo: true,
        bar: 'yes',
        qux: {
            id: 123,
            baz: 'anything you wish, you can have any kind of object in the data object, it will be global and on every route'
        }
    }
};
expressVue.use(app, vueOptions);

Components / Mixins / Etc

NOTE: Components and Mixins need to be OUTSIDE of the Pages Root folder.

When including components/mixins/etc the directory it looks is going to be relative to the file you're working in currently. assuming the below is running in a folder with a subdirectory components and a directory mixins in a parent, it would look like this. when importing .vue files and .js files from node modules you can just import them the normal way you import a module.

<script>
import messageComp from './components/message-comp.vue';
import users from './components/users.vue';
import exampleMixin from '../mixins/exampleMixin';
import externalComponent from 'foo/bar/external.vue';
export default {
    mixins: [exampleMixin],
    data: function () {
        return {
        }
    },
    components: {
        messageComp,
        users,
        externalComponent
    }
}
</script>

CSS inside components/views

Please use regular CSS for now, SCSS/LESS/etc are compiled languages, and this is a runtime library for now. In the future I will be creating build tools to handle compiling the .vue files into .js files so that it runs faster, and more efficient at runtime. But for dev mode, it will compile everything at runtime, so you can edit and preview faster.

<style>
    .test {
        border: 2px;
    }
    .test a {
        color: #FFF;
    }
</style>

Mixins

You can now use Mixins, lets say you have an file called exampleMixin.js and it looks like this:

examplemixin.js

module.exports {
    methods: {
        hello: function () {
            console.log('Hello');
        }
    }
}

In your route you would declare it by placing mixins: [exampleMixin] in your vue object.

<script>
import exampleMixin from '../mixins/exampleMixin';
export default {
    mixins: [exampleMixin],
    data: function () {
        return {
        }
    }
}
</script>

You can now use this in your .Vue file, like so

<button @click="hello()">Click me and look at console logs</button>

Meta

This library takes the wonderful inspiration from vue-head and adapts it to work here. Just add a meta array into your head object, with support for both content and property types. (Note we don't support shorthand here, and no support for google+ just yet, that will come soon).

const vueOptions = {
    head: {
        title: 'It will be a pleasure',
        // Meta tags
        metas: [
            { name: 'application-name', content: 'Name of my application' },
            { name: 'description', content: 'A description of the page', id: 'desc' } // id to replace intead of create element
            // ...
            // Twitter
            { name: 'twitter:title', content: 'Content Title' },
            // ...
            // Facebook / Open Graph
            { property: 'fb:app_id', content: '123456789' },
            { property: 'og:title', content: 'Content Title' },
            // ...
            // Rel
            { rel: 'icon', type: 'image/png', href: '/assets/favicons/favicon-32x32.png', sizes: '32x32' }
            // Generic rel for things like icons and stuff
        ],
        // Scripts
        scripts:[
            { src: '/assets/scripts/hammer.min.js' },
            { src: '/assets/scripts/vue-touch.min.js', charset: 'utf-8' },
            // Note with Scripts [charset] is optional defaults to utf-8
            // ...
        ],
        // Styles
        styles: [
            { style: '/assets/rendered/style.css' }
            { style: '/assets/rendered/style.css', type: 'text/css' }
            // Note with Styles, [type] is optional...
            // ...
        ],
    }
}
expressVue.use(app, vueOptions);

Structured Data

This also supports Google Structured data https://developers.google.com/search/docs/guides/intro-structured-data

const vueOptions = {
    head: {
        title: 'It will be a pleasure',
        structuredData: {
            "@context": "http://schema.org",
            "@type": "Organization",
            "url": "http://www.your-company-site.com",
            "contactPoint": [{
                "@type": "ContactPoint",
                "telephone": "+1-401-555-1212",
                "contactType": "customer service"
            }]
        }
    }
}

Template

If you want to have a custom layout you can, here is the default layout, each part is overridable.

const vueOptions = {
    //...
    template: {
        html: {
            start: '<!DOCTYPE html><html>',
            end: '</html>'
        },
        body: {
            start: '<body>',
            end: '</body>'
        }
        template: {
            start: '<div id="app">',
            end: '</div>'
        }
    }
    //...
};
expressVue.use(app, vueOptions);

DevTools

To use the amazing Vue.js DevTools please set the environment variable VUE_DEV=truethis will also trigger the development version of vue to be included in the head.

Caching

Caching is now enabled by default, in dev mode hopefuly you're using something like nodemon/gulp/grunt etc, which restarts the server on file change.. otherwise you will need to stop and restart the server if you change your files.. which is normal.

Typescript support

Typescript declarations are published on NPM, so you don’t need external tools like Typings, as declarations are automatically imported with express-vue. That means all you need is a simple:

import expressVue = require('express-vue');

Sailsjs Support

This is middleware now so support for sails should just work as middleware.

Migration to Webpack Renderer

  • change rootPath to pagesPath
  • remove vueVersion
  • install webpack vue-loader and css-loader
  • remove .babelrc if you have one
  • if you're using regular babel packages switch to the @babel versions @babel/core @babel/preset-env @babel/preset-es2015
  • remove vuejs
  • move your expressVue options into a file on the root of your directory (same level as node_modules) and call it expressvue.config.js
  • Use the new init syntax expressVue.use(expressApp); this is a async function, so please either await it or use it in a promise.

V5 Migration

  • Ditched the custom parser/renderer and moved to using vue-pronto which uses Vueify
  • Re-structured the vueOptions
  • Added req.vueOptions as a global.
  • Removed the vue parent object with the child of head, this was un-needed its now just vueOptions.head instead of vueOptions.vue.head
  • When using res.renderVue the filename requires an extention now.
  • Paths are now RELATIVE to the file you're currently in ... YAAAY
  • Node Modules are supported, for both javascript and vue file imports inside .vue files ... YAAAY
  • Massive Performance gains
  • 100% compatability with vueJS
  • Migration to Vue-Pronto

Express-vue-renderer got too heavy, the architecture became too messy, and it was slow. It needed to get thrown out. Enter vue-pronto it uses vueify under the hood, and is much more modular. this will be much easier going forward to maintain.

Changes to the Vue Options Object

There's been some big changes to this object, so before it would look like this

const vueOptions = {
    vue: {
        head: {
            meta: [
                { script: 'https://unpkg.com/[email protected]/dist/vue.js'},
                { name: 'application-name', content: 'Name of my application' },
                { name: 'description', content: 'A description of the page', id: 'desc' },
                { style: '/assets/style.css' }
            ]
        }
    }
};

Now its different ..

  • We have automated getting vueJS from the CDN for you, and which version (dev/prod) it should use based on the environment variable VUE_DEV.
  • We also broke up the meta object, into metas, scripts, and styles arrays. scripts now have scriptSrc which is a string including the <script> elements which will be placed in your head as is.
  • The parent vue object that wraps the head object was unneeded and removed. here's the same as above but newer
const vueOptions = {
    vueOptions: "2.4.2",
    head: {
        metas: [
            { name: 'application-name', content: 'Name of my application' },
            { name: 'description', content: 'A description of the page', id: 'desc' },
        ],
        styles: [
            { style: '/assets/style.css' }
        ]
    }
};

Vue File changes

Routes before were relative to the rootPath... now that is gone... routes for requires are relative to the file you are currently in. Also node_module paths are working for both .js and .vue includes

Remember to look at this if you're getting errors!

res.renderVue Changes

res.renderVue now requires an extension for the file you're using in the route. foo/bar now foo/bar.vue

New

Global req.vueOptions. this is super handy for passing options around between middleware.

Changelog

V5

  • Ditched the custom parser/renderer and moved to using vue-pronto which uses Vueify
  • Re-structured the vueOptions
  • Added req.vueOptions as a global.
  • Removed the vue parent object with the child of head, this was un-needed its now just vueOptions.head instead of vueOptions.vue.head
  • when using res.renderVue the filename requires an extention now.
  • Paths are now RELATIVE to the file you're currently in ... YAAAY
  • Node Modules are supported, for both javascript and vue file imports inside .vue files ... YAAAY
  • Massive Performance gains
  • 100% compatability with vueJS

V4

  • v4 was a complete re-write.. migrating from v3 to v4 will break everything.
  • No longer is res.render used, its now res.renderVue
  • Now replies with streams instead of a single sync call
  • massive performance increase
  • import vue components in your vue files!
  • lots of other changes

V3

  • v3 has seriously changed the object you pass into the vue file.. so please if migrating from an earlier version (and you should). Take the time to look at the new object. Sorry for the breaking change, but I'm only one person.

License

Apache-2.0 Β© Daniel Cherubini

express-vue's People

Contributors

aravindvnair99 avatar boblauer avatar danielcherubini avatar djorborn avatar efueger avatar greenkeeper[bot] avatar jeliasson avatar lukaswilkeer avatar morkro avatar nick-fytros avatar onufriievkyrylo avatar ralucas avatar robgraeber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

express-vue's Issues

[Question/Proposal] Simple function to dynamically transform .vue file into JS Code output (minified)

Description of Issue

Hi

I am working on advanced use of Vue using NodeJS+ExpresJS+VueSSR stack...

I am looking for something like this...
function vueComponentToJs([Array of .vue file names],dependencyContextOnServer)

This return the minified JS code in the form of javascript function by calling which, it will be injected into ClientSide Javascript Context/Engine.

I see this function/feature can be a great value-add for many complex applications.

Is this available or can be build using the existing functions provided by this project?

Please advise,

-thanks, dp

Stack Trace / Console Log

Additional Comments

Add Plugin Support

var plugin = require('plugin');
Vue.use(plugin);
vue:{
    plugins:['foo', 'bar']
}

the head meta place

Hi,

now headRegex is default /</head>/igm, could use {{{head}}} or {{{meta}}} replace ?.

I would like to put some analyze script code in the layout.

Trouble adding components

I am getting the body parser error because express-vue can not find the components. I tried adding a new component to your example vue-example-basic by doing the following:

app.get('/', (req, res) => {
res.render('components/index', {
vue: {
meta: {
title: 'www.jerome724.com'
},
components:['modal']
}
});

and I added a modal.vue inside the components directory. What am I conceptually doing wrong here?

Thank you!

An in-range update of vue is breaking the build 🚨

Version 2.2.5 of vue just got published.

Branch Build failing 🚨
Dependency vue
Current Version 2.2.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As vue is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes v2.2.5

Fixed

Commits

The new version differs by 19 commits .

  • c0ad75b [release] 2.2.5
  • b876395 [build] 2.2.5
  • bfeb28f pin todomvc css version
  • 3b7cfc7 coverage
  • f4630d0 treat with different types as different nodes (fix #5266)
  • 5222f06 bump deps
  • 6de1b9b optimize patch conditionals
  • 0bb529a also warn when listening to camelCase events in in-DOM templates
  • e47b1e5 Allow named properties on reactive arrays. (#5216)
  • 70db229 handle v-model on password input field on ie9 (fix #5250) (#5253)
  • 23a058e fix(inject): change warn message when trying to mutate an injected value (#5243)
  • 7dea9f1 fix provide isn't reactive with a single array (#5229)
  • 4c4a2ab trigger event after reassigned state - Fix #5191 (#5233)
  • e733e5c fix SSR v-show render. (#5224)
  • 84856a3 update issue template

There are 19 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Sails v1 compatability.

Description of Issue

Thank you for the template. It's quite useful, according to fast growing of Vue community.
But, it would be incredible if you could upgrade README, and add also instructions for Sails v1 integration. I hope we will get this version as stable as soon as possible. Or even it would be great to create simple example of sails+vue project.
Thank you in advance.

CSS rendering silently fails if defaults.options.vue is not set

Description of Issue

I have a simple Express app, that renders only one page at "/":

const express = require('express')
const expressVue = require('express-vue');

var app = express()

app.engine('vue', expressVue)
app.set('view engine', 'vue')

app.set('views', __dirname + '/views')

app.set('vue', {})

app.get('/', function(req, res) {
  res.render('homepage')
})

app.listen(3000, function () {
  console.log('Example app listening on port 3000!')
})

And it does not render the style block I have in the homepage.vue at all.

However, when I change res.render('homepage') to res.render('homepage', { vue: {} }), it is working fine.

Stack Trace / Console Log

None

Additional Comments

I guess, the problem is in the file dist/utils/render.js at line 132.

An in-range update of vue is breaking the build 🚨

Version 2.2.3 of vue just got published.

Branch Build failing 🚨
Dependency vue
Current Version 2.2.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As vue is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Release Notes v2.2.3

Notable Changes

  • Vue.config.performance now defaults to false due to its impact on dev mode performance. Only turn it on when you need it.

Improvements

  • Now warns usage of camelCase props when using in-DOM templates. (@CodinCat via #5161)
  • Now warns when template contains text outside of root element. (@xujiongbo via #5164)

Fixed

  • #5121 parse content in textarea as plaintext (@HerringtonDarkholme via #5143)
  • #5146, #5169, #5171 fix v-on .prevent modifier regression when combined with other key modifiers (@Kingwl via #5147)
  • #5150 v-bind object should have lower priority than explicit bindings
  • #5162 fix custom directive argument fallthrough
  • #5174 fix ever-increasing component render time caused by calls to performance.measure in dev mode.
Commits

The new version differs by 16 commits .

  • d185dd2 [release] 2.2.3
  • b28aa39 [build] 2.2.3
  • 368a335 perf code coverage
  • 0416839 improve camelCase prop warning message
  • c6ab2e0 warn when template contains text outside root element (#5164)
  • 025e763 Warn when not passing props in kebab-case (#5161)
  • 4d227b9 turn off perf timeline measuring by default + reduce its impact on dev time perf (fix #5174)
  • a6e1ae0 v-bind object should have lower priority than explicit bindings (fix #5150)
  • e7dfcc3 fix custom directive arg fall through (fix #5162)
  • 0b964c8 formatting tweaks
  • 045ff5d refactor create-component
  • 4964b25 fix wrong order of generate modifier code (#5147)
  • f9706dc fix v-on unit test (#5144)
  • 8fca83d fix #5121: parse content in textarea as plaintext (#5143)
  • 82bc8b7 Merge branch 'dev' of github.com:vuejs/vue into dev

There are 16 commits in total. See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Issue with components, they aren't being found or detected

Description of Issue

Been using express vue and have been loving it so far but I ran into an issue. I used the example provided but when I tried to apply it to my application I found no luck. i'd get the same issue below every time and nothing would show up. Here are some of the things I think might be important.

  <h1>Welcome to Covenant</h1>

  <etio></etio>

  <div v-if='user'>
    <a :href=" '/users/' + user.username">{{user.username}}</a>
    |
    <a href="/listings/create/">Create Listing</a>
  </div>
  <div v-else>
    <a href="/login">Login</a>
    |
    <a href="/users/register">Register</a>
etio.vue in views/components
<template>
<div>
<h1>testing</h1>
</div>

</template>

res.render inside my express controllers, thats being sent to the express router,

      res.render('index', {
        data: {
          user: req.user,
          listings: listings
        },
        vue: {
          head: {
            title: 'Covenant',
          }
        },
        components: ['etio']
      });

Stack Trace / Console Log

vue.js:440 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in )

Additional Comments

The simple-example showcasing components worked perfectly but I cant seem to get it to work in my application!

Add Support for Components using an array in the scope

Declare components sorta like

class Scope {
    title          : string;
    components     : Object;
    constructor(components: Object) {
        this.title      = 'Vue Test';
        this.components = components;
    }
}

const scope = new Scope(['my-component', 'my-other-component']);
res.render('main/main', scope);

Then in the library look for an object called components and iterate over them, convert them into a vue component like below which would be injected as a global component to be used in an element like <my-component></my-component>

Vue.component('my-component', {
  template: '<div>A custom component!</div>'
})

Would also need to have some kind of change to app.set

app.set('vue', {
    layoutsDir: 'app/views/',
    defaultLayout: 'layout',
    componentsDir: 'app/components/'
});

TypeError: Cannot read property 'rootPath' of undefined while using in SailsJS

Description of Issue

I know, this lib is for Express, but I am trying to make it work in the Sails framework.

Stack Trace / Console Log

TypeError: Cannot read property 'rootPath' of undefined
    at new Defaults (/Users/duffpod/Desktop/vue-sails-test-2/node_modules/express-vue/dist/models/defaults.js:12:41)
    at SailsView.expressVue [as engine] (/Users/duffpod/Desktop/vue-sails-test-2/node_modules/express-vue/dist/index.js:15:20)
    at SailsView.View.render (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/view.js:76:8)
    at Function.app.render (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/application.js:561:10)
    at ServerResponse.res.render (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/response.js:845:7)
    at ServerResponse.res.view (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/hooks/views/res.view.js:284:16)
    at fn (/Users/duffpod/Desktop/vue-sails-test-2/config/routes.js:37:18)
    at routeTargetFnWrapper (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/router/bind.js:181:5)
    at callbacks (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:164:37)
    at param (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:138:11)
    at pass (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:145:5)
    at nextRoute (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:100:7)
    at callbacks (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:167:11)
    at module.exports (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/hooks/cors/clear-headers.js:14:3)
    at routeTargetFnWrapper (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/router/bind.js:181:5)
    at callbacks (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:164:37)
    at param (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:138:11)
    at pass (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:145:5)
    at nextRoute (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:100:7)
    at callbacks (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/node_modules/@sailshq/express/lib/router/index.js:167:11)
    at sails.router.bind._middlewareType (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/hooks/csrf/index.js:148:11)
    at routeTargetFnWrapper (/Users/duffpod/.nvm/versions/node/v7.7.2/lib/node_modules/sails/lib/router/bind.js:181:5)

Additional Comments

Tracked the error to the file at dist/models/defaults.js. Fixed by supplying the empty objects while pre-validating the options variable.

From this:

var Defaults = function Defaults(options) {
    _classCallCheck(this, Defaults);

    this.rootPath = options.settings.vue.rootPath === undefined ? options.settings.views + '/' : options.settings.vue.rootPath + '/';
    this.layoutsDir = options.settings.vue.layoutsDir === undefined ? '' : this.rootPath + options.settings.vue.layoutsDir + '/';
    this.componentsDir = options.settings.vue.componentsDir === undefined ? '' : options.settings.vue.componentsDir + '/';
    this.defaultLayout = options.settings.vue.defaultLayout === undefined ? '' : options.settings.vue.layoutsDir === undefined ? this.rootPath + options.settings.vue.defaultLayout : options.settings.vue.defaultLayout;
    this.options = options.settings.vue.options === undefined ? {} : options.settings.vue.options;
    this.backupLayout = '<template><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><script src="https://unpkg.com/vue/dist/vue.js"></script></head><body>{{{app}}}{{{script}}}</body></html></template><script></script><style></style>';
    this.layoutPath = this.layoutsDir + this.defaultLayout + '.vue';
    this.options = options;
};

To this:

var Defaults = function Defaults(options) {
    _classCallCheck(this, Defaults);

    options.vue = options.vue === undefined ? {} : options.vue
    options.settings.vue = options.settings.vue === undefined ? {} : options.settings.vue;

    this.rootPath = options.settings.vue.rootPath === undefined ? options.settings.views + '/' : options.settings.vue.rootPath + '/';
    this.layoutsDir = options.settings.vue.layoutsDir === undefined ? '' : this.rootPath + options.settings.vue.layoutsDir + '/';
    this.componentsDir = options.settings.vue.componentsDir === undefined ? '' : options.settings.vue.componentsDir + '/';
    this.defaultLayout = options.settings.vue.defaultLayout === undefined ? '' : options.settings.vue.layoutsDir === undefined ? this.rootPath + options.settings.vue.defaultLayout : options.settings.vue.defaultLayout;
    this.options = options.settings.vue.options === undefined ? {} : options.settings.vue.options;
    this.backupLayout = '<template><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><script src="https://unpkg.com/vue/dist/vue.js"></script></head><body>{{{app}}}{{{script}}}</body></html></template><script></script><style></style>';
    this.layoutPath = this.layoutsDir + this.defaultLayout + '.vue';
    this.options = options;
};

Having trouble importing moment in a component

I have a method that I'm running to format my dates

  <p class="lead">{{ formatDate(r.date_created) }}</p> 
(This is in my template, just showing how the method is getting called.)

<script>
var moment = require('moment');
// import moment from 'moment'

export default {
    props: ['results', 'getURL', 'page', 'x', 'y', 'total'],
    methods: {
        formatDate: function(date) {
            return moment(date).fromNow();
        }
    }
};
</script>

<style lang="css">

The weird thing is that it is formatting correctly using moment but I still get this error
"vue.min.js:6 Uncaught ReferenceError: moment is not defined"
so I can't see my vues in the vue-dev-tools with the error.

It is in my dependancies too

"dependencies": {
"async": "^2.1.4",
"body-parser": "^1.15.2",
"express": "^4.14.0",
"express-paginate": "^0.2.2",
"express-vue": "^3.1.2",
"moment": "^2.17.1",
"multer": "^1.2.1",
"nodemon": "^1.11.0",
"request": "^2.79.0",
"request-promise": "^4.1.1",
"vue-paginate": "^3.1.0"
},

I'm not sure if it has to do with the express-vue or something else is going on. I've looked at others with this problem and I can't figure out why I'm getting the error. I think I've had other problems to when trying to import libraries into my vues.

Failed to resolve filter: json

<pre>{{ $data | json }}</pre>
export default {

  data: function(){
    return {
      user: {
        name: '',
        email: '',
        password: '',
      }
    }
  }
}

Description of Issue

Does not display data when changing model-related data

v-model='user.email'

Stack Trace / Console Log

I had an error processing this script.
[Vue warn]: Failed to resolve filter: json
(found in )

Installation error

After install express-vue via npm, this error seems to happen after $ npm start
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/home/allen/Heroku/allen-royston-2017/node_modules/vue-server-renderer/build.js:6698:18)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

Uncaught SyntaxError: Invalid or unexpected token when passing data with HTML string to component

Description of Issue

I'm getting a list of blog posts from my backend and each one contains some HTML. When I try to pass them forward into my posts component there is a syntax error because of the HTML.

The relevant code looks something like this:

<template lang="html">
	<div>
		<posts :posts="posts"></posts>
	</div>
</template>

Stack Trace / Console Log

(index):24 Uncaught SyntaxError: Invalid or unexpected token

Additional Comments

An in-range update of vue-server-renderer is breaking the build 🚨

Version 2.2.3 of vue-server-renderer just got published.

Branch Build failing 🚨
Dependency vue-server-renderer
Current Version 2.2.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As vue-server-renderer is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Release Notes v2.2.3

Notable Changes

  • Vue.config.performance now defaults to false due to its impact on dev mode performance. Only turn it on when you need it.

Improvements

  • Now warns usage of camelCase props when using in-DOM templates. (@CodinCat via #5161)
  • Now warns when template contains text outside of root element. (@xujiongbo via #5164)

Fixed

  • #5121 parse content in textarea as plaintext (@HerringtonDarkholme via #5143)
  • #5146, #5169, #5171 fix v-on .prevent modifier regression when combined with other key modifiers (@Kingwl via #5147)
  • #5150 v-bind object should have lower priority than explicit bindings
  • #5162 fix custom directive argument fallthrough
  • #5174 fix ever-increasing component render time caused by calls to performance.measure in dev mode.
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Unable to include local css file

Apologies if this is user error; I have referenced your examples and documentation, but obviously am having issues.

Under the render => vue => meta => head array I have applied two styles:

head: [
  // works
  {style: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'},
  // doesn't work
  {style: __dirname + '/static/css/styles.css'}
]

The second returns an error of Not allowed to load local resource:.

Pug/Jade Support?

First off, thank you for making this Express plugin. It's been very helpful. Do you have any plans to integrate pug/jade support? Thanks.

div h1 Pug support please!

How do I append scripts to the before closing of body tags of deafultLayout?

I realize that I can add scripts within the meta.

vue: {
    components: [],
    head: {
        meta: [
            { script: '/js/main.js'}
        ]
    }
}

But if I wanted to add them before the closing of the body tag how can I achieve this?

In vue-head you can do something like this:

script: [
      { type: 'text/javascript', src: 'cdn/to/script.js', async: true, body: true}, // Insert in body
      // with shorthand
      { t: 'application/ld+json', i: '{ "@context": "http://schema.org" }' },
      // ...
    ],

But it doesn't seem to work.

Is there any way to do this?

Can I somehow use the {{{script}}} replacement?

Thanks in advance!

Will async functions with await statements be supported?

I am interested in using async/await.

Currently it's not supported, how do you feel about adding certain babel plugins like this one?

Would this be a problem of where to draw the line of what plugins should be included?

I forked the repo and started to attempt to add the plugin but had a couple of issues, if there's interest I'll look further into it since I should be pretty close.

Thanks in advance!

Having trouble passing data to component

I have an API that takes certain params and returns a list of objects from the database. I am having trouble passing the data from the main vue to the results component.

router.get('/search', function(req, res, next) {
   
    var keyword = ("%" + req.query.keyword + "%")
    var lat = req.query.lat
    var lng = req.query.lng

    console.log(keyword, lat, lng)

    connection.query('SELECT *, ( 3959 * acos (cos ( radians(?) )* cos( radians( lat ) )* cos( radians( lng ) - radians(?) )+ sin ( radians(?) )* sin( radians( lat ) ))) AS distance FROM job_posting where job_title like ? HAVING distance < 25', [
        lat, lng, lat, keyword
    ], function(error, rows) {
console.log(rows)
        res.render('main', {
            data: {
                rentals: rows
            },
            vue: {
                meta: {
                    title: 'Page Title'
                },
                components: ['myheader', 'myfooter', 'searchform', 'results']
            }

        });

    })
    // next();

})

This is the component that I am trying to pass it to, but im not sure how to reference the data.

<template>
  <ul id="example-1">
    <li v-for="r in rentals">
      {{ r.id }}
    </li>
  </ul>
</template>

<script>
export default {
    // props: ['rentals'],

    data: function() {
        return {
          // rentals: rentals,
        }
    }
}
</script>

<style lang="css">
</style>

Here is the main.vue

<template>
<div id="wrap">
    <div class="col-md-1"></div>
    <div id="main-container" class="container col-md-10">

        <myheader></myheader>
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <searchform></searchform>
            <results></results>


        </div>
        <div class="col-md-4 text-center">

        </div>
        <div class="col-md-1"></div>


    </div>
</div>
<!-- <myfooter></myfooter> -->
</template>

When I use the vue-dev-tools it says there is not reactive state for the Results component and I'm getting this in the console "vue.js:515 [Vue warn]: Property or method "rentals" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in component )"

Here is example data from the console.log(rows) if ti helps with anything

[ RowDataPacket {
    id: 1,
    job_title: 'Software Engineer',
    job_desc: '<p>Ayo</p>',
    location: 'Akron, OH',
    job_type: 'Full-Time',
    salary: '',
    date_created: 2016-11-23T05:00:00.000Z,
    short_desc: '[email protected]',
    apply_url: 'Ayo',
    lat: '41.084821',
    lng: '-81.515607',
    distance: 0 },
  RowDataPacket {
    id: 2,
    job_title: 'Software Engineer',
    job_desc: '<p>Ayo</p>',
    location: 'Akron, OH',
    job_type: 'Full-Time',
    salary: '',
    date_created: 2016-11-23T05:00:00.000Z,
    short_desc: '[email protected]',
    apply_url: 'Ayo',
    lat: '41.084821',
    lng: '-81.515607',
    distance: 0 },
  RowDataPacket {
    id: 3,
    job_title: 'Software Engineer',
    job_desc: '<p>Ayo</p>',
    location: 'Akron, OH',
    job_type: 'Full-Time',
    salary: '',
    date_created: 2016-11-23T05:00:00.000Z,
    short_desc: '[email protected]',
    apply_url: 'Ayo',
    lat: '41.084821',
    lng: '-81.515607',
    distance: 0 } ]

An in-range update of vue-server-renderer is breaking the build 🚨

Version 2.2.5 of vue-server-renderer just got published.

Branch Build failing 🚨
Dependency vue-server-renderer
Current Version 2.2.4
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As vue-server-renderer is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes v2.2.5

Fixed

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Double app.$mount in generated page

Hi,

I'm trying your awesome project. I tried your example and if I check the source of generated code I see app.$mount('#app') twice.

Is it normal?

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
            <script src="https://unpkg.com/vue/dist/vue.js"></script>
        </head>
        <body>
            <div id="app"><div server-rendered="true"><h1>Express Vue</h1><p>Welcome to the Express Vue demo. Click a link:</p><input placeholder="edit me" value="Hello!"><message message="Hello!"></message><users users="[object Object],[object Object],[object Object]"></users></div></div>
            <script>
        (function () {
            'use strict'
            
            Vue.component('users', {props: ["title","users"],template: "<div class=\"\"><ul><li v-for=\"user in users\"><a v-bind:href=\"'/users/' + user.name\">{{ user.name }}</a></li></ul></div>",});
Vue.component('message', {props: ["message"],template: "<div class=\"\"><h1>{{message}}</h1></div>",});

            var createApp = function () {
                return new Vue(
                    {data: function(){return {"title":"Express Vue","message":"Hello!","users":[{"name":"tobi","age":12},{"name":"loki","age":14},{"name":"jane","age":16}]}},template: "<div><h1>{{title}}</h1><p>Welcome to the {{title}} demo. Click a link:</p><input v-model=\"message\" placeholder=\"edit me\"><message :message=\"message\"></message><users :users=\"users\"></users></div>",components: {},}
                )
            }
            if (typeof module !== 'undefined' && module.exports) {
                module.exports = createApp
            } else {
                this.app = createApp()
            }
        }).call(this)
        
        app.$mount('#app');
    </script>
            <script>app.$mount('#app')</script>
        </body>
    </html>

Import of third party components documentation

I can use my own components after setting componentsDir, but I failed using third-party components.
I tried to use both vue-multiselect and vue2-google-maps.

I tried to register vue-multiselect locally :

<template>
	<div>
		<multiselect v-model="selected" :options="options">
		</multiselect>
	</div>
</template>

<script>
import Multiselect from 'vue-multiselect'
export default {
	components: { Multiselect },
	data() {
		return {
			selected: null,
			options: ['list', 'of', 'options']
		}
	}
}
</script>

This lead to a Uncaught SyntaxError: Unexpected identifier because of a [native code] in generated script.

Then, I tried to register vue-multiselect globally in the layout, it works !

<!-- Layout.vue -->
<template>
	<!DOCTYPE html>
	<html lang="en">
		<head>
			<meta charset="UTF-8">
			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
			<link href="/static/style.css" rel="stylesheet" type="text/css"></link>
			<script src="/static/scripts/vue.js"></script>
			<script src="/static/scripts/vue-resource.js"></script>
			<script src="/static/scripts/lodash.js"></script>
			<script src="https://unpkg.com/[email protected]"></script>
			<link href="https://unpkg.com/[email protected]/dist/vue-multiselect.min.css" rel="stylesheet" type="text/css"></link>
			<script>
				Vue.component('multiselect', VueMultiselect.Multiselect)
			</script>
		</head>
		<body class="container">
			{{{app}}}
			{{{script}}}
		</body>
	</html>
</template>

<script>
</script>

<style>
</style>

<!-- AView.vue -->
<template>
	<div>
		<multiselect v-model="selected" :options="options">
		</multiselect>
	</div>
</template>

<script>
export default {
	data() {
		return {
			selected: null,
			options: ['list', 'of', 'options']
		}
	}
}
</script>

But this way of registering does not work for vue2-google-maps because it appends elements on document.body and body is not yet initialized.

Is there any way of registering third party components not globally in the header of the layout ?

Trouble deploying in Heroku

Not sure if/where you have tried to deploy but I am again having trouble debugging issue where components render fine in local Mac OS X environment. When deploying on Heroku, app boots up fine, no errors but the components don't render. When inspecting the rendered pages locally and remotely on heroku the difference appears to be that locally the components become embedded code and on Heroku they become Vue.component('modal', {template: "...}). When the component: is activated Vue throws an error.

Any thoughts here on how to debug this one? It doesn't seem like a path problem. It appears to find the components properly when starting up.

Thanks in advance for your help.

-- Got it working. Not sure how exactly. Very strange.

Update:

Tried adding mixins, which required me grabbing latest version of express-vue. Now the Vue.Components() are back and the components don't render. Not sure what is going on and I can replicate on Mac and Heroku environments.

Does express-vue support dynamically changeable data push to the DOM?

Does express-vue bind the data variables so that changes are pushed to the DOM in real time?

For example, I have the code block in Node.js:

var myVar = 1;    

app.get('/', function(req, res){
  res.render('index', {
    data:  {
        displayVar: myVar
    },
    vue: {
        components: ['mycomp']
    }
  });
});

This displays '1' in my component view as expected.

However, I would expect that by Vue.js standards, if I updates myVar to say, myVar = 2 via a timed function elsewhere in my code, that {{ displayVar }} in my view would change to say '2'? At the moment the new result doesn't show unless I manually refresh the page.

Or do I have my understanding completely wrong of how express-vue is supposed to work?

passing express res.locals to template

A great library, but I'm trying to pass my object req.user to the template and i fails.

  `app.use(function(req, res, next) {
    res.locals.user = req.user;
    next();
    });
    

     exports.loginGet = function(req, res) {
      if (req.user) {
     return res.redirect('/');
    }

  res.render('account/login', {
       vue: {
      head: {
          title: '',
          head: [
              { property:'og:title', content: 'Page Title'},
              { name:'twitter:title', content: 'Page Title'},
          ]
      }
  }
});

};`

How can I pass the user object to all vue files as a global data?

No components in the layout vue

Hi,
you say in the documentation for the Components :
"Note: This isn't available in the layout.vue file yet, only the .vue files you specify in your express route."

How can i for example, have a nav bar component, a side bar component that stay on the page regardless of the route ? is it impossible at the moment ?

Can I use with `vue-router`?

This library is very useful.
But I have 2 questions found while I'm using:

  1. Can I import custom component from View?
    For example:
<script>
import myComponent from '../Components/myComponent.vue'
...
</script>
  1. Can I use with vue-router?
    I'm webpack's user, I love use vue template with webpack ( https://github.com/vuejs-templates/webpack ). But I don't know how to import custom route like route.js in template.

Finally, I love you, @danmademe

callback function required

Hey!

I'm getting this error:

throw new Error('callback function required');

My code is the example code

const http = require('http');
const express = require('express');
const expressVue = require('express-vue');

const app = express();

app.set('vue', {
    rootPath: __dirname + '/',
    layoutsDir: 'routes/',
    componentsDir: 'components/',
    defaultLayout: 'layout'
});
app.engine('vue', expressVue);
app.set('view engine', 'vue');

app.get('/', (req, res) => {
  res.render('main', {
      data : {
          otherData: 'Something Else'
      },
      vue: {
          meta: {
              title: 'Page Title',
          },
          components: ['myheader', 'myfooter']
      }

  });
});

http.createServer(app).listen(config['http-port'], config.ipAddress);

Why does express is telling me there is no callback?

render data in layout

hi, I am refacing one h5 project with express+hbs to express+vue2+ssr.

now i put some class in the body tag by device type, like:

<body class="{{#if isApp}}app{{/if}} {{#if isiOS}}ios{{/if}} {{#if isAndroid}}android{{/if}} ">

to:

<body :class="{...}" >

now i can't get data in the layout file. could you add this feature?

Better Readme

I've been thinking of writing a better readme. I'm worried that people might not be understanding it.

If anyone has any suggestions here is the place

Main `app` and `script` text interpolation doesn't work with spaces

When I put main elements to my main app layout like this:

{{{app}}}
{{{script}}}

Everything works fine, but when I add spaces (too make code look cleaner) code is broken:

{{{ app }}}
{{{ script }}}

Stack Trace:

Error: I had an error processing this script.


    at scriptParser (/home/mrmnmly/node_modules/express-vue/dist/parser/index.js:88:23)
    at /home/mrmnmly/node_modules/express-vue/dist/parser/index.js:113:26
    at tryToString (fs.js:455:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)
Error: I had an error processing this script.


    at scriptParser (/home/mrmnmly/node_modules/express-vue/dist/parser/index.js:88:23)
    at /home/mrmnmly/node_modules/express-vue/dist/parser/index.js:113:26
    at tryToString (fs.js:455:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)

It's not a big deal, but personally I really prefer to put spaces between curly braces and variables - it looks way cleaner :)

support change the .vue suffix to html

Description of Issue

I want to change the .vue suffix to html,but it not work,Will you support it?,some ide Can not know it correctly

Stack Trace / Console Log

Error: Cannot find module 'html'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at new View (F:\git\Sblog\node_modules\express\lib\view.js:78:30)
at Function.render (F:\git\Sblog\node_modules\express\lib\application.js:569:12)
at ServerResponse.render (F:\git\Sblog\node_modules\express\lib\response.js:960:7)
at F:\git\Sblog\app.js:48:7
at Layer.handle_error (F:\git\Sblog\node_modules\express\lib\router\layer.js:71:5)
at trim_prefix (F:\git\Sblog\node_modules\express\lib\router\index.js:310:13)
at F:\git\Sblog\node_modules\express\lib\router\index.js:280:7
at Function.process_params (F:\git\Sblog\node_modules\express\lib\router\index.js:330:12)
at next (F:\git\Sblog\node_modules\express\lib\router\index.js:271:10)
at Layer.handle_error (F:\git\Sblog\node_modules\express\lib\router\layer.js:67:12)
at trim_prefix (F:\git\Sblog\node_modules\express\lib\router\index.js:310:13)
at F:\git\Sblog\node_modules\express\lib\router\index.js:280:7

Additional Comments

Hyphen in component name leads to component not being rendered

Description of Issue

According to the vue/W3C documentation, custom tags allow a hyphen in the component name (encourage it even), but express-vue appears unable to load a component with a hyphen in the name. I recently tried to add a 'star-rating' component from an older project into a project using express-vue, but it would only work when I renamed the file to 'starrating'.

Stack Trace / Console Log

N/A

No errors on the console or the browser, the component is just not rendered. If I check the html my form view still reads <star-rating></star-rating>

Additional Comments

More of a question, but... is there a way to inject a component directly, without relying on the autodetection from the views/component directory? I have a couple of small input type components living in their own modules, but there appears to be no convenient way to inject them into my views.

Help regarding serving data to vue template

Sorry for raising a issue for this question - I couldn't see a place to just raise a question.

I've currently got express-vue working with express and passport but my goal is to have the application retrieve information from a firebase database and display that information on an authenticated-only page.

I achieved this prior with vuefire but I am not 100% how to get it working with passport.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.