流星应用程序构建奇怪的文件;没有js / css资源

时间:2015-07-12 17:36:12

标签: javascript ios css meteor isobuild

当我构建Meteor应用程序时,它不会创建有效的js或css文件。当我执行meteor run iosmeteor build ~/builddir --server=http://app.myserver.com:80/

时,就会发生这种情况

下面的代码段包含各自顺序的实际CSS,JS和HTML文件。 html甚至没有正确格式化,这对我来说似乎非常奇怪。我错过了一些完全明显的东西吗?

有趣的是,文件的名称似乎没有变化。我的意思是,css文件始终命名为68656e12cb5647ccd9e1ca30f039055f336a08d2.css,js文件始终命名为83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js

我做了find . | grep jsfind . | grep css尝试找到这些文件,但我很确定它们不存在。

这是我的包裹清单:

ground:db                 0.3.9* Ground Meteor.Collections offline
iron:router               1.0.9  Routing specifically designed for Meteor
meteor-platform           1.2.2  Include a standard set of Meteor packages in your app
momentjs:moment           2.10.3  Moment.js (official): parse, validate, manipulate, and display dates - official Meteor packaging
mrt:fittext               1.2.0  FitText packaged for Meteor.
pauloborges:mapbox        2.1.4_3  Mapbox.js for Meteor apps
reactive-var              1.0.5  Reactive variable
u2622:persistent-session  0.3.5  Persistently store Session data on the client



<!DOCTYPE html >
< html >
< head >
< meta charset = "utf-8" >
< meta name = "format-detection" content = "telephone=no" >
< meta name = "viewport" content = "user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" >
< meta name = "msapplication-tap-highlight" content = "no" >
< link rel = "stylesheet" type = "text/css" class = "__meteor-css__" href = "/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true" >
< script type = "text/javascript" >
__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

if (/Android/i.test(navigator.userAgent)) {
    // When Android app is emulated, it cannot connect to localhost,
    // instead it should connect to 10.0.2.2
    // (unless we're using an http proxy; then it works!)
    if (!__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
    }
}
< /script>
< script type = "text/javascript" src = "/cordova.js"></script>
< script type = "text/javascript" src = "/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>

< meta charset = "utf-8" >
< meta http - equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Nature Based Therapeutics < /title>
< /head>
< body >

< /body>
< /html>
&#13;
< !DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height">
<meta name="msapplication-tap-highlight" content="no">
<link rel="stylesheet" type="text/css" class="__meteor-css__" href="/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true">
<script type="text/javascript">
__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

if (/Android/i.test(navigator.userAgent)) {
    // When Android app is emulated, it cannot connect to localhost,
    // instead it should connect to 10.0.2.2
    // (unless we're using an http proxy; then it works!)
    if ( !__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
    }
}

</script>
<script type="text/javascript" src="/cordova.js"></script>
<script type="text/javascript" src="/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nature Based Therapeutics</title>
</head>
<body>

</body>
</html>
&#13;
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="format-detection" content="telephone=no">
  <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/68656e12cb5647ccd9e1ca30f039055f336a08d2.css?meteor_css_resource=true">

  <script type="text/javascript">
    __meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22PUBLIC_SETTINGS%22%3A%7B%22othersetting%22%3A%22anothervalue%22%7D%2C%22ROOT_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22autoupdateVersion%22%3A%22bcf325756930a7028774c23bd28b4cc053de29ba%22%2C%22autoupdateVersionRefreshable%22%3A%22393b25460d4096237fe166edc70a833659c1d58b%22%2C%22autoupdateVersionCordova%22%3A%227c4f521c660011a4692d147b69dc64a13f578719%22%2C%22DDP_DEFAULT_CONNECTION_URL%22%3A%22http%3A%2F%2Fnbt.otterhive.com%2F%22%7D"));

    if (/Android/i.test(navigator.userAgent)) {
      // When Android app is emulated, it cannot connect to localhost,
      // instead it should connect to 10.0.2.2
      // (unless we're using an http proxy; then it works!)
      if (!__meteor_runtime_config__.httpProxyPort) {
        __meteor_runtime_config__.ROOT_URL = (__meteor_runtime_config__.ROOT_URL || '').replace(/localhost/i, '10.0.2.2');
        __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL || '').replace(/localhost/i, '10.0.2.2');
      }
    }
  </script>

  <script type="text/javascript" src="/cordova.js"></script>
  <script type="text/javascript" src="/83f43fb0b048a87151b782ce0ae04a95ecbae2e7.js"></script>


  <meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Nature Based Therapeutics</title>
</head>

<body>
  
</body>
</html>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:0)

当您使用meteor build时,它将创建一个包含节点应用程序的tarred包。

css和js文件被缩小并连接。

如果您解压缩捆绑的tar.gz文件,您将在bundle/programs/web.browser

中找到css,js和其他静态文件

请记住,输出是一个应用程序而不是一组要编辑的文件。

如果要编辑文件,请使用项目,而不是meteor build创建的文件。

答案 1 :(得分:0)

所以我得到了它的工作,但我仍然想知道发生了什么。毕竟那是我原来的问题。如果有人知道这里发生了什么,请告诉我。

我手动删除了应用程序并重新安装了它。这对我有用。我的猜测是由于某种原因缓存了旧版本的文件。