UNPKG

3.09 kBMarkdownView Raw
1# Contributing to can-stache-key
2
3## Developing Locally
4
5This section will walk you through setting up the [repository](https://github.com/canjs/can-stache-key) on your computer.
6
7### Signing up for GitHub
8
9If you don’t already have a GitHub account, you’ll need to [create a new one](https://help.github.com/articles/signing-up-for-a-new-github-account/).
10
11### Forking & cloning the repository
12
13A “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.
14
15GitHub has a guide for [forking a repo](https://help.github.com/articles/fork-a-repo/). To fork can-stache-key, you can start by going to its [fork page](https://github.com/canjs/can-stache-key/fork).
16
17Next, you’ll want to clone the repo. [GitHub’s cloning guide](https://help.github.com/articles/cloning-a-repository/) explains how to do this on Linux, Mac, or Windows.
18
19GitHub’s guide will [instruct you](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork) to clone it with a command like:
20
21```shell
22git clone https://github.com/YOUR-USERNAME/can-stache-key
23```
24
25Make sure you replace `YOUR-USERNAME` with your GitHub username.
26
27### Installing the dependencies
28
29After you’ve forked & cloned the repository, you’ll need to install the project’s dependencies.
30
31First, make sure you’ve [installed Node.js and npm](https://docs.npmjs.com/getting-started/installing-node).
32
33If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone:
34
35```shell
36cd can-stache-key
37```
38
39Next, install the project’s dependencies with npm:
40
41```shell
42npm install
43```
44
45### Starting the development server
46
47Run the following to start a dev server:
48
49```shell
50npm run develop
51```
52
53### Running the tests
54
55You 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
56
57Firefox is used to run the repository’s automated tests from the command line. If you don’t already have it, [download Firefox](https://www.mozilla.org/en-US/firefox/new/). Mozilla has guides for installing it on [Linux](https://support.mozilla.org/t5/Install-and-Update/Install-Firefox-on-Linux/ta-p/2516), [Mac](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Mac/ta-p/3453), and [Windows](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Windows/ta-p/2210).
58
59After Firefox is installed, you can run:
60
61```shell
62npm test
63```
64
65### Making a build
66
67Run the following command to create a build:
68
69```shell
70npm run build
71```
72
73This will create a `dist/` folder that contains the AMD, CommonJS, and global module versions of the project.
74
75### Building the documentation
76
77To generate the docs:
78
79```shell
80npm run document
81```
82
83This will create a `docs/` folder that contains a browsable site with all of your documentation.
84
85With the dev server running, you can view the docs at http://localhost:8080/docs/