In the latest version of Xcode, its shipping CLI (Command-Line Tool) – xcodebuild should be powerful enough for us to deal with some normal tasks without any interaction with Xcode UI itself. However, as always, Apple’s “good” documentation actually kills its broad using.

In this post, we are discussing the usage of -destination option, which can help you build and run the app in iOS simulator or real device.

Continue reading


Check the Docker Hub page.

Docker file with related scripts and config files to help build a Docker container that runs the following pieces out-of-the-box:

  • PHP-FPM.
  • Nginx with fastcgi-cache and fastcgi_cache_purge.
  • Opcache.
  • WordPress with the latest version.

Also, it provides the following optional scripts:

  • Add existing SSL cert files into Nginx config.
  • Auto-generate SSL cert and add into Nginx config. It is done through letsencrypt (
  • Auto-download a pre-defined list of WordPress plugins.

Continue reading


During the previous adventures, the project Ionic Boilerplate has been re-organized for a better development engagement, such as:

  • The Modularize AngularJS code structure enables you to freely define your app functionality and add modules if needed.
  • Based on that, the adding Browerify gulp plugin helps bundle the code into one single JS package so that you do not need to include every JS files into index.html file.
  • A folder-based Gulp tasks management system facilitates the Gulp task building and management.
  • The adding testing framework supports both Unit Test and E2E Test out-of-box.

However, if looking into the whole application development process, there are still a lot of aspects that we have not covered yet. For example:

  • Simplify Terminal interface (CLI) to avoid the use of bothgulp and ionic.
  • Enable the project code structure to accommodate different development and building environments, such as dev, staging, testing, prod, etc.
  • Aim for more automatic product building system, especially for auto-versioning.
  • Make the development process CI(Continuous Integration)-friendly and CD(Continuous Deployment)-friendly.

So that, we are introducing Gulp Flow – the streamline application development process to help tackle these points.

Please Note: Gulp Flow here is different from the NPM lib “gulp-flow“.

Continue reading


When doing testing during the development process, there are three main types of test that we need to ensure.

  • Unit Tests – Write small test cases to test small pieces of code without external dependencies.
  • Integration Tests – After Unit Tests done to each individual module, this type of test is to test the integration of multiple modules.
  • UI Tests / End-To-End (E2E) Tests – A special Integration Test that allows you to test the User Interface of your app through a browser and in this way it can also cover the backend.

Check Google’s recommendations to E2E tests.

Continue reading

In version ECMAScript 5 of javascript, Browserify/CommonJS helps bring the module concept to Javascript language as well as browser support. Normally, when doing Browerify, it starts from an entry file and creates bundles following the calling path of require(), which also includes the external libraries, such as AngularJS, ReactJS, etc. And every time when we have some code changes to our own app code, it has to run again to create this big bundle.

What if we can separate the libraries as one bundle and create another bundle for our app code? So that we can avoid the constant bundling on those “unchanged” libraries. And it should also benefit our debugging process.

And, here is how.

Continue reading

When using Travis CI to help do CI(Continuous Integration)-friendly and CD(Continuous Deployment), it is inevitable that you will include some sensitive data to the Travis CI config file (variables, like API key, APP ID, etc.) or to the project folder (file, like certificate, profile, etc.).

In order to help protect them, Travis CLI provides two convenient commands travis encrypt (link) and travis encrypt-file (link) to help encrypt the variables and files. Continue reading


In the current Ionic Boilerplate folder, it has one big gulpfile.js to contain all Gulp tasks. And it will continue to grow when we adding new tasks for testing, building, deployment, etc.

In order to make the management easier, we are going to separate this single file into a file structure, so that:

  • Each single task has its own file, indicated by filename.
  • The file structure can have multiple levels of folders.
  • Just simply add another file to create a new task.
  • For each task, it maintains its own dependencies.

Continue reading


In the current code structure of Ionic Starter Project, it has one controller file and one service file under www/js/ folder. During the actual development practice, it is not a good way to keep all controllers and services just in those two files. Instead, the code will be spotted into separate files based on functionality.

However, another pain point brought by this split is every time when a new js file is added, we have to manually add them into index.html file so that it can load while app is running.

In order to solve it, we will need the tool Browserify to help achieve it.

Continue reading