Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js node:npm install::如何获取以下情况下的文件路径并测试示例_Node.js_Npm - Fatal编程技术网

Node.js node:npm install::如何获取以下情况下的文件路径并测试示例

Node.js node:npm install::如何获取以下情况下的文件路径并测试示例,node.js,npm,Node.js,Npm,我正在阅读有关mathquill的文章,找到了解释如何安装和使用的页面 其来源: 据我所知,我将使用以下linux命令安装mathquill mkdir test cd test npm init npm i mathquill touch test.js inside test.js我放了 <link rel="stylesheet" href="/path/to/mathquill.css"/> <script src=&quo

我正在阅读有关mathquill的文章,找到了解释如何安装和使用的页面

其来源:

据我所知,我将使用以下linux命令安装mathquill

mkdir test
cd test
npm init
npm i mathquill
touch test.js
inside test.js我放了

<link rel="stylesheet" href="/path/to/mathquill.css"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="/path/to/mathquill.js"></script>
 
<p>
  Solve <span id="problem">ax^2 + bx + c = 0</span>:
  <span id="answer">x=</span>
</p>
 
<script>
  var MQ = MathQuill.getInterface(2);
  MQ.StaticMath($('#problem')[0]);
  var answer = MQ.MathField($('#answer')[0], {
    handlers: {
      edit: function() {
        checkAnswer(answer.latex());
      }
    }
  });
</script> 


求解ax^2+bx+c=0:
x=

var MQ=MathQuill.getInterface(2); MQ.StaticMath($('问题')[0]); var answer=MQ.MathField($('#answer')[0]{ 处理程序:{ 编辑:函数(){ checkAnswer(answer.latex()); } } });
现在在上面,我如何知道
/path/to/mathquill.js
/path/to/mathquill.css

现在如何运行
index.js

您可以,这更方便

或者从GitHub下载源代码并自己提供

app
|_ scripts
  |_ mathquill.js
  |_  index.js
|_ css
  |_ mathquill.css

那么
npm i mathquill