如何安装没有互联网连接的jshint

时间:2017-11-22 12:44:31

标签: npm visual-studio-code npm-install jshint

我使用vscode,出于安全考虑,我们公司无法连接到互联网。但是,我想使用final ArrayList<String> arrayFont = new ArrayList<String>(); arrayFont.add("Arial"); arrayFont.add("Segoeui"); arrayFont.add("Tahoma"); arrayFont.add("Times New Roman"); ArrayAdapter arrayAdapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item,arrayFont); sp.setAdapter(arrayAdapter); sp.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if(position == 0){ Typeface type = Typeface.createFromAsset(getAssets(),"fonts/arial.ttf"); txtkq.setTypeface(type); } if(position == 1){ Typeface type = Typeface.createFromAsset(getAssets(),"fonts/segoeui.ttf"); txtkq.setTypeface(type); } if(position == 2){ Typeface type = Typeface.createFromAsset(getAssets(),"fonts/tahoma.ttf"); txtkq.setTypeface(type); } if(position == 3){ Typeface type = Typeface.createFromAsset(getAssets(),"fonts/times.ttf"); txtkq.setTypeface(type); } } @Override public void onNothingSelected(AdapterView<?> parent) { } }); protected void Checked(View v){ if(cb_Bold.isChecked() && cb_Italic.isChecked() == false) { Typeface bold_Typeface = Typeface.defaultFromStyle(Typeface.BOLD); txtkq.setTypeface(bold_Typeface); }else if(cb_Italic.isChecked() && cb_Bold.isChecked() == false){ Typeface Italic_Typeface = Typeface.defaultFromStyle(Typeface.ITALIC); txtkq.setTypeface(Italic_Typeface); } else if(cb_Bold.isChecked() && cb_Italic.isChecked()){ Typeface bold_Italic_Typeface = Typeface.defaultFromStyle(Typeface.BOLD_ITALIC); txtkq.setTypeface(bold_Italic_Typeface); }else if(cb_Bold.isChecked() == false && cb_Italic.isChecked() == false){ Typeface bold_Italic_Typeface = Typeface.defaultFromStyle(Typeface.NORMAL); txtkq.setTypeface(bold_Italic_Typeface); } }

所以,我将jshint extension改为jshint extension,将其移至公司计算机并安装,然后显示.vsix

据我所知,npm install jshint.仅适用于互联网。所以我再次看了一下,发现有npm

  

https://serverfault.com/questions/559032/offline-install-of-npm-package

我创建了npmbox并将其定为jshint.npmbox。 这次我得到 npmunbox 错误。

无法在离线环境中安装getaddrinfo ENOTFOUND?有没有办法?

1 个答案:

答案 0 :(得分:1)

更好用, Javascript Lint  可供离线使用。希望,它正好提供与jshint类似的支持。

如果您仍然只想要jshint,那么您可以尝试使用jshint from github并尝试使用它。