Skip to content

leinue/vue-seeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

vue-seeds

download

git clone git@github.com:leinue/vue-feeds.git

run

ไฝฟ็”จ8080็ซฏๅฃ๏ผŒๆณจๆ„8080็ซฏๅฃๅˆซ่ขซๅ ็”จ

npm install
npm run dev

or

npm install
webpack

or

npm install
webpack-dev-server

error

ๅฆ‚ๆžœๅ‡บ็Žฐ็ฑปไผผไปฅไธ‹้”™่ฏฏ

npm ERR! peerinvalid The package babel-runtime@6.3.19 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer vue-loader@7.5.3 wants babel-runtime@^5.8.0

ๆ‰“ๅผ€package.jsonๆ–‡ไปถ๏ผŒไฟฎๆ”นbabel-runtime็‰ˆๆœฌๅทไธบ^5.8.0ๅณๅฏ

vim package.json
/babel-runtime

view

index menu2

package.json

{
  "name": "poimoe_poi",
  "version": "0.0.1",
  "description": "", 
  "main": "index.js",
  "scripts": {
    "dev": "webpack-dev-server --inline --hot --quiet",
    "build": "export NODE_ENV=production && webpack --progress --hide-modules"
  },  
  "private": true,
  "author": "", 
  "license": "ISC",
  "devDependencies": {
    "babel-core": "^6.2.1",
    "babel-loader": "^6.2.0",
    "babel-plugin-transform-runtime": "^6.1.18",
    "babel-preset-es2015": "^6.1.18",
    "babel-preset-stage-0": "^6.3.13",
    "babel-runtime": "^5.8.0",
    "bootstrap": "^3.3.6",
    "css-loader": "^0.23.0",
    "file-loader": "^0.8.5",
    "jsx-loader": "^0.13.2",
    "style-loader": "^0.13.0",
    "url-loader": "^0.5.7",
    "vue": "^1.0.10",
    "vue-hot-reload-api": "^1.2.2",
    "vue-html-loader": "^1.0.0",
    "vue-loader": "^7.1.7",
    "vue-resource": "^0.5.1",
    "vue-router": "^0.7.7",
    "vue-strap": "^1.0.2",
    "webpack": "^1.12.9",
    "webpack-dev-server": "^1.14.0"
  }
}

webpack.config.js

module.exports = {
    entry: './src/index.js',
    output: {
        path: __dirname,
        filename: './dist/build.js'
    },
    module: {
        loaders: [
            { test: /\.vue$/, loader: 'vue' },
            { test: /\.css$/, loader: "style!css" },
            { test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' },
            { test: /\.js$/, loader: 'jsx-loader?harmony' },
            { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
            { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff2" },
            { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
            { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" },
            { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" }
        ]
    },
    babel: {
        presets: ['es2015', 'stage-0'],
        plugins: ['transform-runtime']
    },
    resolve: {
        //่‡ชๅŠจๆ‰ฉๅฑ•ๆ–‡ไปถๅŽ็ผ€ๅ๏ผŒๆ„ๅ‘ณ็€ๆˆ‘ไปฌrequireๆจกๅ—ๅฏไปฅ็œ็•ฅไธๅ†™ๅŽ็ผ€ๅ
        extensions: ['', '.js', '.json', '.css'],
        //ๆจกๅ—ๅˆซๅๅฎšไน‰๏ผŒๆ–นไพฟๅŽ็ปญ็›ดๆŽฅๅผ•็”จๅˆซๅ๏ผŒๆ— ้กปๅคšๅ†™้•ฟ้•ฟ็š„ๅœฐๅ€
        alias: {
            'vue-strap': './node_modules/vue-strap/dist/vue-strap.min.js'
        }
    }
}

if (process.env.NODE_ENV === 'production') {
  module.exports.plugins = [ 
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: '"production"'
      }   
    }), 
    new webpack.optimize.UglifyJsPlugin({
      compress: {
        warnings: false
      }   
    }), 
    new webpack.optimize.OccurenceOrderPlugin()
  ]
} else {
  module.exports.devtool = '#source-map'
}

file tree

.
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ node_modules
โ”‚ย ย  โ”œโ”€โ”€ babel-core
โ”‚ย ย  โ”œโ”€โ”€ babel-loader
โ”‚ย ย  โ”œโ”€โ”€ babel-plugin-transform-runtime
โ”‚ย ย  โ”œโ”€โ”€ babel-preset-es2015
โ”‚ย ย  โ”œโ”€โ”€ babel-preset-stage-0
โ”‚ย ย  โ”œโ”€โ”€ babel-runtime
โ”‚ย ย  โ”œโ”€โ”€ bootstrap
โ”‚ย ย  โ”œโ”€โ”€ css-loader
โ”‚ย ย  โ”œโ”€โ”€ file-loader
โ”‚ย ย  โ”œโ”€โ”€ jsx-loader
โ”‚ย ย  โ”œโ”€โ”€ style-loader
โ”‚ย ย  โ”œโ”€โ”€ url-loader
โ”‚ย ย  โ”œโ”€โ”€ vue
โ”‚ย ย  โ”œโ”€โ”€ vue-hot-reload-api
โ”‚ย ย  โ”œโ”€โ”€ vue-html-loader
โ”‚ย ย  โ”œโ”€โ”€ vue-loader
โ”‚ย ย  โ”œโ”€โ”€ vue-resource
โ”‚ย ย  โ”œโ”€โ”€ vue-router
โ”‚ย ย  โ”œโ”€โ”€ vue-strap
โ”‚ย ย  โ”œโ”€โ”€ webpack
โ”‚ย ย  โ””โ”€โ”€ webpack-dev-server
โ”œโ”€โ”€ npm-debug.log
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ 404.vue
โ”‚ย ย  โ”œโ”€โ”€ app.vue
โ”‚ย ย  โ”œโ”€โ”€ commons
โ”‚ย ย  โ”œโ”€โ”€ components
โ”‚ย ย  โ”œโ”€โ”€ config.js
โ”‚ย ย  โ”œโ”€โ”€ filters
โ”‚ย ย  โ”œโ”€โ”€ index.js
โ”‚ย ย  โ”œโ”€โ”€ npm-debug.log
โ”‚ย ย  โ”œโ”€โ”€ routes.js
โ”‚ย ย  โ””โ”€โ”€ services
โ””โ”€โ”€ webpack.config.js

About

๐Ÿ‰Vue seeds, now recommending vue-cli.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published