Compressed Code is Fast!

Your compile probably had warnings and nothing was in your www folder.

You have to resolve all warnings, take some googling but generally speaking install ruby with gem/compass should help a lot.

@ShinyArmor if you haven’t been able to resolve your errors, post a link to the generated output. If you selected Y to use sass + compass there is a ruby dependency as @hitmantb mentioned.

@hitmantb @Diego

I installed ruby :smiley:
i have these warnings

@ShinyArmor Thanks for the screen shot.

That error was an issue invoking Node’s spawn() on Windows, but I’ve since fixed it to be more portable.

You might still be on an older version. Run npm install -g generator-ionicjs to grab the latest version then rerun yo ionicjs in your project’s directory and hit Y when it prompts you to overwrite your Gruntfile.js

That should clear things up.

This fixed it for me.

You need to install ruby then compass and make sure you add ruby to your path if you are in Windows. Need to be able to run gem and compass in project directory.

@Diego @hitmantb

i installed gem, ruby, compass and added them to path

1 warning to go :smiley:

permission denied ?

i think it’s bug on windows :frowning:

i’ll try on linux later

@ShinyArmor What version of ruby are you running? ruby -v

it says

ruby 2.0.0p451 (2014-02-24) [i386-mingw32]

Cool, and what version of compass ?

Here’s a StackOverflow from a few days ago that had a similar issue. They solved it by downgrading the version of compass: http://stackoverflow.com/questions/22559284/problems-when-creating-compass-project-eacces-on-line-891

This is my compass version

Compass 0.12.4 (Alnilam)

I will try to downgrade

btw, slightly off-topic. how to use npm behind authenticated proxy :smiley:

edit:
it works!
I have to downgrade using compass 0.12.3

Thanks :smiley:

Glad you’re all fixed up!

Here’s how you can configure npm to run behind a proxy

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

and a relevant StackOverflow post.

Good luck!

1 Like

Thank you, @Diego

It works

Happy to help :smile:

I made a simple Cordova hook that can uglify or minify your apps JavaScript and CSS when doing a build or prepare using the regular CLI. I added it on GitHub here and made it easy to install using NPM (instructions are shown in the readme).

I notice that “uglifying” my JavaScript files has cut their size by a little over half. My largest angular controller JavaScript file pre-uglify is 5.2 KB and after build it is now 2.4 KB in size using my uglify hook.

One benefit to “uglifying” your scripts is that it makes it more difficult to reverse engineer. Many people know how easy it is to reverse engineer a Cordova application and “uglifying” your scripts is certainly better than leaving them untouched for a production app. Here is an excellent post about this dilemma.

My uglify hook doesn’t obfuscate your scripts nearly like the methods described in the post above but it is better than “letting it all hang out” like I have seen many production Cordova apps do :~)

3 Likes