Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Flutter website

Flutter‘s website

Issues, bugs, and requests

We welcome contributions and feedback on our website! Please file a request in our issue tracker and we’ll take a look.

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.

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.

2. Clone this repo and its submodules

NOTE: This repo has git submodules, which affects how you clone it.

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:

NOTE: At any time during development you can use the submodule command to refresh submodules:

git pull; git submodule update --init --remote

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 bash terminal/command window and execute the following commands:

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

IMPORTANT:

Developing

  1. Create a branch.
  2. Make your changes.
  3. Test your changes by serving the site locally. Run either one of these commands:
    • ./tool/serve.sh (can also run via npm run start) or
    • bundle exec jekyll serve --incremental --watch --livereload --port 4002 Note: Unless you’re editing files under site-shared, you can safely ignore ERROR: directory is already being watched messages. For details, see #1363. Note: The first time you run either one of these commands, jekyll takes anywhere between 10 – 20 seconds to generate static content inside the _sites directory. If you try to verify the site locally but aren’t able to see the content right away, wait 20 seconds before stopping the server or concluding that something is wrong.
  4. Prior to submitting, validate site links:
    ./tool/shared/check-links.sh

TIP: Sometimes Jekyll gets confused and seems to be out-of-sync. (This might happen, for example, when you pull from master and lots of files have moved.) To fix Jekyll, stop the serve.sh script and remove the generated site files: hand, and then restart the serve.sh script:

npm run clean OR rm -Rf ./_site/* ./.jekyll*

Next, restart the serve.sh script:

npm run start OR ./tool/serve.sh

Deploy to a staging site

You can deploy your local edits to a personal staging site as follows (steps 1 and 2 need to be done only once):

  1. In the Firebase Console, create your own Firebase project (e.g. ‘mit-flutter-staging’)
  2. Tell Firebase about that project with the firebase use command: $ npx firebase use –add ? Which project do you want to add? <select the project you created> ? What alias do you want to use for this project? (e.g. staging) my-foo
  3. Tell Firebase that you want to deploy to staging: $ npx firebase use my-foo Now using alias staging (<your project name>)
  4. Tell Firebase to execute deployment of your project:
$ npx firebase deploy

Your personal version of the Flutter website is now deployed to Firebase.

Alternatively, you can skip the previous steps and just use the deploy script:

$ ./tool/shared/deploy.sh --local my-foo

=== Deploying to '<your project name>'...

i  deploying hosting
i  hosting: preparing _site directory for upload...
✔  hosting: 213 files uploaded successfully
i  starting release process (may take several minutes)...

✔  Deploy complete!

Deploying to the official site

Usually, official site deploys are performed by Travis. In the event that you need to manually deploy, use the deploy script and the default project:

./tool/shared/deploy.sh --local --robots ok default

Writing for flutter.dev

The site-shared repo contains infrastructure shared by most of our Dart and Flutter websites. As a result, we’ve moved some of content of this README to the docs directory in the shared repo.

For more information on using/writing for this repo, refer to the following docs:

Also check out the site-shared wiki:

Check out the Flutter Web App Example Source Code on GitHub

https://github.com/flutter/website

Exit mobile version