在laravel应用程序中安装npm软件包

时间:2019-07-01 06:16:01

标签: php laravel npm

我想现在就部署我的laravel应用程序,而在这样做之前,我只想了解npm软件包,我应该安装它们还是将其保持原样?

该应用无需运行npm install就可以正常运行。

应用程序大小为20000页,如果我运行npm安装,它将为32000。

这里有什么帮助吗?如果我安装了所有软件包,下一步该怎么办?

    "devDependencies": {
    "axios": "^0.18",
    "bootstrap": "^4.1.0",
    "cross-env": "^5.1",
    "jquery": "^3.2",
    "laravel-mix": "^4.0.7",
    "lodash": "^4.17.5",
    "popper.js": "^1.12",
    "resolve-url-loader": "^2.3.1",
    "sass": "^1.15.2",
    "sass-loader": "^7.1.0",
    "vue": "^2.5.17"
}

1 个答案:

答案 0 :(得分:1)

上面显示的程序包都是开发依赖项,因此只需要在计算机上进行开发即可。以后使用res = ['M564839','575-439','26-59-29','888489'] 0 01 012 0123 01234 for i in 0...4{ for j in stride(from: 4, to: i, by: -1){ print( terminator : " ") } for k in 0...i{ print(k,terminator : "") } print(" ") } 54321 5432 543 54 5 for i in stride(from: 0, to: 5, by: 1){ for j in stride(from: 5, to: i, by: -1){ print(j , terminator : "") } print(" ") } 5 5 4 5 4 3 5 4 3 2 5 4 3 2 1 for i in stride(from: 5, to: 0, by: -1) { for j in stride(from: 5, to: i-1, by: -1){ print(j , terminator : "") } print(" ") } 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 for i in stride(from: 5, to: 0, by: -1) { for j in 1...i{ print(j, terminator : "") } print(" ") } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 var value = 0 for i in 1...5 { for j in 1...i{ value = value + 1 print(value,terminator : "") } print(" ") } 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 for i in 1...5{ for j in 1...i{ print(i+1 - j , terminator : "") } print(" ") } for i in 1...5{ for j in stride(from: i, to: 0, by: -1){ print(j, terminator : "") } print(" ") } 1 2 7 3 8 13 4 9 14 19 5 10 15 20 25 var value = 0 for i in 1...5{ for j in 1...i{ if j != 1{ value = value + 5 } else{ value = i } print(value , terminator : " ") } print(" ") } for i in 1...5{ var temp = i for j in 0...i{ print(temp , terminator : " ") temp = temp + 5 } print(" ") } 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 4 5 4 3 2 1 var value = 1 for i in 1...5{ for j in 1...i{ print(j,terminator : "") } for k in 1..<i{ print(i-k,terminator : "") } print(" ") } 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 for i in stride(from: 5, to: 0, by: -1){ for k in stride(from: 5, to: i, by: -1) { print(terminator : " ") } for j in stride(from: 1, to: i+1, by: 1){ print("*",terminator : " ") } print(" ") } 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 for i in 1...5{ for j in stride(from: 5, to: i, by: -1){ print(i,terminator : "") } var temp = 1 for k in 1...i{ print(temp,terminator : "") temp = temp * (i - k) / (k); } print(" ") } 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 for i in 1...5{ for k in stride(from: 5, to: i, by: -1) { print(terminator : " ") } for j in 1...i{ print(j,terminator : " ") } print(" ") } for i in stride(from: 5, to: 0, by: -1){ for k in stride(from: 5, to: i-1, by: -1) { print(terminator : " ") } for j in stride(from: 1, to: i, by: 1){ print(j,terminator : " ") } print(" ") } 12345 2345 345 45 5 5 45 345 2345 12345 for i in 1...5{ for j in stride(from: i, to: 6, by: 1){ print(j , terminator : "") } print(" ") } for i in stride(from: 5, to: 0, by: -1) { for j in stride(from: i, to: 6, by: 1){ print(j,terminator : "") } print(" ") } 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 for i in 1...5{ for k in 0...i{ print(terminator : " ") } for j in stride(from: i, to: 6, by: 1){ print(j , terminator : " ") } print(" ") } 12345 2345 345 45 5 5 45 345 2345 12345 for i in 1...5{ for k in 1...i{ print(terminator : " ") } for j in stride(from: i, to: 6, by: 1){ print(j , terminator : "") } print(" ") } for i in stride(from: 5, to: 0, by: -1) { for k in 1...i{ print(terminator : " ") } for j in stride(from: i, to: 6, by: 1){ print(j,terminator : "") } print(" ") } 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 5 4 5 3 4 5 2 3 4 5 1 2 3 4 5 for i in 1...5{ for k in 0...i{ print(terminator : " ") } for j in stride(from: i, to: 6, by: 1){ print(j , terminator : " ") } print(" ") } for i in stride(from: 6, to: 1, by: -1){ for k in 1...i{ print(terminator : " ") } for j in stride(from: i-1, to: 6, by: 1){ print(j , terminator : " ") } print(" ") } 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 for i in 0...4{ for j in 0...i{ if j % 2 == 0{ print(1,terminator : " ") } else{ print(0,terminator : " ") } } print(" ") } 1 0 0 0 0 0 2 0 0 0 0 0 3 0 0 0 0 0 4 0 0 0 0 0 5 for i in 1...5{ for j in 1...5{ if j == i{ print(j,terminator : " ") } else{ print(0,terminator : " ") } } print(" ") } 构建它时,它将转换为JS代码。

因此,如果您说它可以在您要部署该应用的生产服务器上运行,则意味着您拥有可以在服务器上全局访问的软件包,否则将无法100%工作。

>

因此,您无需运行npm run dev,因为这会同时安装所有npm run prodnpm install,因此您应该使用dependencies(或{{1 }})仅安装devDependencies,而不安装npm install --only=prod,无论NODE_ENV环境变量的值如何。

注意:如果您的package.json中没有--only=production,则无需在生产服务器上执行此操作。