Giter Site home page Giter Site logo

marinatrajk / docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ampproject/amp.dev

0.0 0.0 0.0 901.2 MB

The AMP Project Website.

Home Page: https://amp.dev

License: Other

Dockerfile 0.13% JavaScript 29.74% HTML 38.44% CSS 27.47% Shell 0.11% Python 3.04% Go 1.07%

docs's Introduction

amp.dev

Build Status

The official homepage of the AMP Project.

Contributing

We welcome contributons to amp.dev.

  • Bug reports and feature requests: something missing or not working on https://amp.dev? Please file an issue here.
  • Documentation & Guides: see this guide for more information on how to contribute documentation to amp.dev.
  • Code samples & demos: see this guide for more information on how to contribute sample code to amp.dev.

Note: fixing spelling mistakes and other small changes are often easiest by directly editing a file on Github.

Inline editing on Github

Setup

Requirements

  1. Install the LTS version of NodeJS. An easy way to do so is with nvm. (Mac and Linux: here, Windows: here)

    $ nvm install --lts
  2. Install Grow the static site generator used to build amp.dev:

    $ curl https://install.grow.io | bash
  3. Install the dependencies for the project:

    $ npm install

Develop

If it's your first time working on amp.dev it is recommended to bootstrap your local environment. To do so make sure you have setup a valid GitHub access token in an environment variable named AMP_DOC_TOKEN like:

$ export AMP_DOC_TOKEN="c59f6..."

This enables the import from GitHub to run flawlessly which can be started by the following command which additionally will build the Playground and Boilerplate Generator once:

$ gulp bootstrap

You can then start developing in your local environment with the command below. The task will take care of building and copying all files, watching them for changes and rebuild them when needed. Beware that changes to the express.js backend require to restart the task.

$ gulp develop

This command prints a lot to the shell and will most probably end on Server ready. Press ctrl-c to quit.. This means everything went fine so far but other than stated in the logs the site is then available at http://localhost:8080/. The service running on 8081 is only Grow rendering the pages.

Maintenance

Documents

Made changes to a lot of Grow documents at once and not quite sure if all references are still valid? You can run npm run lint:grow to pick up broken ones.

Samples

Building the samples creates a lot of individual files per sample. In order to still have a quick startup time for development only changed samples are rebuilt. To freshly build all samples you can run gulp develop --clean-samples.

Run a test build

To run a local test build that does all the minifying and vends the static pages instead of proxying them through to Grow you can run

$ gulp build --env local
$ npm run start:local

Build

Caution: starting a build automatically cleans all locations of possible remainings from previous builds. Make sure you don't have anything there that you want to keep - additionally check your working copy for eventual unintended local changes.

To perform a build run the following command with --env being one of the following valid environments: development, local, staging or production:

$ gulp build --env <environment>

This builds all parts of the project and might take a while. Usually all builds on amp-dev-staging.appspot.com and amp.dev are built using Travis CI. In case you want to reproduce one of those remote builds in your local environment you can fetch the build artifacts by running:

$ gulp fetchArtifacts --travis-build <build_number>

Copyright 2019 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.

docs's People

Contributors

matthiasrohmer avatar pbakaus avatar sebil avatar sidval avatar crystalonscript avatar leeee avatar sebastianbenz avatar dandzdandz avatar siregar avatar captainlee2009 avatar coryphwang avatar rachnakumar avatar keevcodes avatar renovate-bot avatar meggin avatar techhtml avatar mshetty2 avatar wuzhi1023 avatar mattludwig avatar lilies avatar robinvanopstal avatar lluerich avatar bretmorris avatar tharders avatar morsssss avatar erwinmombay avatar bengotow avatar mrjoro avatar caroqliu avatar mrlnts avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.