Ember-cli 在应用迁移后需要很长时间才能构建



我最近将我使用 bower 编译的 ember 应用程序迁移到 ember-cli。它已经变得非常大,但我在当前的开发环境中遇到了问题,而 ember-cli 似乎是更干净的解决方案。

不幸的是,在更新 ember-cli 接口的文件后,构建不起作用。我已经让它在 5% CPU 下运行了 100 分钟,并且在构建后达到了两个点。并停止了。

我正在使用崇高文本,但我在 http://www.ember-cli.com/#commonissues 下更新了我的首选项。我使用 npm 添加了 broccoli-sass,并使用 ember install:addon 添加了 ember-data.model-fragments。下面是我的包.json

{
"name": "frontend",
"version": "0.0.0",
"description": "Small description for frontend goes here",
"private": true,
"directories": {
  "doc": "doc",
  "test": "tests"
},
"scripts": {
  "start": "ember server",
  "build": "ember build",
  "test": "ember test"
},
"repository": "",
"engines": {
  "node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
  "broccoli-asset-rev": "^2.0.0",
  "broccoli-sass": "git://github.com/aexmachina/broccoli-sass#sources-content",
  "ember-cli": "0.1.11",
  "ember-cli-6to5": "^3.0.0",
  "ember-cli-app-version": "0.3.0",
  "ember-cli-content-security-policy": "0.3.0",
  "ember-cli-dependency-checker": "0.0.7",
  "ember-cli-htmlbars": "^0.6.0",
  "ember-cli-ic-ajax": "0.1.1",
  "ember-cli-inject-live-reload": "^1.3.0",
  "ember-cli-qunit": "0.3.0",
  "ember-cli-uglify": "1.0.1",
  "ember-data": "1.0.0-beta.14.1",
  "ember-data-model-fragments": "0.2.7",
  "ember-export-application-global": "^1.0.0",
  "express": "^4.8.5",
  "glob": "^4.0.5"
  }
}

这是我的应用程序文件树。我想知道它是否与我添加的所有文件夹(对象、定义、库等)有关。

app
├── app.js
├── components
│   ├── dual-slider.js
│   ├── scroll-arrow.js
│   ├── single-slider.js
│   └── square-div.js
├── controllers
│   ├── application.js
│   ├── authentication
│   │   ├── login.js
│   │   └── signup.js
│   ├── demos
│   │   ├── derivatives.js
│   │   ├── integrals.js
│   │   └── revolutions.js
│   ├── flash.js
│   ├── index.js
│   ├── lessons
│   │   ├── index.js
│   │   ├── new
│   │   │   ├── create-step.js
│   │   │   ├── index.js
│   │   │   └── step.js
│   │   ├── new.js
│   │   ├── show
│   │   │   ├── index.js
│   │   │   └── step.js
│   │   └── show.js
│   └── subjects
│       ├── index.js
│       └── show.js
├── definitions
│   ├── animationKeys.js
│   ├── stepArray.js
│   └── typeKeys.js
├── helpers
│   ├── focus-input.js
│   └── slider-label-input.js
├── index.html
├── initializers
│   └── session-setup.js
├── libraries
│   └── mathAnimationLibrary
│       ├── dist
│       │   ├── display-library.js
│       │   └── vendor
│       │       ├── math.js
│       │       ├── three.js
│       │       ├── trackballControls.js
│       │       └── zgentilis_bold.typeface.js
│       └── src
│           ├── DisplayLibrary.js
│           └── functions
│               ├── create2DFunction.js
│               ├── createAxis.js
│               ├── createIntegralDisplay.js
│               ├── createRotationFunction.js
│               ├── createSurface.js
│               ├── mathEnvironment.js
│               └── showDerivative.js
├── mixins
│   └── animation.js
├── models
│   ├── animation-params.js
│   ├── animation.js
│   ├── choice.js
│   ├── equation-part.js
│   ├── equation.js
│   ├── explanation.js
│   ├── instruction.js
│   ├── lesson-step-type.js
│   ├── lesson-step.js
│   ├── lesson.js
│   ├── multiple-choice.js
│   ├── special-animation-params.js
│   ├── subject.js
│   └── user.js
├── objects
│   ├── flash-queue.js
│   ├── flash.js
│   └── session.js
├── router.js
├── routes
│   ├── index.js
│   ├── lessons
│   │   ├── index.js
│   │   ├── new
│   │   │   ├── create-step.js
│   │   │   ├── index.js
│   │   │   └── step.js
│   │   ├── new.js
│   │   ├── show
│   │   │   ├── index.js
│   │   │   └── step.js
│   │   └── show.js
│   ├── logout.js
│   └── subjects
│       ├── index.js
│       └── show.js
├── serializers
│   ├── application.js
│   └── lesson.js
├── styles
│   ├── app.scss
│   ├── reset.css
│   └── sass
│       ├── authentication
│       │   └── authentication.scss
│       ├── colors.scss
│       ├── components
│       │   ├── scroll-arrow.scss
│       │   ├── slider.scss
│       │   └── square-div.scss
│       ├── helpers
│       │   └── flash.scss
│       ├── lessons
│       │   ├── multiple-choice.scss
│       │   └── show.scss
│       ├── main.scss
│       ├── mixins.scss
│       └── root
│           ├── demos.scss
│           ├── header.scss
│           └── index.scss
├── templates
│   ├── about
│   │   └── index.hbs
│   ├── application.hbs
│   ├── backend.hbs
│   ├── components
│   │   ├── dual-slider.hbs
│   │   ├── scroll-arrow.hbs
│   │   ├── single-slider.hbs
│   │   └── square-div.hbs
│   ├── demos
│   │   ├── derivatives.hbs
│   │   ├── index.hbs
│   │   ├── integrals.hbs
│   │   └── revolutions.hbs
│   ├── index.hbs
│   ├── lessons
│   │   ├── equationViewer.hbs
│   │   ├── index.hbs
│   │   ├── multipleChoice.hbs
│   │   ├── new
│   │   │   ├── createStep.hbs
│   │   │   ├── index.hbs
│   │   │   └── step.hbs
│   │   ├── new.hbs
│   │   ├── show
│   │   │   ├── index.hbs
│   │   │   └── step.hbs
│   │   └── show.hbs
│   ├── login.hbs
│   ├── shared
│   ├── signup.hbs
│   └── subjects
│       ├── index.hbs
│       └── show.hbs
└── views
    ├── demos
    │   ├── derivatives.js
    │   ├── integrals.js
    │   └── revolutions.js
    ├── flash.js
    └── lessons
        ├── equationViewer.js
        └── multipleChoice.js

我也有可能错过了文件传输中某处的导入/导出。这会像我所看到的那样静默失败还是会引发错误?

我很欣赏你可能有的任何见解。

所以显然在问题板上已经有一些关于这个问题的讨论。特别是,ember-cli-6to5显然在最新版本的ember-cli中扰乱了构建时间。删除该组件后(您将失去模块以外的功能),它的构建速度要快得多。有关更多详细信息 https://github.com/ember-cli/ember-cli/issues/3136,请参阅此讨论。

相关内容

最新更新