diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..136ff7a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ +# Contributing to can-legacy-view-helpers + +Check out the [contribution guide on CanJS.com](https://canjs.com/doc/guides/contribute.html) for information on: + +- [Code of Conduct](https://canjs.com/doc/guides/contribute.html#CodeofConduct) +- [Getting Help](https://canjs.com/doc/guides/contribute.html#GettingHelp) +- [Project Organization](https://canjs.com/doc/guides/contributing/project-organization.html) +- [Reporting Bugs](https://canjs.com/doc/guides/contributing/bug-report.html) +- [Suggesting Features](https://canjs.com/doc/guides/contributing/feature-suggestion.html) +- [Finding Ways to Contribute](https://canjs.com/doc/guides/contributing/finding-ways-to-contribute.html) + +The rest of this guide has information that’s specific to this repository. + +## Developing Locally + +This section will walk you through setting up the [repository](https://github.com/canjs/can-legacy-view-helpers) on your computer. + +### Signing up for GitHub + +If 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/). + +### 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](https://help.github.com/articles/fork-a-repo/). To fork can-legacy-view-helpers, you can start by going to its [fork page](https://github.com/canjs/can-legacy-view-helpers/fork). + +Next, 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. + +GitHub’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: + +```shell +git clone https://github.com/YOUR-USERNAME/can-legacy-view-helpers +``` + +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](https://docs.npmjs.com/getting-started/installing-node). + +If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone: + +```shell +cd can-legacy-view-helpers +``` + +Next, install the project’s dependencies with npm: + +```shell +npm install +``` + +### Starting the development server + +Run the following to start a dev server: + +```shell +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](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). + +After Firefox is installed, you can run: + +```shell +npm test +``` + +### Making a build + +Run the following command to create a build: + +```shell +npm run build +``` + +This will create a `dist/` folder that contains the AMD, CommonJS, and global module versions of the project. + diff --git a/README.md b/README.md index fe39169..f04bc3f 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,26 @@ -#can-legacy-view-helpers +# can-legacy-view-helpers -The files in this repository are used by legacy view engines for CanJS, specifically [can-ejs](https://github.com/canjs/can-ejs) and [can-mustache](https://github.com/canjs/can-mustache). This module is not intended to be used as a standalone module. While the code in this repository has been heavily tested and should be considered stable, it is no longer supported. Please use at your own risk. - -CanJS now ships with [Stache](https://canjs.com/docs/can.stache.html) as its primary view engine - it is much faster than mustache and ejs. You should use it instead!readm - -## Usage - -### ES6 use - -With StealJS, you can import this module directly in a template that is autorendered: - -```js -import plugin from 'can-legacy-view-helpers'; -``` - -### CommonJS use +[![Join the chat at https://gitter.im/canjs/canjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/canjs/can-legacy-view-helpers/blob/master/LICENSE.md) +[![npm version](https://badge.fury.io/js/can-legacy-view-helpers.svg)](https://www.npmjs.com/package/can-legacy-view-helpers) +[![Travis build status](https://travis-ci.org/canjs/can-legacy-view-helpers.svg?branch=master)](https://travis-ci.org/canjs/can-legacy-view-helpers) +[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-legacy-view-helpers.svg)](https://greenkeeper.io/) -Use `require` to load `can-legacy-view-helpers` and everything else -needed to create a template that uses `can-legacy-view-helpers`: - -```js -var plugin = require("can-legacy-view-helpers"); -``` - -## AMD use - -Configure the `can` and `jquery` paths and the `can-legacy-view-helpers` package: +The files in this repository are used by legacy view engines for CanJS, specifically [can-ejs](https://github.com/canjs/can-ejs) and [can-mustache](https://github.com/canjs/can-mustache). This module is not intended to be used as a standalone module. While the code in this repository has been heavily tested and should be considered stable, it is no longer supported. Please use at your own risk. -```html - - -``` +## Documentation -### Standalone use +Read the [API docs on CanJS.com](https://canjs.com/doc/can-legacy-view-helpers.html). -Load the `global` version of the plugin: +## Changelog -```html - -``` +See the [latest releases on GitHub](https://github.com/canjs/can-legacy-view-helpers/releases). ## Contributing -### Making a Build - -To make a build of the distributables into `dist/` in the cloned repository run - -``` -npm install -node build -``` +The [contribution guide](https://github.com/canjs/can-legacy-view-helpers/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more. -### Running the tests +## License -Tests can run in the browser by opening a webserver and visiting the `test.html` page. -Automated tests that run the tests from the command line in Firefox can be run with +[MIT](https://github.com/canjs/can-legacy-view-helpers/blob/master/LICENSE.md) -``` -npm test -``` diff --git a/documentjs.json b/documentjs.json deleted file mode 100644 index 3e9945e..0000000 --- a/documentjs.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "sites": { - "docs": { - "dest": "docs", - "parent": "can-mustache", - "pageConfig": { - "page": "docs" - }, - "glob": { - "pattern": "./**/*.{js,md}" - } - } - } -} diff --git a/package.json b/package.json index 591753e..a264e63 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "release:patch": "npm version patch && npm publish", "release:minor": "npm version minor && npm publish", "release:major": "npm version major && npm publish", - "document": "documentjs", "develop": "can-serve --static --develop --port 8080" }, "main": "can-legacy-view-helpers", @@ -65,4 +64,4 @@ "generator-donejs": "^0.9.6", "donejs-cli": "^0.9.5" } -} +} \ No newline at end of file