dart-pub

Pub does not download dependencies on Windows 7 after the update to lib v2 (SDK 0.3.1_r17328)

时光毁灭记忆、已成空白 提交于 2019-12-23 20:12:25
问题 After the update to the version 0.3.1_r17328 of Dart SDK and Dart Editor I have some trouble to import some library particulary Args library. I have the same problem both directly importing Args or importing Web_ui where Args is one of the dependencies. Here is my pubspec.yaml: name: notes description: A sample application dependencies: web_ui: 0.3.0+1 or: name: notes description: A sample application dependencies: args: 0.3.1+1 Here is the error generate from build.dart Unable to open file:

pub upgrade downgrades my main-packages

流过昼夜 提交于 2019-12-23 17:49:10
问题 Here is my dependency-list: dependencies: browser: any polymer: any polymer_elements: any angular: any lawndart: any validate: any http_utils: any And here is what I get if I say "pub upgrade" Resolving dependencies... (42.5s) analyzer 0.12.2 (4 newer versions available) angular 0.9.10 args 0.9.0 (3 newer versions available) barback 0.11.1 (2 newer versions available) bignum 0.0.5 browser 0.9.1 (3 newer versions available) cipher 0.6.0 (1 newer version available) code_transformers 0.0.1-dev.2

Dart Package Management via dart2js

时光毁灭记忆、已成空白 提交于 2019-12-23 15:37:25
问题 I'm learning Dart and its dependency manager pub and am having a tough time seeing the "forest through the trees" here. Say I want to use Polymer.dart in my project. So, in my project root, I create the following pubspec.yaml : name: test_dart description: A sample web application dependencies: browser: any polymer: ">=0.9.0 <0.10.0" I then run pub get , which goes to the pub repo and fetches the browser and polymer dependencies that I've specified. It then creates a packages directory in my

Can you pass compiler flags to dart2js via Dart Editor

佐手、 提交于 2019-12-23 12:03:29
问题 I want to run a no minify build but not from Terminal. Can I do it form the Dart Editor IDE itself? 回答1: Dart2JS can be configured using pubspec.yaml Configuring the Built-in dart2js Transformer. You also need a custom launch configuration until DartEditor's internal web server is replaced by pub serve which is work in progress. 回答2: Under Run -> Manage Launches you can create a new Dart2js launch and pass in whatever compiler flags you want. 来源: https://stackoverflow.com/questions/22054960

What does plus one (+1) mean in dart's dependency versioning

让人想犯罪 __ 提交于 2019-12-23 07:37:01
问题 I see this +1 in a some flutter dependencies and have been wondering what it means because i have been seeing it more often these days. Sample pubspec.yaml dependencies: flutter: sdk: flutter cloud_firestore: ^0.8.1+1 sqflite: 0.12.2+1 zoomable_image: ^1.2.1+1 I have checked here but didn't find it. What is the meaning? And can it also be +n eg +2? 回答1: + means it is a regular release build, while - would indicate a pre-release build. (No build number after x.y.z also indicates a release

Is there a workaround for pub dependency resolution through proxies?

独自空忆成欢 提交于 2019-12-22 10:48:56
问题 I'm trying to play with https://github.com/dart-lang/web-ui-code-lab for dart development. If I follow the pdf and open step05, then try to run chat_server.dart, I get this error (my path has no spaces in it, in case that's relevant): dart --enable-checked-mode bin/chat_server.dart Unable to open file: path/to/web-ui-code-lab-master/step05/bin/packages/dart_chat/file_logger.dart'file:///path/to/dart/web-ui-code-lab-master/step05/bin/chat_server.dart': Error: line 5 pos 1: library handler

Dart: “Invalid argument(s): Illegal character in path” when building on Windows

江枫思渺然 提交于 2019-12-22 08:34:26
问题 The offending line in my index.html file reads <script src="main.dart" type="application/dart"></script> The error report is: Build error: Transform polymer (PolymerBootstrapTransformer) on myproj_frontend|web/index.html threw error: Invalid argument(s): Illegal character in path dart:core/uri.dart 855 Uri._checkWindowsPathReservedCharacters dart:core/uri.dart 956 Uri._makeWindowsFileUrl The entire path to the project is D:\Projects\MyProj\MyProj_Project I'm building from command line on

How to deploy a Dart Polymer app to Javascript using dart2js

南楼画角 提交于 2019-12-21 19:46:23
问题 I got a problem while deploying Dart code using Polymer to Javascript. I've created a polymer application with DartEditor and made a simple example. This example works in Dartium but when I try to build it as a Polymer App (in Javascript) and launch it, the app fails. How am I supposed to convert a Dart Polymer app to Javascript ? Here's the example code I made that fails : example.html : <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Example</title> <link rel="import" href=

How to install pub (command line usage) for Dart on Ubuntu web-server

久未见 提交于 2019-12-21 03:39:33
问题 I've followed the instructions here (under the Linux tab) on installing Dart onto a Ubuntu web-server. Dart itself works fine, but I can't use Pub commands (only Dart commands). How can I install Pub for the server? 回答1: Here are Dart’s installation instructions for 64bit version of Ubuntu using the Aptitude (apt) package manager (as found on the website): # Enable HTTPS for apt. $ sudo apt-get update $ sudo apt-get install apt-transport-https # Get the Google Linux package signing key. $

In Dart and Pub, should I add pubspec.lock to my .gitignore?

▼魔方 西西 提交于 2019-12-18 03:08:18
问题 Should I add this generated file to my .gitignore so that it doesn't show up in my repository? Should pubspec.lock be included in my repository? 回答1: This answer has two parts, similarly to the question and answer in this question about Ruby bundler. Application packages If you are working on an application package, then you should keep the pubspec.lock file in your repository as a snapshot of your dependencies. From the Pub glossary: Application packages should check their lockfiles into