0

I am trying to add rainbow code samples to my ember project. I installed rainbow through bower and it works locally. However when I build and deploy to staging I am getting JS console errors.

source error

As far as I can tell this is the minified version of this. It appears to me that for some reason the Prism class is not being included when it is minified. I am importing

    'rainbow/dist/rainbow.min.js',
    'rainbow/src/language/generic.js',
    'rainbow/src/language/r.js',
    'rainbow/src/language/python.js',
    'rainbow/src/language/json.js',
    'rainbow/src/language/html.js'

in my ember-cli-build.js using

bowerDependencies.forEach(function(path) { app.import(app.bowerDirectory + '/' + path); });.

If I build with minify off it works wonderfully, but I would like to minify the JS. I am currently at a loss of why these files are not being included.

1 Answers1

0

Use ./rainbow/dist/rainbow.min.js for al the file inclusion.

Refer : https://github.com/ember-cli/ember-cli/issues/6829

Ember Freak
  • 12,918
  • 4
  • 24
  • 54
  • I am pretty sure that is saying the opposite no? also I am including all these using `bowerDependencies.forEach(function(path) { app.import(app.bowerDirectory + '/' + path); });` If I change the import path it cannot find `Rainbow` at all – A.Scott.Rowe Aug 16 '17 at 19:39
  • You are using app.bowerDirectory so ignore my answer – Ember Freak Aug 16 '17 at 19:49