sebastianzaha / karma-sprockets Goto Github PK
View Code? Open in Web Editor NEWHelps integrating rails & karma. (And generally importing js files from sprockets bundles)
Helps integrating rails & karma. (And generally importing js files from sprockets bundles)
This commit fixes package.json d1d061e
But no version has since been published to the npm registry.
The latest is still v0.3.1 from October 2015.
Could you publish the change to the registry please?
Installed as instructed and edited karma.conf.js:
plugins: [
'karma-jasmine',
'karma-chrome-launcher',
'karma-coffee-preprocessor',
'karma-sprockets'
],
sprocketsPath: [
'app/assets/javascripts'
],
sprocketsBundles: [
'angular-loading-bar.js',
'application.js'
]
});
};
But assets do not appear to be available. Should be available as if they were specified under files:
Does it matter if the asset is under .rvm? What about erb files?
/Users/kimardenmiller/.rvm/gems/ruby-2.1.1@spokenvote/gems/angular-rails-templates-0.1.1/vendor/assets/javascripts/angular-rails-templates.js.erb
I am trying to run this plugin with rails, i followed the instructions, but i'm getting the following trace.
/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:20
throw new Error(
^
Error: Logical path jquery does not correspond to any file (valid extensions: .js, .coffee, .litcoffee, .ejs)
at fullPath (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:20:13)
at Object.module.exports.Resource.initialize (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:39:27)
at Object.Resource (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:31:21)
at /Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:185:19
at Array.forEach (native)
at Object.module.exports.Resource.depTree (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain/resource.js:184:12)
at Object.module.exports.SprocketsChain.depTree (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain.js:41:23)
at Object.module.exports.SprocketsChain.depChain (/Users/Elvar/projects/sanatid/node_modules/sprockets-chain/lib/sprockets_chain.js:46:23)
at createSprockets (/Users/Elvar/projects/sanatid/node_modules/karma-sprockets/index.js:11:27)
at Array.invoke [as 0] (/Users/Elvar/projects/sanatid/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at get (/Users/Elvar/projects/sanatid/node_modules/karma/node_modules/di/lib/injector.js:48:43)
at /Users/Elvar/projects/sanatid/node_modules/karma/lib/server.js:28:14
at Array.forEach (native)
at start (/Users/Elvar/projects/sanatid/node_modules/karma/lib/server.js:27:21)
at invoke (/Users/Elvar/projects/sanatid/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Object.exports.start (/Users/Elvar/projects/sanatid/node_modules/karma/lib/server.js:206:12)
at Object.<anonymous> (/usr/local/lib/node_modules/karma/bin/karma:19:39)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
My Karma conf
module.exports = function(config) {
config.set({
basePath: '.',
sprocketsPath: 'app/assets/javascripts',
sprocketsBundles: [
'application-primary.js'
],
files: [
// 'app/assets/javascripts/application-primary.js',
'spec/javascripts/*_spec.js.coffee'
],
browsers: ['PhantomJS'],
singleRun: true,
autoWatch: false,
frameworks: ['qunit', 'sprockets'],
plugins: [
'karma-qunit',
'karma-ember-preprocessor',
'karma-phantomjs-launcher',
'karma-coffee-preprocessor',
'karma-sprockets'
],
preprocessors: {
'**/*.handlebars': 'ember',
'**/*.coffee': ['coffee']
}
});
}
And my application-primary.js.
//= require jquery
//= require jquery_ujs
//= require semantic-ui
// *** Ember ***
//= require handlebars
//= require ember
//= require ember-data
//
// *** Bower ***
//= require gl-datepicker/glDatePicker
//= require ember-i18n/lib/i18n
//= require jquery-throttle-debounce/jquery.ba-throttle-debounce
//= require showdown/src/showdown
//= require momentjs/min/moment.min
//
// *** App ***
//= require_self
//= require sanatid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.