Alter The Ionic 2 Gulp Script To Include Browser JavaScript Files


By - Nic Raboy

Recently I found myself needing to add a JavaScript library to an Ionic 2 TypeScript project.  Now you’ll probably recall that I’ve written two different articles regarding using JavaScript libraries in TypeScript project.  I wrote about including a JavaScript library in an Ionic 2 app in a guest post I did, but the scenario had the JavaScript library coming from the Node Package Manager (NPM).  I also wrote about including a JavaScript library in an Angular 2 app, but the project structure is a little more web friendly in that scenario.

My new scenario is including a JavaScript file, rather than NPM package.  The project structure in an Ionic 2 application is a bit different than others.  We can’t just include JavaScript files wherever we want because the build process could very well wipe them out.  Instead we have to change the Gulp build process for the Ionic 2 application.

We’re going to see how to alter the Ionic 2 Gulp script to allow us to include external JavaScript files in our project.

Read full article....

Share on Google Plus

About www. codeandyou.com

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment