Coder Social home page Coder Social logo

karma-ember-preprocessor's People

Contributors

cgrieger avatar flucivja avatar jasonross-bt avatar toranb avatar vojtajina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

karma-ember-preprocessor's Issues

Cannot find module 'ember-template-compiler'

karma-ember-preprocessor doesn't seem to be able to find ember-template-compiler, and therefore the preprocessor doesn't seem to be running correctly.

Any ideas? Debug info attached below; lmk if anything else would be helpful.

= cli output

$> karma start
INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
WARN [preprocess]: Can not load "ember"!
  Error: Cannot find module 'ember-template-compiler'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at createEmberPreprocessor (/usr/src/myapp/node_modules/karma-ember-preprocessor/lib/main.js:6:20)
    at Array.invoke [as 0] (/usr/src/myapp/node_modules/karma/node_modules/di/lib/injector.js:75:15)
    at get (/usr/src/myapp/node_modules/karma/node_modules/di/lib/injector.js:48:43)
    at instantiatePreprocessor (/usr/src/myapp/node_modules/karma/lib/preprocessor.js:36:37)
    at Array.forEach (native)
    at createPreprocessor (/usr/src/myapp/node_modules/karma/lib/preprocessor.js:53:29)
    at List.refresh (/usr/src/myapp/node_modules/karma/lib/file-list.js:196:17)
    at Object.oncomplete (fs.js:297:15)
INFO [Chrome 30.0.1599 (Mac OS X 10.8.3)]: Connected on socket WU4kS1q2qfptTNcZ-jFY
Chrome 30.0.1599 (Mac OS X 10.8.3) ERROR
  Uncaught ReferenceError: outlet is not defined
  at /usr/src/myapp/app/assets/javascripts/templates/account.hbs:1
Chrome 30.0.1599 (Mac OS X 10.8.3): Executed 0 of 0 ERROR (0.822 secs / 0 secs)

= package.json

{
  "name": "myapp",
  "version": "0.1.0",
  "dependencies": {
    "karma": "*",
    "karma-qunit": "*",
    "karma-coffee-preprocessor": "*",
    "karma-ember-preprocessor": "*",
    "karma-chrome-launcher": "*"
  }
}

= karma.conf.coffee

module.exports = (config) ->
  config.set
    basePath: 'app/assets/javascripts'
    frameworks: ['qunit']
    files: [
      'http://localhost:5000/assets/jquery.js'
      'vendor/jquery.mockjax.js'
      'vendor/underscore-min.js'
      'http://localhost:5000/assets/handlebars.js'
      'http://localhost:5000/assets/ember.js'
      'test.coffee'
      'vendor/ember-data.js'
      'vendor/moment.js'
      'init-ember-app.coffee'
      'store.coffee'
      'lib/**/*.coffee'
      'models/**/*.coffee'
      'controllers/shared/**/*.coffee'
      'controllers/**/*.coffee'
      'views/shared/**/*.coffee'
      'views/**/*.coffee'
      'components/**/*.coffee'
      'helpers/**/*.coffee'
      'templates/**/*.hbs'
      'router.coffee'
      'routes/**/*.coffee'
      # 'spec/**/*'
      'spec/integration/*'
    ]
    exclude: [
      '**/.*.swp'
    ]
    reporters: ['dots']
    port: 9876
    runnerPort: 9100
    colors: true
    logLevel: config.LOG_INFO
    autoWatch: true
    browsers: [
      'Chrome'
    ]
    captureTimeout: 60000
    singleRun: false
    plugins: [
      'karma-qunit'
      'karma-coffee-preprocessor'
      'karma-ember-preprocessor'
      'karma-chrome-launcher'
      'karma-phantomjs-launcher'
    ]
    preprocessors:
      '**/*.coffee': 'coffee'
      '**/*.hbs':    'ember'

= npm packages

$> npm list
[email protected] /usr/src/myapp
├─┬ [email protected]
... (lots of karma depedencies)
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
... (misc dependencies)

Make sure it works with v0.10 and push to NPM

Hey, currently this plugin won't install with Karma 0.10, so I changed the peerDependency in package.json to make that work.

Can you please make sure the plugin works with v0.10 and push it to NPM ?

support for Ember layouts/components?

Hi, great work on this.

I'm having some troubles in a fairly complex ember project that utilizes both layouts and components.

I've correctly linked the handlebars templates from the karma config file, but the ember preprocessor doesn't seem to compile the layouts and components hbs files as it does the regular templates.

Is this a missing feature? Or should this work and I'm just doing something wrong?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.