Skip to content

Commit

Permalink
Split up contributing and dev docs and link to our Google Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
cramforce committed Oct 7, 2015
1 parent bc95fd0 commit 1713575
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 66 deletions.
63 changes: 3 additions & 60 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,63 +61,6 @@ We highly prefer integrations that do not use iframes. JSONP cannot be used for

Like all contributions, Extended Components will be analyzed for performance impact, code quality and style, and directional alignment with the project.

### Installation

1. `npm i`
2. `edit /etc/hosts` and map `ads.localhost` and `iframe.localhost` to `127.0.0.1`:
<pre>
127.0.0.1 ads.localhost iframe.localhost
</pre>

### Build & Test

[![Build Status](https://magnum.travis-ci.com/ampproject/amphtml.svg?token=AmxgqDRzeUjVvqT2oydf&branch=master)](https://magnum.travis-ci.com/ampproject/amphtml)

| Command | Description |
| ----------------------------- | --------------------------------------------------------------------- |
| `gulp` | Same as "watch" |
| `gulp minify` | Builds production binaries. |
| `gulp lint` | Validates against Google Closure Linter. |
| `gulp build` | Builds the AMP library. |
| `gulp clean` | Removes build output. |
| `gulp test` | Runs tests in Chrome. |
| `gulp test --verbose` | Runs tests in Chrome with logging enabled. |
| `gulp test --watch` | Watches for changes in files, runs corresponding test(s) in Chrome. |
| `gulp test --watch --verbose` | Same as "watch" with logging enabled. |
| `gulp test --safari` | Runs tests in Safari. |
| `gulp test --firefox` | Runs tests in Firefox. |
| `http-server -p 8000 -c-1` | serves content in current working dir over http://localhost:8000/ |

To fix issues with Safari test runner launching multiple instances of the test, run:
<pre>
defaults write com.apple.Safari ApplePersistenceIgnoreState YES
</pre>

### Manual testing

For testing documents on arbitrary URLs with your current local version of the AMP runtime we created a [Chrome extension](testing/local-amp-chrome-extension/README.md).

## Repository Layout
<pre>
3p/ - Implementation of third party sandbox iframes.
ads/ - Modules implementing specific ad networks used in <amp-ad>
build/ - (generated) intermediate generated files
build-system/ - build infrastructure
builtins/ - tags built into the core AMP runtime
*.md - documentation for use of the builtin
*.js - source code for builtin tag
css/ - default css
dist/ - (generated) main JS binaries are created here. This is what
gets deployed to cdn.ampproject.org.
dist.3p/ - (generated) JS binaries and HTML files for 3p embeds and ads.
This is what gets deployed to 3p.ampproject.net.
docs/ - documentation
examples/ - example AMP HTML files and corresponding assets
examples.build/ - (generated) Same as examples with files pointing to the
local AMP.
extensions/ - plugins which extend the AMP HTML runtime's core set of tags
spec/ - The AMP HTML Specification files
src/ - source code for the AMP runtime
test/ - tests for the AMP runtime and builtins
testing/ - testing infrastructure
</pre>
### Next steps

See [DEVELOPING](DEVELOPING.md).
85 changes: 85 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!---
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

## Development on AMP HTML

### Installation

1. `npm i`
2. `edit /etc/hosts` and map `ads.localhost` and `iframe.localhost` to `127.0.0.1`:
<pre>
127.0.0.1 ads.localhost iframe.localhost
</pre>

### Build & Test

[![Build Status](https://magnum.travis-ci.com/ampproject/amphtml.svg?token=AmxgqDRzeUjVvqT2oydf&branch=master)](https://magnum.travis-ci.com/ampproject/amphtml)

| Command | Description |
| ----------------------------- | --------------------------------------------------------------------- |
| `gulp` | Same as "watch" |
| `gulp minify` | Builds production binaries. |
| `gulp lint` | Validates against Google Closure Linter. |
| `gulp build` | Builds the AMP library. |
| `gulp clean` | Removes build output. |
| `gulp test` | Runs tests in Chrome. |
| `gulp test --verbose` | Runs tests in Chrome with logging enabled. |
| `gulp test --watch` | Watches for changes in files, runs corresponding test(s) in Chrome. |
| `gulp test --watch --verbose` | Same as "watch" with logging enabled. |
| `gulp test --safari` | Runs tests in Safari. |
| `gulp test --firefox` | Runs tests in Firefox. |
| `http-server -p 8000 -c-1` | serves content in current working dir over http://localhost:8000/ |

To fix issues with Safari test runner launching multiple instances of the test, run:
<pre>
defaults write com.apple.Safari ApplePersistenceIgnoreState YES
</pre>

### Manual testing

For testing documents on arbitrary URLs with your current local version of the AMP runtime we created a [Chrome extension](testing/local-amp-chrome-extension/README.md).

## Repository Layout
<pre>
3p/ - Implementation of third party sandbox iframes.
ads/ - Modules implementing specific ad networks used in <amp-ad>
build/ - (generated) intermediate generated files
build-system/ - build infrastructure
builtins/ - tags built into the core AMP runtime
*.md - documentation for use of the builtin
*.js - source code for builtin tag
css/ - default css
dist/ - (generated) main JS binaries are created here. This is what
gets deployed to cdn.ampproject.org.
dist.3p/ - (generated) JS binaries and HTML files for 3p embeds and ads.
This is what gets deployed to 3p.ampproject.net.
docs/ - documentation
examples/ - example AMP HTML files and corresponding assets
examples.build/ - (generated) Same as examples with files pointing to the
local AMP.
extensions/ - plugins which extend the AMP HTML runtime's core set of tags
spec/ - The AMP HTML Specification files
src/ - source code for the AMP runtime
test/ - tests for the AMP runtime and builtins
testing/ - testing infrastructure
</pre>

## Eng docs

- [Life of an AMP *](https://docs.google.com/document/d/1WdNj3qNFDmtI--c2PqyRYrPrxSg2a-93z5iX0SzoQS0/edit#)
- [AMP Layout system](https://docs.google.com/document/d/1YjFk_B6r97CCaQJf2nXRVuBOuNi_3Fn87Zyf1U7Xoz4/edit)

We also recommend scanning the [spec](spec/). The non-element part should help understand some of the design aspects.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This allows the AMP library to include:
* The AMP JS library, that manages the loading of external resources to ensure a
fast rendering of the page.
* An AMP validator that provides a way for web developers to easily validate
that their code meets the AMP HTML specification.
that their code meets the AMP HTML specification.
* Some custom elements, called AMP HTML components, which make common patterns
easy to implement in a performant way.

Expand All @@ -65,7 +65,7 @@ Adding "#development=1" to the URL of the page instructs the AMP Runtime to run
a series of assertions confirming the page's markup meets the AMP HTML
Specification. Validation errors are logged to the browser's console when the
page is rendered, allowing web developers to easily see how complex changes in
web code might impact performance and user experience.
web code might impact performance and user experience.

It also allows apps that integrate web content to validate the web page against
the specification. This allows an app to make sure the page is fast and
Expand All @@ -88,7 +88,7 @@ These components can:
amp-slides.
* Make advanced performance techniques easy, such as amp-anim, which allows web
developers to dynamically serve animated images as either image files (GIF)
or video files (WebM or MP4) based on browser compatability.
or video files (WebM or MP4) based on browser compatability.

# Further Reading

Expand Down Expand Up @@ -118,6 +118,4 @@ under the [Apache License, Version 2.0](LICENSE.md).

## Contributing

Please see [the CONTRIBUTING file](CONTRIBUTING.md) for resources on
contributing to the AMP Project.

Please see [the CONTRIBUTING file](CONTRIBUTING.md) for information on contributing to the AMP Project, and [the DEVELOPING file](DEVELOPING.md) for documentation on the AMP library internals.

0 comments on commit 1713575

Please sign in to comment.