GithubHelp home page GithubHelp logo

wangkesen / ampstart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ampproject/ampstart

0.0 2.0 0.0 130.67 MB

AMP Start source code and templates .

Home Page: https://ampstart.com/

License: Apache License 2.0

CSS 32.85% HTML 57.03% JavaScript 10.13%

ampstart's Introduction

A collection of quick-start templates to build your AMP page quickly and easily. AMP Start is built on top of Basscss a low-level CSS toolkit.

Workspace Setup

Installation

  1. Install NodeJS.
  2. In the repo directory, run npm i command to install the required npm packages.

Build & Test

Command Description
npm run build[1] Builds the AMP library.
npm run clean Removes build output.
npm run www Recompile www to build directory.
npm run highlight Build HTML for code highlighting.
npm run watch[1] Watches for changes in files, re-builds development files.
npm run serve Serves content in repo dist/ dir over http://localhost:8000/. Also, watches/livereloads for file changes. Port number can be changed with -- --port="PORT_NUMBER_HERE"
npm run configurator Serves only the amp start configurator livereload/development server at http://localhost:8080/. Port number can be changed with -- --port="PORT_NUMBER_HERE"

[1] On Windows, this command must be run as administrator.

Deploying AMP on Cloud for testing on devices

For deploying and testing local AMP builds on Firebase, please follow the steps outlined in this page. Note that the firebase configuration is already created in the project.

Repository Layout

Directory Description
components/ CSS and HTML snippets (Mustache) for AMP Start components.
build/ (generated) intermediate generated files.
css/ CSS assets.
css/ampstart-base CSS Base AMP Start elements like buttons.
css/templates CSS for AMP Start templates.
css/www CSS for www.ampstart.com.
dist/ (generated).
hl-partials/ Partials that help generate copy pastable html for www.ampstart.com/components.html.
img/ Image assets.
tasks/ Gulp tasks.
templates/ AMP Start template HTML.
www/ www.ampstart.com

Supported browsers

In general we support the 2 latest versions of major browsers like Chrome, Firefox, Edge, Safari and Opera. We support desktop, phone, tablet and the web view version of these respective browsers.

Beyond that, the core AMP library and builtin elements should aim for very wide browser support and we accept fixes for all browsers with market share greater than 1 percent.

In particular, we try to maintain "it might not be perfect but isn't broken" - support for the Android 4.0 system browser and Chrome 28+ on phones.

Notes

amp-mustache

Since ampstart uses the Mustache language to build files, it can conflict with the amp-mustache template. To fix this, use <% instead of {{:

  <template type="amp-mustache">
      <%title%>
      <amp-img src="<%imageUrl%>" width="50" height="50"></amp-img>
  </template>

Who makes AMP Start?

AMP Start is made by the AMP Project, and is licensed under the Apache License, Version 2.0.

ampstart's People

Contributors

camelburrito avatar erwinmombay avatar gurmukhp avatar ericlindley-g avatar tonyruscoe avatar raisaveuc avatar matharden avatar spacedino avatar willdonohoe avatar ciampo avatar kahlil avatar lillian-wang avatar ithinkihaveacat avatar muxin avatar cramforce avatar robinpokorny avatar sebastianbenz avatar timbrockman avatar

Watchers

James Cloos avatar 王可森 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.