npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-appc-utility

v2.0.0

Published

A Grunt utility plugin that contains commonly used methods and other Grunt plugins.

Downloads

15

Readme

grunt-appc-utility

A Grunt utility plugin (for Arrow apps) that contains commonly used methods and exposes other Grunt plugins.

Getting Started

This plugin requires Grunt ~1.0.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-appc-utility --save-dev

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

grunt.loadNpmTasks('grunt-appc-utility');

Overview

This plugin is not your typical Grunt plugin. Its main purpose is to centralize all commonly used methods and other Grunt plugins into one "parent" plugin. This will help reduce repeated Grunt-code in our Arrow app repos that depend on Grunt.

Other Grunt plugins exposed in this utility:

API

appc_unpublish_all

Since there is a max amount of times you can publish your Arrow app, this task will indiscriminately unpublish all of your Arrow versions except for the last deployed version.

Example
module.exports = function (grunt) {

    ...

    // NOTE: no configuration is needed in grunt.initConfig for this task
    grunt.registerTask('make_room', ['appc_unpublish_all']);
};

appc_ssl

Generate a .pem file using the specified certificates and/or key files.

Example
module.exports = function (grunt) {

    ...

    grunt.initConfig({
        appc_ssl: {
            foo: {
                src: [
                    'conf/software.appcelerator.com.crt',
                    'conf/gd_intermediate.crt',
                    'conf/software.appcelerator.com.key',
                ],
                dest: 'build/software.appcelerator.com.pem'
            }
        }
    });

    ...

    grunt.registerTask('make_pem', ['appc_ssl']);
};
Required Target Properties
src

Type: Array

An array of string paths to your list of certificates/keys.

Note: The order in which you specify your certificates/keys matter when generating your .pem file:

  • http://serverfault.com/questions/476576/how-to-combine-various-certificates-into-single-pem
  • https://www.digicert.com/ssl-support/pem-ssl-creation.htm

Specifying the order is left to the user's discretion.

dest

Type: String

File path to generate your .pem file. .pem extension is required.


appc_istanbul_run

Copy, instrument, and run the Arrow project.

Note: This is an alias task for AppcIstanbul_setupAndRun from grunt-appc-istanbul. The only difference is that you will not need to specify the waitForLog property; see below for more information.

Example
module.exports = function (grunt) {

    ...

    grunt.initConfig({
        appc_istanbul_run: {
            foo: {
                src: [
                    'app.js',
                    'apis/*.js',
                    'blocks/*.js',
                ]
            }
        }
    });

    ...

    grunt.registerTask('coverage', ['appc_istanbul_run', 'someTests']);
};
Required Target Property
src

Type: Array

The string values in the array should be JS files in your Arrow project that you want code coverage on.

Optional Target Property
waitForLog

Type: String

Default value: server started on port 8080

To ensure that your Arrow project is up and running, the plugin will wait for the specified the log output from appc run. Once the log is found, the plugin will move onto the next task.


appc_istanbul_report

Create a code coverage report. If a report type is not specified, then a Cobertura report is generated by default.

Note: This is an alias task for AppcIstanbul_makeReport from grunt-appc-istanbul. The difference is the default behavior: appc_istanbul_report will generate a Cobertura report and AppcIstanbul_makeReport will generate a HTML coverage report. If you want more coverage report types, see https://github.com/appcelerator/grunt-appc-istanbul#appcistanbul_makereport.

Example
module.exports = function (grunt) {

    ...

    grunt.initConfig({
        appc_istanbul_run: {
            foo: {
                src: [
                    'app.js',
                    'apis/*.js',
                    'blocks/*.js',
                ]
            }
        },
        appc_istanbul_report: {
            foo: {
                dest: 'coverage/'
            }
        }
    });

    ...

    grunt.registerTask('coverage', ['appc_istanbul_run', 'someTests', 'appc_istanbul_report']);
};
Required Target Property
dest

Type: String

The value should be a directory and you do not need to create the dest directory beforehand. It will be created if one does not exist.


appc_js

Linting and style checks for Appcelerator JavaScript. Also, detects the use of any JS libraries that contain security vulnerabilities; see here.

Note: This is an alias task for appcJs from grunt-appc-js. The only difference is the task name; changed the task name to be consistent with the other alias tasks. If you want to see the types of options available for appc_js, see grunt-appc-js.

Example
module.exports = function (grunt) {

    ...

    grunt.initConfig({
        appc_js: {
            options: {
                force: false,
                fix: false,
                globals: {
                    "$config": true
                }           
            },
            src: ['paths', 'to', 'js', 'files']
        }
    });

    ...

    grunt.registerTask('check_usage', ['appc_js']);
};

appc_travis

Use with caution since this has not been fully tested.

Installs and configures the Appcelerator Travis CI machines.

Note: This task is a port of https://github.com/ingo/grunt-appc-ci/blob/master/tasks/appc_travis.js.

Example
module.exports = function (grunt) {

    ...

    // NOTE: no configuration is needed in grunt.initConfig for this task
    grunt.registerTask('stuff', ['appc_travis']);
};