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

generator-adaptivejs

v2.3.1

Published

A generator for Yeoman

Downloads

30

Readme

Adaptive.js Generator

A generator for Yeoman that lets you quickly setup an Adaptive.js project.

NPM version

Usage

Install generator-adaptivejs:

npm install -g generator-adaptivejs

Run yo adaptivejs:

yo adaptivejs

Follow the prompts and answer the required questions

Once completed, run grunt preview to start previewing

How to test a change to the generator

If you made a change to generator-adaptivejs and you want to test the local version of the Yeoman generator, run npm link and then yo adaptivejs.

Options

Slug

Specifying the --slug option allows you to skip the prompt for entering the project's slug:

yo adaptivejs --slug [project-slug]

URL

Specifying the --url option allows you to skip the prompt for entering your site's URL:

yo adaptivejs --url [site-url]

Defaults

If you want to use some simple defaults, you can use the --defaults option:

yo adaptivejs --defaults

For Mobify's specific defaults, use the following:

yo adaptivejs --defaults mobify

Sub-generators

There are several sub-generators included:

View/Page

For generating additional pages with their respective files (view, template, UI script, integration test, and test fixture):

yo adaptivejs:view

or

yo adaptivejs:page

Git Hooks

For projects that already have linting tasks set up (grunt lint, grunt scsslint), easily add Mobify's pre-push git hook to lint your code while it is pushed up:

yo adaptivejs:githooks

The Living Styleguide

For projects that use the Mobify standard of libsass through grunt-sass and node-sass-import-once, add Mobify's Living Styleguide with:

yo adaptivejs:styleguide

Note: Several files may need overriding for these additions. Proceed with caution.

Linting

JavaScript source code in this generator is linted with ESLint according to our code syntax and style standards here at Mobify.

Linting may be run with:

grunt lint

Running tests

To run tests within generator-adaptivejs itself (generator source code will be linted as well):

npm test

To run unit and integration tests in the generated project:

grunt test

To run nightwatch WebDriver tests in the generated project:

grunt nightwatch

To run nightwatch tests locally on a real device (android or ios, requires Appium):

grunt android (or grunt ios)

To run nightwatch tests on an Android emulator or iOS simulator on Sauce Labs:

grunt sauce-android (or grunt sauce-ios)

Building a custom selector library

The Adaptive generator allows you to install one of two selector libraries: jQuery or Zepto. We build custom versions of these selector libraries in order to add/remove specific features we require/don't require. Follow the directions below to build a custom version of your selector library of choice.

jQuery

By default, we remove a number of jQuery modules to reduce the overall file size. Please see the jQuery README in github for more information.

Clone and setup jQuery's dependencies

$ git clone https://github.com/jquery/jquery.git
$ cd jquery
$ npm install

Run the custom build

$ grunt custom:-deprecated,-ajax/jsonp,-deferred

Zepto

By default we build Zepto with the addition of the selector, stack, and data modules. Please see the Zepto README in github for more information.

Clone and setup Zepto's dependencies

$ git clone https://github.com/madrobby/zepto.git
$ cd zepto
$ npm install

Run the custom build

# build a custom zepto
$ MODULES="zepto event ajax form fx selector stack data" npm run-script dist

Once built, copy the zepto.js and zepto.min.js files into the app/vendor/zepto directory in the root of your Adaptive project.

Documentation

http://adaptivejs.mobify.com/

Releasing

When releasing a new version, follow these steps:

  1. Bump version in package.json
  2. Add to CHANGELOG
  3. Create a new git tag corresponding to that version and push to origin.
  4. npm publish