Giter VIP home page Giter VIP logo

vue2's Introduction

vue2.0-demo

捣鼓捣鼓vue2.0 使用 Material 风格 后面会加入大量微动效

环境

nodejs >= v7.0 (当然,更新到最新也是极好的,可以享受最新功能)

安装

克隆仓库到本地

git clone [email protected]:leenty/vue2.git

安装依赖

npm i

安装命令行工具lebo

npm i -g lebo

创建文章目录

lebo article --mkdir
# 简写
lebo a -m

创建文章

lebo article --create 'demo'
# 简写
lebo a -c 'demo'

创建文章路由

lebo article --render
# 简写
lebo a -r

新建文章及路由生成

$ lebo -h
  Usage: cli <command> [options]

  Options:
    -V, --version  查看版本号
    -h, --help     查看帮助

  Commands:
    article|a [options]   创建文章和创建文章路由
    init|i <name>         创建项目(开发中)

$ lebo article -h
  Usage: article|a [options]
  创建文章和创建文章路由

  Options:
    -r, --render            生成文章路由
    -c, --create <article>  生成名为<article>的文章
    -m, --mkdir             生成文章目录
    -h, --help              查看帮助

当前css规则

css命名使用 BEM+emmet 风格作为命名规范

约定[分类名称|模块名称][属性|组件名称]与[属性名]使用小写
约定[描述]与[状态]使用首字母大写
[eg]:
 .[分类名称|模块名称]__[子分类|子模块]-[属性|组件名称][描述]--[属性值|状态]
   => .l-flexV--c
   => .b-base--Active
   => .fg-offset-12
   => .fg__pad-offset-12

 1.约定 [分类名称|模块名称] 缩写:
   • .layout => .l- (布局部分)
   • .utils => .u- (工具部分)
   • .button => .b- (按钮部分)
   
 2.约定通用 [属性] 缩写:(以emmet联想风格为缩写)
   • width => w
   • height => h
   • color => c
   • background => bg
   • margin => m
   • padding => p
   • border => bd
   
 3.约定通用 [组件名称]:(这里不使用缩写,
   因为组件名可以自定义,缩写易混淆,会增加记忆成本)
   • flex => flex (这里所指的是弹性盒子)
   
 4.约定通用 [描述] 缩写:(以大写)
   • horizontal => H
   • vertical => V
   • normal => N
   
 5.约定通用 [属性值] 缩写:(以属性前缀 '--' + emmet联想风格为缩写)
   • center => --c
   • middle => --m
   • space-around => --sa
   
 6.约定通用 [状态] 缩写:(以属性前缀 '--' + 状态首字母大写,
   这里不使用缩写,因为状态名可以自定义,缩写易混淆,会增加记忆成本)
   • active => --Active

vue2's People

Contributors

leenty 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

vue2's Issues

请问

跑 “ npm run article ” 提示找不到 脚本文件 “build/new-article.js" 该如何解决?

npm 依赖error

亲。跑不起来。 Windows 下 无论是 npm install 还是您的教程 npn i 都是报错的 项目跑不起来 怎么解决哟
npm i error
npm install error

npm run dev/npm run article -- -r 报错

Node 版本 6.5.0/6.9.2 NPM版本 4.4.4 MacOS
换了两台电脑试,一样的问题,npm install 没有报错

➜ vue2 git:(master) npm install
➜ vue2 git:(master)

➜ vue2 git:(master) npm run dev

[email protected] dev /Users/mac/vue/vue2
node build/dev-server.js

Listening at http://localhost:8090

webpack: wait until bundle finished: /index.html
webpack built 8f9293436abdf1b59677 in 6138ms
Hash: 8f9293436abdf1b59677
Version: webpack 1.14.0
Time: 6138ms
Asset Size Chunks Chunk Names
app.js 2.62 MB 0 app

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-1.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:122-156

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-2.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:260-294

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-3.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:398-432

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-4.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:536-570

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-5.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:674-708

ERROR in ./src/articlesRoutes.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./md/articles/vue2-6.md in /Users/mac/vue/vue2/src
@ ./src/articlesRoutes.js 6:812-846
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 1.47 MB 0
webpack: Failed to compile.

➜ vue2 git:(master) npm run article -- -r

[email protected] article /Users/mac/vue/vue2
node build/new-article.js "-r"

/Users/mac/vue/vue2/build/create-router.js:14
resolve(files.filter(v => v.slice(-3) === '.md'))
^

TypeError: Cannot read property 'filter' of undefined
at /Users/mac/vue/vue2/build/create-router.js:14:20
at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] article: node build/new-article.js "-r"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] article script 'node build/new-article.js "-r"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue2.0-demo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/new-article.js "-r"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue2.0-demo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue2.0-demo
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mac/.npm/_logs/2017-03-27T09_28_26_462Z-debug.log
➜ vue2 git:(master)

请问

这个 是用 Hbuilder直接打包的吗?

好看

我可以拿来做我的blog模板吗?

小小后端一枚,不会写页面。

假如不可以的话。我就抄一下。

npm run article -- -r 报错

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'article',
1 verbose cli '--',
1 verbose cli '--help' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prearticle', 'article', 'postarticle' ]
5 info prearticle [email protected]
6 info article [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec article script
9 verbose stack Error: [email protected] article: node build/new-article.js "--help"
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:827:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd C:\vue2
12 error Windows_NT 10.0.10586
13 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "article" "--" "--help"
14 error node v4.4.4
15 error npm v2.15.1
16 error code ELIFECYCLE
17 error [email protected] article: node build/new-article.js "--help"
17 error Exit status 1
18 error Failed at the [email protected] article script 'node build/new-article.js "--help"'.
18 error This is most likely a problem with the vue2.0-demo package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error node build/new-article.js "--help"
18 error You can get information on how to open an issue for this project with:
18 error npm bugs vue2.0-demo
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls vue2.0-demo
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

一个小小的疑问。

这个demo很酷!
有个小疑问:组件(模块)之间的切换动画(过渡效果)是怎么实现的?是用了第三方类库吗?

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.