如何使用RuleJS正确安装Handsontable [英] How to correctly install Handsontable with RuleJS

查看:169
本文介绍了如何使用RuleJS正确安装Handsontable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Windows下本地安装Handsontable RuleJS支持(用于公式)(即,不仅从github访问其文件).稍后,我将随我的应用程序一起分发.我真的不想安装&配置bowergit

I need to install Handsontable with RuleJS support (for formulas) locally (i.e. not just access its files from github), under Windows. I will later need to distribute with my application. I really do not want to have to install & configure bower, git etc.

最初,我从 https://github.com/handsontable 开始,我尝试从以下位置下载zip https://github.com/handsontable/handsontable .然后,我不得不从github的其他位置获取各种额外的信息,尝试在 http:/上进行演示. /handsontable.github.io/handsontable-ruleJS/工作.这包括通过以下方式进行的操作:

Initially, starting from https://github.com/handsontable, I tried downloading the zip from https://github.com/handsontable/handsontable. Then I had to fetch various extra bits from elsewhere on github, attempting to make the demo at http://handsontable.github.io/handsontable-ruleJS/ work. This includes its stuff via:

<!-- handsontable v1 -->
<script data-jsfiddle="common" src="lib/handsontable/handsontable.full.js"></script>
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="lib/handsontable/handsontable.full.css">

<!-- ruleJS -->
<link rel="stylesheet" media="screen" href="lib/handsontable/handsontable.formula.css">

<script data-jsfiddle="common" src="lib/RuleJS/lib/lodash/lodash.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/underscore.string/underscore.string.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/moment/moment.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/numeral/numeral.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/numericjs/numeric.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/js-md5/md5.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/jstat/jstat.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/lib/formulajs/formula.js"></script>

<script data-jsfiddle="common" src="lib/RuleJS/js/parser.js"></script>
<script data-jsfiddle="common" src="lib/RuleJS/js/ruleJS.js"></script>

<script data-jsfiddle="common" src="lib/handsontable/handsontable.formula.js"></script>

这都很混乱,而且(我认为)我什至在任何下载程序包中都找不到numericjs/numeric.js.

This is all messy, and (I think) I could not even find the numericjs/numeric.js in any download package.

然后我注意到 https://github.com/handsontable/handsontable-ruleJS .这似乎简单得多:它在自己的bower_components子目录中具有所需的可动手操作的东西,并且在index.html示例中具有通过以下方式包含的文件:

I then noticed https://github.com/handsontable/handsontable-ruleJS. This seemed much simpler: it has the handsontable stuff it wants in its own bower_components sub-directory, and its index.html example, with files included via:

<!-- handsontable --> 
<script data-jsfiddle="common" src="bower_components/handsontable/dist/handsontable.full.js"></script> 
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="bower_components/handsontable/dist/handsontable.full.css"> 

<!-- ruleJS --> 
<script data-jsfiddle="common" src="bower_components/ruleJS/dist/full/ruleJS.all.full.js"></script> 
<script data-jsfiddle="common" src="src/handsontable.formula.js"></script> 
<link rel="stylesheet" media="screen" href="src/handsontable.formula.css"> 

此外,它的README.md状态为Important: Few things have been modified in external libraries, so please use all library files only from this repo.,这听起来像是最安全的方法(而且完整的,最新的可动手发行版甚至可能无法正常运行).

Additionally, its README.md states Important: Few things have been modified in external libraries, so please use all library files only from this repo., which makes it sound like this is the safest way to go (and full, latest handsontable release might not even behave correctly).

但是,我刚刚意识到handsontable-RuleJS在0.14.1版本中包含了Handsontable内容,而最新版本是0.23,并且我需要更高版本中的功能.

However, I have just realised that handsontable-RuleJS has its included Handsontable stuff at version 0.14.1, while the latest release of that is 0.23, and there are functions I need from later versions.

那么,有没有一种简单的方法可以下载我需要的内容?我应该使用包含bower_components的简单handsontable-RuleJS链接,还是index.html演示的仅 链接,还是用较新的版本覆盖它们,或者……?还是我真的需要获得bower& git,让它们可以在Windows下正常工作,然后神奇地将所有内容整理得很难直接下载?

So, is there a simple way to download what I need? Should I be using the simple handsontable-RuleJS link, with its included bower_components, or are they only there for the index.html demo, or overwrite them with newer versions, or what...? Or, do I really need to get bower & git, make them work right under Windows, and then magically everything will be sorted out in a way too difficult to just download directly?

推荐答案

我所做的只是使用 https://github .com/handsontable/ruleJS ,因为它非常简单.我拿走了我项目所需的文件,而其余的都留了下来.我只是用它,看看以后的版本中需要什么功能.然后,您可以返回并包含这些内容. 我认为没有任何神奇的下载可以满足您的所有需求.您可能需要玩一些,但我不认为您需要凉亭和git.

All I did was use https://github.com/handsontable/ruleJS as it was really simple. I took the files I needed for my project and left the rest of it alone. I would just use this and see what functionalities you need from later versions. Then you can go back and include those. I don't think there is any magical download that will just give you everything you need. You will probably need to play around a little but I don't believe you will need bower and git.

这篇关于如何使用RuleJS正确安装Handsontable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆