简体   繁体   English

在带有引导程序的nodejs中使用pkg

[英]Using pkg in nodejs with bootstrap

My question is related to pkg 我的问题与pkg有关

My project strucutre is like this 我的项目结构就是这样

node_modules node_modules

bootstrap 引导程序

dist dist

jquery jQuery的

dist dist

popper.js popper.js

dist dist

index.html index.html
package.json package.json
script.js script.js
main.js main.js

According to the documentation , in package.json, I need to add 根据文档 ,在package.json中,我需要添加

"pkg": {
"scripts": "build/**/*.js",
"assets": "views/**/*"
}

I didn't understand this line: 我不明白这一行:

"scripts": "build/**/*.js",

In my case should I write something like this ? 就我而言,我应该写这样的东西吗?

"scripts": "node_modules/**/dist/*.js",

Solved. 解决了。 I added this code in package.json: 我在package.json中添加了以下代码:

  "pkg": {
"assets": ["index.html",
  "script.js", "style.css", "node_modules/jquery/dist/jquery.js", "node_modules/jquery/dist/jquery.min.js", "node_modules/popper.js/dist/umd/popper.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js", "canvasjs/jquery.canvasjs.min.js"
]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM