grunt-fxos

Tools for Firefox OS app development

grunt-fxos

An expanding toolkit of Grunt tasks that are aimed at making your Firefox OS development even more enjoyable!

Note: This project is a work in progress...

CLI: grunt fxos-init

Helps you initialize a new Firefox OS Application. This is perfect if you are starting a brand new project. This task will go through the steps of creating your application directory, generating a .webapp manifest file, and setting up other necessary files.

CLI: grunt fxos-examples

First time developing for Firefox OS or learning? Love experimenting with new APIs? This is for you! An expanding list of application templates to help you quickly get started! This task will download the selected example and will even deploy it for you. You can also create your own templates and contribute back to the project.

CLI: grunt fxos-deploy Optional: --path [file path] to your application directory that includes the manifest file.

Gruntfile: configure: fxos.options.src

Deploy an application folder to your Firefox OS device. Push your application to the device. See [Configuration] for more details.


CLI: grunt fxos-screenshot Optional: --path [file path] - where to save the screenshot file

A quick way to take a screenshot from your Firefox OS device.

CLI: grunt fxos-icon --icon file.png

Run the dev environment check.

CLI: grunt fxos-manifest

Generate a .webapp manifest file for your application.

CLI: grunt fxos-icon --icon file.png Optional: --sizes 16,32,42, --path [file path]

Gruntfile: dist and sizes are optional:

fxos: {
  options: {
    icon: {
      src: 'icon.png',
      dest: 'app/icons',
      sizes: '16,32,42'
    }
  }
}

Generate application icons from a file (png or svg). Default icon sizes: 16, 30, 32, 48, 60, 64, 128, 256. Requires GraphicsMagick or ImageMagick. See node-gm getting started for more details. You can also add grunt-svgmin or grunt-contrib-imagemin to your workflow.


CLI: grunt fxos-sim

Download and start the Firefox OS simulator! Note: ~60 mb download


This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-fxos --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-fxos');

Now in your terminal run:

grunt fxos

Make sure you get >> All required tools available! after you run this command.

If not, then please configure the required tools.

A Yeoman Generator is also available, use: npm install -g generator-fxos then: yo fxos:app

Setup your application folder and other settings

fxos: {
  options: {
    src: "app"
    icon: {
      src: 'icon.png',
      dest: 'app/icons',
      sizes: '16,32,42'
    }
  }
}
 

Type: String Optional, path to your app directory

Type: String Source file of the icon.

Type: String Destination for the generated icons.

Type: String Comma-separated icon sizes.

Ask for help in IRC, in #grunt on Freenode.

Windows support: run fxos-env to detect compatibility.

MIT

© Vlad Filippov