Files
vue-cli/docs
Ray Foss 62e2868007 docs: Include Tip about computed env vars (#1780)
* Include tip about computed env vars

I'm personally using this frivolously in my own footer
```
// vue.config.js
const revision = require('child_process').execSync('git rev-parse HEAD').toString().trim()
const pjson = require('./package.json')

process.env.VUE_APP_COMMIT = `"${revision}"`
process.env.VUE_APP_VERSION = `"${pjson.version}"`
module.exports = {}
```

```
<template>
  <footer>
      <span>v{{ version }} ({{ commit }})</span>
  </footer>
</template>

<script>
export default {
  data: function () {
    return {
      version: process.env.VUE_APP_VERSION,
      commit: process.env.VUE_APP_COMMIT
    }
  }
}
```

# Validation
 - I'm using this.
 - The inline require doesn't cause lint issues on vue-cli v3 config files. I did a full builds to check.

* tip format match

* tip format

* tip, format

* markdown formatting conflicts with es6 templates

Also, quotes, optional now. interesting. I tried it.

* remove template stray

* filenames are not proper english grammar, yet
2018-07-11 01:28:04 +02:00
..
2018-07-02 18:39:42 -04:00

home, heroImage, actionText, actionLink, footer
home heroImage actionText actionLink footer
true /logo.png Get Started → /guide/ MIT Licensed | Copyright © 2018-present Evan You

Feature Rich

Out-of-the-box support for Babel, TypeScript, ESLint, PostCSS, PWA, Unit Testing & End-to-end Testing.

Extensible

The plugin system allows the community to build and share reusable solutions to common needs.

No Need to Eject

Vue CLI is fully configurable without the need for ejecting. This allows your project to stay up-to-date for the long run.

GUI on top of the CLI

Create, develop and manage your projects through an accompanying graphical user interface.

Instant Prototyping

Instantly prototype new ideas with a single Vue file.

Future Ready

Effortlessly ship native ES2015 code for modern browsers, or build your vue components as native web components.

Getting Started

npm install -g @vue/cli
# OR
yarn global add @vue/cli

vue create my-project