Giter Site home page Giter Site logo

create-vue-app's Introduction

create-vue-app

NPM version NPM downloads CircleCI donate chat

Features

  • No config until you need, thanks to Poi.
    • Support all CSS preprocessors and CSS modules
    • Hot mode reloading
  • Unit tests with Jest with no config by default thanks to Tyu.
  • Progressive Web App by default, thanks to poi-preset-offline and offline-plugin.

Install

yarn global add create-vue-app

Usage

# Generate project in cwd
mkdir my-vue-app && cd my-vue-app
create-vue-app .

# Generate project in specific folder
create-vue-app my-vue-app
cd my-vue-app

Alternatively, if you have Yarn^0.24, you can use the yarn create command:

yarn create vue-app my-vue-app

Folder structure

.
├── README.md
├── index.ejs
├── package.json
├── poi.config.js
├── src
│   ├── components
│   │   ├── App.test.js
│   │   └── App.vue
│   ├── index.js
│   └── polyfills.js
├── static
│   └── favicon.ico
└── yarn.lock

Recipes

FAQ

Where are the docs?

This project is using Poi under the hood, so for most questions, hopefully go to this page and you will get the answer.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

create-vue-app © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @_egoistlily

create-vue-app's People

Contributors

bmaland avatar egoist avatar mistakenelf avatar pomle avatar realzcong avatar tatyshev avatar yevhenorlov 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

create-vue-app's Issues

--type=web ??

In the example we see --type=web. Are there any other types supported?

I think this should be added to the docs.

ava tests don't work with module import path contains "@/pathname" which is supported by poi

One of the things I like about Poi, is a feature to use @ to target the source root in module imports.

Example:

@/store/mutation-types

instead of

../../../store/mutation-types

but AVA tests cannot resolve paths with @ in them because its web-pack specific. Is there a work around for it?

might switch to https://github.com/egoist/tyu for testing if its too much trouble to make ava work. tyu has the right configuration in jest wrapper.

    moduleNameMapper: {
      '^@/(.*)$': '<rootDir>/src/$1'
    }

Syntax error when creating new app

I run this command
ag_systems:~/workspace $ create-vue-app my-app
I got this error

/home/ubuntu/workspace/node_modules/create-vue-app/bin/init.js:23
    const {overWrite} = yield inquirer.prompt([{
          ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/create-vue-app/bin/cva.js:23:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10) ```

Spelling error

Environment: Windows 10 with yarn 1.16.0 & [email protected]
Describe:
Using create-vue-app, it show "descirpe" instead "describe" while asking some package-lock.json information
Error Reproduction: $yarn create vue-app myapp

minimum node version error message

i had accidentally started it under node 5.x and received the following error. a minimum major version check would be nice :)

would love to send a pull request, but have no idea where to start...

/usr/local/lib/node_modules/create-vue-app/bin/init.js:23
    const {overWrite} = yield inquirer.prompt([{
          ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/create-vue-app/bin/cva.js:23:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

Replace vbuild with vue-scripts

I want to make create-vue-app act like create-react-appwhich:

  • needs no config but using env variables
  • is not extensible, you can't modify webpack config

We might also provide a vue-scripts eject command just like what react-scripts eject does

win7 cmd create error;

system:win7;
error:The filename, directory name, or volume slogan method is not correct.

image

Testing with async/await!?

Been using create-vue-app for my first project. Complained about imports in my tests and then async/await which are pretty standard for my ava testing workflows.

import test from 'ava'

test('create environment', async t => {
  // ...
  t.pass()
})

$ ava test/services/environment/create-env.test.js
/Users/kristianmandrup/repos/tecla5/red-forms/test/services/environment/create-env.test.js:1
(function (exports, require, module, __filename, __dirname) { import _regeneratorRuntime from 'babel-runtime/regenerator';
^^^^^^
SyntaxError: Unexpected token import


But looking at [vue-app](https://www.npmjs.com/package/babel-preset-vue-app) preset it should have all I need included!?

I got rid off the error my patching the `package.json` configuration as follows: 

"babel": {
"presets": [
"env"
],
"plugins": [
"transform-runtime"
]
},
"ava": {
"babel": "inherit",
"require": [
"./test/helpers/setup.js",
"babel-register",
"babel-polyfill"
]
},



Now the unit test [recipe](https://github.com/avajs/ava/blob/master/docs/recipes/vue.md) seems to be "turned off"?

I guess overriding with "env" preset kills it?

"presets": [
  "env"
],

Please advice on how to best setup ava testing with working async/await and imports without screwing with the default setup. Now my fetch API is also complaining that `Headers` are not defined, ie. that the `browser-env` is switched off.

Thanks :)

Upgrade to poi 10.x

Is this still the preferred way to start a new vue project with poi? If so can you please update the package to use 10.x because this no longer works due to all the breaking changes from 9 -> 10

.gitignore?

Should create-vue-app generate .gitignore file automatically?

Missing babel-preset-vue-app

Booting a new app created using create-vue-app fails with the following error:

missing babel preset: following babel preset is not found in ~/tmp/myvueapp:

- babel-preset-vue-app

I believe it is caused by this commit: egoist/poi@813e6b3

Creating custom html output.

Using vbuild we could change html output in html-webpack-plugin options according to docs.
Do we have such ability with create-vue-app?

In my case I need to add some google fonts for Material Design.

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.