Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ node_modules
# Dart and Flutter
.flutter-plugins
.packages
.pub/
pubspec.lock
.dart_tool
# pubspec.lock
packages
example.g/
example.g

# We haven't had any issues due to npm (sub-)package version discrepancies,
# so we'll ignore the npm lock file for now.
package-lock.json

src/_includes/code/**/android/
src/_includes/code/**/ios/
Expand Down
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js: 10
sudo: false
language: dart
dart: stable

# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
# https://github.com/flutter/flutter/issues/6207
Expand All @@ -22,12 +21,18 @@ env:
- TASK="bundle exec jekyll build"

before_install:
- rvm install 2.4.3
- rvm use 2.4.3
- source ./tool/env-set.sh
- ./tool/before_install.sh

install:
- ./tool/install.sh
# - ./tool/write-ci-info.sh -v

script: $TASK

after_script:
- if [[ $TASK == *build* ]]; then ./tool/check-links.sh || travis_terminate 1; fi

deploy:
- provider: script
script: ./tool/deploy.sh --install dash # TODO: drop dash
Expand Down
97 changes: 73 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,87 @@
# [Flutter][]'s website

The website for [Flutter][].

[![Build Status](https://api.cirrus-ci.com/github/flutter/website.svg?branch=master)](https://cirrus-ci.com/github/flutter/website/master)
[![Build Status SVG][]][Repo on Travis]

## Issues, bugs, and requests

We welcome contributions and feedback on our website!
Please file a request in our
[issue tracker](https://github.com/flutter/flutter/issues/new)
[issue tracker](https://github.com/flutter/website/issues/new)
and we'll take a look.

## Developing
For simple changes (such as to CSS and text), you probably don't need to build this site.
Often you can make changes using the GitHub UI.

If you want/need to build, read on.

## Before you build this site

### 1. Get the prerequisites

Install the following tools if you don't have them already.

- **[nvm][]**, the Node Version Manager.
- **[rvm][]**, the Ruby Version Manager.
- **[Flutter][Flutter install]**
- **[Dart SDK][Dart install]**

Install Jekyll and related tools by following the
[instructions](https://help.github.com/articles/using-jekyll-with-pages/)
provided by GitHub.
> IMPORTANT: Follow the installation instructions for each of the tools
carefully. In particular, configure your shell/environment so
that the tools are available in every terminal/command window you create.

A tldr version follows:
### 2. Clone this repo _and_ its submodule

1. Ensure you have [Ruby](https://www.ruby-lang.org/en/documentation/installation/)
installed; you need version 2.4.3 or later:<br>
`ruby --version`
> NOTE: This repo has a git _submodule_, which affects how you clone it.

1. Ensure you have [Bundler](http://bundler.io/) installed; if not install with:<br>
`gem install bundler`
To **clone [this repo][]**, follow the instructions given in the
GitHub help on [Cloning a repository][], and _choose one_ of the following
submodule-cloning techniques:

1. Install Ruby gems:<br> `bundle install`
* On macOS, if you encounter errors while building native Ruby extensions, see [Installing Nokogiri](http://www.nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x) for troubleshooting tips.
- Clone this repo and its submodule _at the same_, use the
`--recurse-submodules` option:<br>
`git clone --recurse-submodules https://github.com/flutter/website.git`
- If you've already cloned this repo without its submodule, then run
this command from the repo root:<br>
`git submodule update --init --remote`

1. Install tool for serving locally (one-time setup):<br>
`npm install -g superstatic`
> IMPORTANT:
> Whenever you update your repo, update the submodule as well:<br>
> `git pull; git submodule update --init --remote`

1. (Optional) If you plan to deploy to a firebase project, install this package (one-time setup):<br>
`npm install -g firebase-tools`
### 3. Run installation scripts

> NOTE: It is safe to (re-)run all of the commands and scripts given below even
if you already have the required packages installed.

**Open a terminal/command window** and execute the following commands:

1. <code>cd <i>\<path-to-this-repo></i></code> &nbsp;&nbsp;# change to
**root of this repo**
1. `source ./tool/env-set.sh` &nbsp;&nbsp;#
initialize environment variables; install/use required Node & Ruby version
1. `./tool/before-install.sh` &nbsp;&nbsp;#
install core set of required tools
1. `./tool/install.sh` &nbsp;&nbsp;#
install everything else needed to build this site

> IMPORTANT:
> - Any time you create a **new terminal/command window** to work on
> this repo, **repeat steps 1 and 2** above.
> - If you upgrade Dart then rerun all of the steps above.

## Developing

1. Create a branch.

1. Make your changes.

1. Test your changes by serving the site locally. Run either one of these commands:
1. Test your changes by serving the site locally. Run either **one** of these commands:

- `tool/serve.sh`
- `tool/serve.sh`, _or_
- `bundle exec jekyll serve --incremental --watch --livereload --port 4002`

1. Prior to submitting, run link validation:<br>
`rake checklinks`
`tool/check-links.sh`

## Deploy to a staging site

Expand Down Expand Up @@ -274,7 +310,7 @@ redirects (`rake checklinks` doesn't run the Firebase server) and it won't
check incoming links.

Before we can move the more complete
[automated `linkcheck` solution](https://github.com/dart-lang/site-webdev/blob/master/scripts/check-links-using-fb.sh)
[automated `linkcheck` solution](https://github.com/dart-lang/site-webdev/blob/master/tool/check-links-using-fb.sh)
from dartlang.org, we recommend manually running the following.

* First time setup:
Expand All @@ -301,3 +337,16 @@ from dartlang.org, we recommend manually running the following.
```
linkcheck :4002 --input-file tool/sitemap.txt
```

[Build Status SVG]: https://travis-ci.org/flutter/website.svg?branch=dash
[Cloning a repository]: https://help.github.com/articles/cloning-a-repository
[Dart install]: https://www.dartlang.org/install
[Flutter install]: https://flutter.io/get-started/install
[Firebase]: https://firebase.google.com/
[first-timers SVG]: https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square
[first-timers]: https://www.firsttimersonly.com/
[Jekyll]: https://jekyllrb.com/
[nvm]: https://github.com/creationix/nvm#installation
[Repo on Travis]: https://travis-ci.org/flutter/website
[rvm]: https://rvm.io/rvm/install#installation
[this repo]: https://github.com/flutter/website
File renamed without changes.
16 changes: 16 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: flutter_io_examples

environment:
sdk: '>=2.0.0-dev <3.0.0'

dev_dependencies:
flutter_driver:
sdk: flutter
path: ^1.5.0
test: '>= 0.12.37 <2.0.0'
url_launcher: ^3.0.3
path_provider: ^0.4.1
shared_preferences: 0.4.1
transparent_image: 0.1.0
css_colors: 1.0.2
web_socket_channel: 1.0.9
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "www.dartlang.org",
"version": "0.0.0",
"private": true,
"description": "www.dartlang.org",
"repository": {
"type": "git",
"url": "https://github.com/dart-lang/site-www.git"
},
"devDependencies": {
"firebase-tools": "4.0.3",
"superstatic": "^5.0.2"
}
}
Loading