Skip to content
Branch: master
Clone or download
Latest commit 1bb9c8d May 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: no-robots for 5-dev and other config prep (#1676) Jul 3, 2018
deploy/urls Add some support for old links May 7, 2019
examples dartfmt changed indents May 10, 2019
gulp fix gulpfile.js and api-list.js for new path to api-list.json May 1, 2019
site-angular @ 87800df Fixing a few bugs, etc. Apr 30, 2019
site-shared @ 8a5c285 Fixing a few bugs, etc. Apr 30, 2019
src Roll angular packages May 22, 2019
tool move reference/api/ to /api Apr 30, 2019
.firebaserc Update .firebaserc May 7, 2019
.gitignore move reference/api/ to /api Apr 30, 2019
.gitmodules Upgrade to Node 10, gulp 4 (#1774) Aug 14, 2018
.travis.yml Enable publishing to angulardart.dev May 6, 2019
CONTRIBUTING.md More updates and tweaks. Apr 15, 2019
Gemfile Update Gemfile Apr 4, 2019
Gemfile.lock Fixing a few bugs, etc. Apr 30, 2019
README.md Fix typo May 7, 2019
_config.yml Update references to https://github.com/dart-lang/site-angulardev May 9, 2019
_config_dev.yml fix: social sharing image 404s (#1264) Jan 15, 2018
_config_now.yml Migrate to jekyll-assets 3.x (#1801) Aug 22, 2018
analysis_options.yaml Upgrade SDK to 2.0.0-dev.69.2 (#1737) Jul 25, 2018
build.excerpt.yaml Add fetch_data example (#1667) Jun 28, 2018
firebase.json Add some support for old links May 7, 2019
gulpfile.js fix gulpfile.js and api-list.js for new path to api-list.json May 1, 2019
package-lock.json Update lockfiles May 16, 2019
package.json Fixing a few bugs, etc. Apr 30, 2019
pubspec.lock Update lockfiles May 16, 2019
pubspec.yaml chore: upgrade to v1 of `build_runner` and build under `stable` (#1865) Dec 12, 2018

README.md

Site for AngularDart (angulardart.dev)

Build Status first-timers-only SVG

The angulardart.dev site, built with Jekyll and hosted on Firebase Hosting.

We welcome contributions, and we're first-timer friendly!

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.
  • Dart
  • Chrome v63 or later.

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 submodule

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

To clone this repo (site-angulardart), follow the instructions given in the GitHub help on Cloning a repository, and choose one of the following submodule-cloning techniques:

  • Clone this repo and its submodule at the same, use the --recurse-submodules option:
    git clone --recurse-submodules https://github.com/dart-lang/site-angulardart.git
  • If you've already cloned this repo without its submodule, then run this command from the repo root:
    git submodule update --init --remote

IMPORTANT: Whenever you update your repo, update the submodule as well:
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 terminal/command window and execute the following commands:

  1. cd <path-to-angulardart-repo>   # change to root of this repo, e.g.: ~/git/site-angulardart
  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:

  • 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.

Building this site

Once everything is installed, you need to do a full site build at least once:

  • npx gulp build --dartdoc   # full site build including API docs

The generated site is placed in the publish folder. To serve this folder use:

  • npx superstatic --port 4001

Or, if you aren't testing redirects, use this command (which has the bonus of autorefreshing your browser after edits):

  • jekyll serve --livereload

To view the generated site open localhost:4001 in a browser.

You can build, serve, and have a watcher for changes by running the following command:

  • ./tool/serve.sh

NOTE: Getting jekyll | Error: Too many open files under MacOS or Linux? One way to resolve this is to add the following to your .bashrc:

 ulimit -n 8192

and then reboot your machine.

If you'd like to separately build and then serve, the commands are:

  • npx gulp build --no-dartdoc   # build site without regenerating API docs
  • npx superstatic --port 4001   # serve site under publish

Some npx gulp build options include:

  • --clean   # deletes publish and file fragments (nothing else)
  • --[no-]dartdoc[=all|acx|ng|forms|router|test]   # generates API docs for named packages (default all)
  • --use-cached-api-doc   # will use cached API docs rather than regenerate them; without this option API docs are regenerated afresh each time
  • --fast   # skips some one-time setup tasks (can spead up repeated builds)
  • --log=x   # logging level: debug, info, warn (default), error

Rebuilding this site from scratch

If you encounter build problems, or if you haven't build this site in a while, you might want to rebuild it from scratch, doing all of the following steps (in order):

source ./tool/env-set.sh  # reset environment vars and (re-)install Node & Ruby
npx gulp clean            # clean out all temporary site folders
npx gulp build --dartdoc  # full site regeneration
./tool/serve.sh

If you are still having build problems, you might need to once again step through the installation instructions.

Deploying

Deploy to the default firebase project (hosting the official site) using this command:

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

Other useful Gulp tasks

npx gulp test --filter=template  # unit test only the template-syntax example
npx gulp e2e --filter=template   # end-to-end test only the template-syntax example
npx gulp clean && npx gulp build --dartdoc  # do a full build from a clean slate
npx gulp git-clean-src  # WARNING WARNING WARNING: this runs `git clean -xdf src`,
                        # so you'll lose uncommitted work under `src`!
You can’t perform that action at this time.