Skip to content

AMP HTML source code, samples, and documentation. See below for more info.

License

Notifications You must be signed in to change notification settings

BlancosWay/amphtml

Repository files navigation

The AMP HTML runtime.

The AMP HTML runtime implements the AMP HTML format and in particular its components in form of custom elements.

Repository Layout

  ads/            - Modules implementing specific ad networks used in 
  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
  examples/       - example AMP HTML files and corresponding assets
  extensions/     - plugins which extend the AMP HTML runtime's core set of tags
  fixtures/       -
  spec/           - The AMP HTML Specification files
  src/            - source code for the AMP runtime
  test/           - tests for the AMP runtime and builtins
  testing/        - testing infrastructure

Development

Installation

npm i

Map ads.localhost and iframe.localhost to 127.0.0.1 in your /etc/hosts file.

Build

Build Status

Builds main binaries for development. Watches and rebuilds as changes are saved. gulp

gulp minify Builds production binaries.

Test

gulp test Runs tests.

gulp test --verbose (short name: -v) Runs tests with logging enabled.

gulp test --watch (short name: -w) Runs tests for changed files.

gulp test --watch --verbose (short name: -w -v) Runs tests for changed files with logging enabled.

gulp test --safari Runs tests in Safari. It is required to manually test this before sending PR.

gulp test --firefox Runs tests in Firefox. It is required to manually test this before sending PR.

To fix issues with Safari test runner launching multiple instances of the test run defaults write com.apple.Safari ApplePersistenceIgnoreState YES

Start dev server

Execute in the base dir:

python -m SimpleHTTPServer

or:

npm install http-server -g

and then:

http-server -p 8000 -c-1

Then go to http://localhost:8000/examples/released.amp.html

About

AMP HTML source code, samples, and documentation. See below for more info.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.5%
  • HTML 4.6%
  • CSS 1.9%