Ionic, Cordova offline development

How do I create and build Cordova and Ionic Applications offline. Which files (Ionic and Cordova) do I need to download and which parameter(s) do I do to pass.

Each of these commands requires internet connection to create the project

cordova create test com.example.test TestME
cordova platform add android .....
ionic start test blank

I will like know how I can do all these offline.

Thanks in advance

download this archive or clone this github project https://github.com/driftyco/ionic-app-base then go to the www directory , and use the following commande python -m SimpleHTTPServer

Using the idea from Daniel Perez Alvarez in this question, I added this to my .bashrc file:

#################################
#
# It serves the current directory
# on port 3000 by default, but you
# can specify a port.
#
# Example:
#
#    ~/tmp $ serve                   # ~/tmp served on port 3000
#    ~/tmp $ cd ../www
#    ~/www $ serve 5000              # ~/www served on port 5000
#
# Credit: Daniel Perez Alvarez (http://stackoverflow.com/users/83998/daniel-perez-alvarez)
# SO answer on "serve current directory from command line".
# Link: (http://stackoverflow.com/questions/3108395/serve-current-directory-from-command-line)
#
#################################
function serve {
  port="${1:-3000}"
  ruby -run -e httpd . -p $port
}

I've been using this approach to test the Ionic Kitchen Sink app and other examples.

You can use npmbox !

npm addon utility for creating and installing from an archive file of an npm install, including dependencies. This lets you create a "box" of an installable package and move it to an offline system that will only install from that box.

So you can do something like $ npmbox ionic

But you have to have npm on the offline computer, you can download a node installer here