Unable to publish [JavaScript] [Template Literals]


#1

I am trying to publish my package and it just doesn’t go. No error message.

Also my package is gone off of the plugin repository.


#2

What do you see when you use --verbose


#3

seems the same :frowning:

Edit: Here is link to source code - https://github.com/shadowcodex/c9.ide.pigments

And here is the workspace: https://ide.c9.io/shadowcodex1/blah/?debug=2


#4

@harutyun do you have any idea?


#5

@javruben do you think it has to do with the fact that I added literal strings to my code?


#6

Update/new post as a solution.

The reason I was not able to publish is because my add-on used a newer form of literal strings called template literals. These cause issues with minification drivers which c9 uses when it builds and deploys a plugin from the sdk.

For example the following will not work when you are publishing a plugin to the c9 repo. However it will work during local dev.

var sometext = `
    <div>
        <p>text</p>
    </div>
`;

Instead I use the following method which does insert newlines, save me keystrokes, and is readable:

var sometext = [
    '<div>',
    '<p>text</p>',
    '</div>'
].join('\n');

The first one will cause build errors and the second will not.

Good luck developing!