前端框架的命令代码
-
node.js 框架
(1) , npm init
(2) , npm install express
(3), npm install fs
(4), npm install multer
(5), npm install cookie-parser
(6),npm install art-template
(7) , npm index.js 最后运行文件 -
vue 框架
(1), 创建一个vue项目 vue init webpack + 项目名字
(2),命令:npm install vux --save
(3),npm install vux-loader --save
(4),配置项目,build/webpack.base.conf.js里面修改
const vuxLoader = require(‘vux-loader’)
const webpackConfig = originalConfig //原来的module.exports 代码赋值给变量 webpackConfig
module.exports = vuxLoader.merge(webpackConfig , {
plugins:[‘vux-ui’]
})
(5)npm install vue-style-loader
npm install css-loader
npm install less
npm install less-loader
配置jQuery
1.终端引入npm install jquery --save
2.在bulid/webpack.base.conf.js配置项目
var webpack = require(‘webpack’)
在webpackConfig里面写
plugins:[
new webpack.ProvidePlugin({
$:‘jquery’,
jquery:‘jquery’,
jQuery:‘jquery’,
‘window.jQuery’:“jquery”
})
]
3.在main.js里面写 import “jquery”