Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grunt-mozilla-addon-sdk
Advanced tools
Download and Run Mozilla Addon SDK
This plugin requires Grunt ~0.4.1
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-mozilla-addon-sdk --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-mozilla-addon-sdk');
In your project's Gruntfile, add a section named mozilla-addon-sdk
to the data object passed into grunt.initConfig()
to define a Mozilla Addon SDK to download and use, a section named mozilla-cfx-xpi
to define the xpi building tasks and a section named mozilla-cfx`` to define arbitrary cfx commands to run (e.g.
cfx runto try your extension in a temporary profile and
cfx test` to run your test cases)
grunt.initConfig({
"mozilla-addon-sdk": {
'latest': {
options: {
// revision: "latest", // default official revision
dest_dir: "build_tools/"
}
},
'1_14': {
options: {
revision: "1.14",
dest_dir: "build_tools/"
}
},
'master': {
options: {
revision: "master",
github: true,
// github_user: "mozilla" // default value
// dest_dir: "tmp/mozilla-addon-sdk" // default value
}
}
},
"mozilla-cfx-xpi": {
'stable': {
options: {
"mozilla-addon-sdk": "latest",
extension_dir: "ff_extension",
dist_dir: "tmp/dist-stable"
}
},
'experimental': {
options: {
"mozilla-addon-sdk": "master",
extension_dir: "ff_extension",
dist_dir: "tmp/dist-experimental",
strip_sdk: false // true by default
}
},
},
"mozilla-cfx": {
'run_stable': {
options: {
"mozilla-addon-sdk": "1_14",
extension_dir: "ff_extension",
command: "run"
}
},
'run_experimental': {
options: {
"mozilla-addon-sdk": "master",
extension_dir: "ff_extension",
command: "run",
pipe_output: true
}
}
}
});
Custom cfx command could be defined using a section named mozilla-cfx
:
grunt.initConfig({
"mozilla-addon-sdk": {
"1_14": {
...
}
},
"mozilla-cfx": {
custom_command: {
options: {
"mozilla-addon-sdk": "1_14",
extension_dir: "ff_extension",
command: "run",
arguments: "-b /usr/bin/firefox-nightly -p /tmp/PROFILE_REUSED"
}
}
}
})
NOTE: all tasks use FIREFOX_BIN
and FIREFOX_PROFILE
environment variables, if defined, to customize the Firefox binary and Firefox profile dir used to run or test the extension.
"mozilla-addon-sdk" is a grunt multi-task which supports the following task options
Type: String
Default value: undefined
A string value that is used as the Mozilla Addon SDK revision to download and use to build addon xpi.
Type: Bool
Default value: false
A boolean value used to download a Mozilla Addon SDK from a github repo archive.
By default its value is false (addon-sdk archive downloaded from official ftp.mozilla.org releases), set it to true if you want to use a development release from github.
Type: String
Default value: mozilla
A string value used as Github User for addon-sdk github archive to downloads, it could be used to use a different github fork of the original mozilla addon-sdk repo.
Type: String
Default value: tmp/mozilla-addon-sdk
A string value used as the path where the github repo of this addon-sdk will be cloned.
"mozilla-cfx-xpi" is a grunt multi-task which builds addon xpi archives using the available addon-sdk revisions.
Type: String
Default value: null
A string value used to set the addon-sdk (as named in the "mozilla-addon-sdk" section) to be used to create the xpi archive.
Type: String
Default value: null
A string value that is used as the path which contains the addon extension to build.
Type: String
Default value: null
A string value that is used as the path where the generated addon xpi should be moved.
Type: Bool
Default value: true
A boolean value that is used to configure if addon-sdk bundled modules will be stripped from or bundled in the xpi.
NOTE:
Type Bool
Default value: null
A boolean value that is used to enable/disable print cfx commands output
"mozilla-cfx" is a grunt multi-task which run cfx command line tool on a extension directory using the available addon-sdk revisions.
Type: String
Default value: null
A string value used to set the addon-sdk (as named in the "mozilla-addon-sdk" section) to be used to run the defined cfx command.
Type: String
Default value: null
A string value that is used as the path which contains the addon extension to build.
Type: String
Default value: null
A string value that is used as the cfx command to run.
Type: String
A string value that is used to pass arguments to the cfx command to run.
Type Bool
Default value: null
A boolean value that is used to enable/disable print cfx commands output
$ grunt mozilla-addon-sdk
Running "mozilla-addon-sdk:1_14" (mozilla-addon-sdk) task
Downloading: https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.14.tar.gz
Running "mozilla-addon-sdk:master" (mozilla-addon-sdk) task
Downloading: https://github.com/mozilla/addon-sdk/archive/master.tar.gz
Done, without errors.
$ grunt mozilla-cfx-xpi
Running "mozilla-cfx-xpi:release" (mozilla-cfx-xpi) task
Creating dist dir '/home/rpl/PROJECTS/2013/MOZILLA/DEVTOOLS-EXT/grunt-mozilla-addon-sdk/tmp/dist'...
Creating xpi...
Generated XPI: /home/rpl/PROJECTS/2013/MOZILLA/DEVTOOLS-EXT/grunt-mozilla-addon-sdk/tmp/dist/test-addon.xpi
Done, without errors.
FIREFOX_BIN
and FIREFOX_PROFILE
environment variables in cfx
helperFAQs
Download and Run Mozilla Addon SDK
The npm package grunt-mozilla-addon-sdk receives a total of 0 weekly downloads. As such, grunt-mozilla-addon-sdk popularity was classified as not popular.
We found that grunt-mozilla-addon-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.