Skip to content

Latest commit

 

History

History
91 lines (56 loc) · 3.11 KB

CONTRIBUTING.md

File metadata and controls

91 lines (56 loc) · 3.11 KB

Contributing to can-query

Developing Locally

This section will walk you through setting up the repository on your computer.

Signing up for GitHub

If you don’t already have a GitHub account, you’ll need to create a new one.

Forking & cloning the repository

A “fork” is a copy of a repository in your personal GitHub account. “Cloning” is the process of getting the repository’s source code on your computer.

GitHub has a guide for forking a repo. To fork can-query, you can start by going to its fork page.

Next, you’ll want to clone the repo. GitHub’s cloning guide explains how to do this on Linux, Mac, or Windows.

GitHub’s guide will instruct you to clone it with a command like:

git clone https://github.com/YOUR-USERNAME/can-query

Make sure you replace YOUR-USERNAME with your GitHub username.

Installing the dependencies

After you’ve forked & cloned the repository, you’ll need to install the project’s dependencies.

First, make sure you’ve installed Node.js and npm.

If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone:

cd can-query

Next, install the project’s dependencies with npm:

npm install

Starting the development server

Run the following to start a dev server:

npm run develop

Running the tests

You can manually run this repository’s tests in any browser by starting the dev server (see the section above) and visiting this page: http://localhost:8080/test/test.html

Firefox is used to run the repository’s automated tests from the command line. If you don’t already have it, download Firefox. Mozilla has guides for installing it on Linux, Mac, and Windows.

After Firefox is installed, you can run:

npm test

Making a build

Run the following command to create a build:

npm run build

This will create a dist/ folder that contains the AMD, CommonJS, and global module versions of the project.

Minifying your build output

To output minified versions, in the build.js add minify: true to the outputs.

{
  // in build.js export config
  outputs: {
    "+cjs": { minify: true },
    "+amd": { minify: true },
    "+global-js": { minify: true }
  }
}

See Steal's export options for more details.