Giter Club home page Giter Club logo

quickstart's Introduction

AngularDart Community Website/Documentation

AngularDart Chat Jekyll CI Firebase Hosting

The official repo has been archived and doesn't allow any changes, hence I created this fork so that we, the AngularDart community, can work on improvements by ourselves (and perhaps have our own documentation site?).

Feel free to create & submit ANY issues and pull requests! Nothing is too small to fix, even just a typo :)

A more modern and up-to-date new website is on its way!

The AngularDart community-maintained documentation site, built with Jekyll and hosted on Firebase Hosting.

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

Our main focus now is to keep the version of the website up-to-date with the latest version of AngularDart, but as stated above, feel free to submit anything. See the migration guide for more info!

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 your change involves code samples, adds/removes pages, or affects navigation, you'll need to build and test your work before submitting. If you want or need to build the site, follow the steps below.

Before you build this site

Windows users might find themselves having trouble building this site because they can't run .sh files. We're currently migrating the workflows from using gulpjs to Dart's grinder, which will do everything in Dart and resolve this problem. Sorry Windows users! (and how about considering using linux in the meantime?) We have migrated (most) workflows to Dart and Docker, so Windows users should be able to build the site now. But seriously, considering switching to Linux?

Also, if you do a full-site build, it takes up about 2~3GB of space. Hard Drive Lives Matter!

1. Get the prerequisites

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

  • Docker. We use Docker for local development and building the site. Install it from https://docs.docker.com/get-docker/.
  • GNU Make. On Windows the easiest way to install Make is choco install make using command prompt or powershell as an admin. Other options include using a [subsystem][wsl].

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/angulardart-community/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

Some common problems that might occur during this process (Linux/Mac only; for Windows please open an issue):

  1. dart pub get getting stuck for hours, usually on dart_style.

    Solution: before running all the steps above, run the following in the project root:

    pub global activate webdev
    pub global activate dartdoc
    pub get
    

Building this site

  1. (Optional) Build the container image from scratch. If you don't have the hard drive space to do so or you just want to quickly see how it looks, you can skip this step and use the image we provide on GitHub. However, if you're changing dependencies, you must run this step to update the dependencies in the image.

    make setup
  2. Serve the site locally (via docker compose).

    make up
  3. View your changes in the browser by navigating to http://localhost:5000.

    Note: Unless you're editing files under site-shared, you can safely ignore ERROR: directory is already being watched messages. For details, see #1363.

  4. Make your changes to the local repo.

    The site will rebuild and the browser will autoreload to reflect the changes.

    Tip: If you aren't seeing the changes you expect (e.g. src/_data), ctrl-C out of your running dev server and rebuild the site from scratch using the following commands:

    $ make down && make clean && make up
  5. When you've finished developing, shut down the Docker container:

    $ make down

For more advance usage, see below

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.

Other useful grinder tasks

To see the full list of workflow commands available, run grind --help. Below are a few handy ones that you'll likely use to make your life easier. (More coming soon!)

grind clean # Clean build artifacts

quickstart's People

Contributors

chalin avatar gzgavinzhao avatar kwalrath avatar muraray avatar thso avatar

Stargazers

 avatar  avatar  avatar

quickstart's Issues

AngularDart not working

khandelwaladitya5@penguin:~/quickstart-master$ webdev serve
[INFO] ../.pub-cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:21:70: Error: The method 'toJson' isn't defined for the class
[INFO] ../.pub-cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:24:66: Error: The method 'toJson' isn't defined for the class
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
[SEVERE] This is likely caused by a misconfigured builder definition.
[SEVERE]
Unhandled exception:
Bad state: Unable to start build daemon.
#0 _handleDaemonStartup. (package:build_daemon/client.dart:79:21)
#1 _runUserCode (dart:async/stream_pipe.dart:11:23)
#2 Stream.firstWhere. (dart:async/stream.dart:1704:9)
#3 _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#4 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#5 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#6 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#7 _SyncBroadcastStreamController._sendDone. (dart:async/broadcast_stream_controller.dart:399:22)
#8 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:322:15)
#9 _SyncBroadcastStreamController._sendDone (dart:async/broadcast_stream_controller.dart:398:7)
#10 _BroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:268:5)
#11 _AsBroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:505:27)
#12 _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#13 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#14 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#15 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#16 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#17 _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#18 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#19 _LineSplitterSink.close (dart:convert/line_splitter.dart:137:11)
#20 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#21 _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#22 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#23 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#24 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#25 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#26 _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#27 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#28 _Utf8ConversionSink.close (dart:convert/string_conversion.dart:305:20)
#29 _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:81:18)
#30 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#31 _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#32 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#33 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#34 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#35 _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:782:19)
#36 _StreamController._closeUnchecked (dart:async/stream_controller.dart:637:7)
#37 _StreamController.close (dart:async/stream_controller.dart:630:5)
#38 _Socket._onData (dart:io-patch/socket_patch.dart:2362:21)
#39 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#40 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#41 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#42 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#43 _StreamController._add (dart:async/stream_controller.dart:648:7)
#44 _StreamController.add (dart:async/stream_controller.dart:596:5)
#45 new _RawSocket. (dart:io-patch/socket_patch.dart:1884:35)
#46 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1327:18)
#47 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#48 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#49 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#50 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)

ngdart on web/main.dart: Null check operator used on a null value

Hey,

I am running dart v2.17.0 i am getting stuck cause an error occured during the serve with webdev

i use dsm for version manager dart ran on windows 11 system

i tried multiple version of dart like

  • v 2.12.0
  • v 2.19.0
  • v 2.19.6
[INFO] Building new asset graph completed, took 1.6s
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms
[INFO] Serving `web` on http://127.0.0.1:8080
[INFO] Generating SDK summary completed, took 5.1s
[SEVERE] ngdart on web/main.dart: Null check operator used on a null value
#0      ElementAnnotationExtensions.targetKinds (package:analyzer/src/dart/element/extensions.dart:42:51)
#1      BestPracticesVerifier.visitAnnotation (package:analyzer/src/error/best_practices_verifier.dart:323:25)
#2      AnnotationImpl.accept (package:analyzer/src/dart/ast/ast.dart:318:50)
#3      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8777:20)
#4      AnnotatedNodeImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:154:17)
#5      UriBasedDirectiveImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12094:11)
#6      ImportDirectiveImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:6787:11)
#7      RecursiveAstVisitor.visitImportDirective (package:analyzer/dart/ast/visitor.dart:1111:10)
#8      BestPracticesVerifier.visitImportDirective (package:analyzer/src/error/best_practices_verifier.dart:627:11)
#9      ImportDirectiveImpl.accept (package:analyzer/src/dart/ast/ast.dart:6783:50)
#10     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8777:20)
#11     CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2454:19)
#12     RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:817:10)
#13     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2448:50)
#14     LibraryAnalyzer._computeHints (package:analyzer/src/dart/analysis/library_analyzer.dart:344:10)
#15     LibraryAnalyzer._computeDiagnostics.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:274:9)
#16     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13)
#17     LibraryAnalyzer._computeDiagnostics (package:analyzer/src/dart/analysis/library_analyzer.dart:273:13)
#18     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:92:5)
#19     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1373:11)
<asynchronous suspension>
#20     PerformanceLog.runAsync (package:analyzer/src/dart/analysis/performance_logger.dart:50:14)
<asynchronous suspension>
#21     AnalysisDriver._computeErrors (package:analyzer/src/dart/analysis/driver.dart:1410:26)
<asynchronous suspension>
#22     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1118:20)
<asynchronous suspension>
#23     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2171:7)
<asynchronous suspension>


[WARNING] No actions completed for 15.1s, waiting on:
  - ngdart on lib/app_component.dart
  - ngdart on test/app_test.dart
  - ngdart on test/app_test.dart.browser_test.dart
  - build_web_compilers:ddc_modules on lib/$lib$
  - build_web_compilers:ddc_modules on web/main.dart
  .. and 1 more

[WARNING] No actions completed for 15.1s, waiting on:
  - ngdart on lib/app_component.dart
  - ngdart on test/app_test.dart
  - ngdart on test/app_test.dart.browser_test.dart
  - build_web_compilers:ddc_modules on lib/$lib$
  - build_web_compilers:ddc_modules on web/main.dart
  .. and 1 more

anyone can help me to run AngularDart server please

The project is not running because of the following issue?

Running the project by F5 key or the command line below:

webdev serve

Error:

[INFO] ../../.pub-cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:21:70: Error: The method 'toJson' isn't 
[INFO] ../../.pub-cache/hosted/pub.dev/build_modules-4.0.6/lib/src/module_cache.dart:24:66: Error: The method 'toJson' isn't 
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
[SEVERE] This is likely caused by a misconfigured builder definition.
[SEVERE] 
Unhandled exception:
Bad state: Unable to start build daemon.
#0      _handleDaemonStartup.<anonymous closure> (package:build_daemon/client.dart:79:21)
#1      _runUserCode (dart:async/stream_pipe.dart:11:23)
#2      Stream.firstWhere.<anonymous closure> (dart:async/stream.dart:1704:9)
#3      _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#4      _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#5      _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#6      _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#7      _SyncBroadcastStreamController._sendDone.<anonymous closure> (dart:async/broadcast_stream_controller.dart:399:22)
#8      _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:322:15)
#9      _SyncBroadcastStreamController._sendDone (dart:async/broadcast_stream_controller.dart:398:7)
#10     _BroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:268:5)
#11     _AsBroadcastStreamController.close (dart:async/broadcast_stream_controller.dart:505:27)
#12     _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#13     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#14     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#15     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#16     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#17     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#18     _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#19     _LineSplitterSink.close (dart:convert/line_splitter.dart:137:11)
#20     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#21     _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#22     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#23     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#24     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#25     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:87:11)
#26     _EventSinkWrapper.close (dart:async/stream_transformers.dart:21:11)
#27     _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#28     _Utf8ConversionSink.close (dart:convert/string_conversion.dart:305:20)
#29     _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:81:18)
#30     _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:132:24)
#31     _RootZone.runGuarded (dart:async/zone.dart:1581:10)
#32     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#33     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:7)
#34     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:291:7)
#35     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:782:19)
#36     _StreamController._closeUnchecked (dart:async/stream_controller.dart:637:7)
#37     _StreamController.close (dart:async/stream_controller.dart:630:5)
#38     _Socket._onData (dart:io-patch/socket_patch.dart:2362:21)
#39     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#40     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#41     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#42     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#43     _StreamController._add (dart:async/stream_controller.dart:648:7)
#44     _StreamController.add (dart:async/stream_controller.dart:596:5)
#45     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1884:35)
#46     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1327:18)
#47     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#48     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#49     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#50     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)

Environment:

flutter doctor -v

After running the above command:

[✓] Flutter (Channel stable, 3.7.6, on Ubuntu 22.04.2 LTS 5.19.0-35-generic,
    locale en_US.UTF-8)
    • Flutter version 3.7.6 on channel stable at
      /home/abdullah/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.gitFramework revision 12cb4eb7a0 (5 days ago), 2023-03-01 10:29:26 -0800Engine revision ada363ee93
    • Dart version 2.19.3DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/abdullah/Android/SdkPlatform android-33, build-tools 33.0.1Java binary at:
      /home/abdullah/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.
      6008.13.2211.9514443/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2022.1)
    • Android Studio at
      /home/abdullah/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.
      6008.13.2211.9514443Flutter plugin version 72.1.2Dart plugin version 221.6096Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)

[✓] VS CodeVS Code at /snap/code/current
    • Flutter extension version 3.60.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.2 LTS
      5.19.0-35-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host AvailabilityAll required HTTP hosts are available

• No issues found!

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.