Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-adaptivejs

Package Overview
Dependencies
Maintainers
5
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-adaptivejs

A generator for Yeoman

  • 2.1.0-beta3
  • beta
  • components
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

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

Running tests

To run tests within generator-adaptivejs itself:

grunt 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. Below are the steps required to build Zepto with our defaults. 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 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

Keywords

FAQs

Package last updated on 11 Sep 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc