Vue項目經驗2

前提使用好了cnmp

cd  

cnpm install

.eslintrc.js

配置代碼風格

  rules: {
    // allow async-await
    'generator-star-spacing': 'off',
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
    'semi': ['error', 'always'],
    'indent': 'off',
    'vue/script-indent': ['error', 2, {'baseIndent': 1}],
    'space-before-function-paren': ['error', {'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always'}]
     

npm run lint --fix  修復代碼風格

 

npm run dev

cnpm install --save babel-polyfill fastclick

cnpm install --save-dev node-sass sass-loader

 

增加別名,方便配置

 

再次使用就

npm start

注意bug

此處需要換行

cnpm install --save axios jsonp vue-awesome-swiper

npm run build 打包

 

 

 

 

 

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章