Comments (10)
there's no eval. What's the use case? And yes, there must be a main() for a script to run.
from dart-sublime-bundle.
No concrete use case in mind. Let's say you want to print some fancy stuff in a file and you whip up a short dart script in the middle of the file.
I think there are plugins that let you do this with Python and other languages.
I'm adding a lot stuff just in a stream of conciousness way. Tell me when to stop if it gets too annoying! :)
from dart-sublime-bundle.
You could just create a temporary file with the snippet wrapped in a main function so it would run. You'd also have to bring in the imports the snippet needs.
from dart-sublime-bundle.
Or perhaps simply guarantee some imports where there in the first place. At least for a first implementation.
from dart-sublime-bundle.
Yeah, could just include all the dart:* imports except dart:html since that only works in a browser.
from dart-sublime-bundle.
Hm, in an effort to keep our TODO list small, we can marked this as "Not Planned" and close it out for now. The developer can always write a small script and Run it. Dart isn't really set up like Ruby or Python and you need a main() method and often imports to run a snippet of code.
from dart-sublime-bundle.
We don't have a roadmap or any other system to prioritize issues here, but the fact they are listed doesn't mean they will be done any time soon.
I will create a few tags to indicate this more clearly. Later on we can start using the milestones feature to group issues over a timeline.
from dart-sublime-bundle.
ok, added some priority labels. how do they look?
from dart-sublime-bundle.
LGTM. Should I rename when:Next
to something like priority:High
? I think we both created new labels at the same time. :-)
from dart-sublime-bundle.
Closing this for now.
from dart-sublime-bundle.
Related Issues (20)
- Add support for dart format --line-length
- ensure we don't call into the DAS from widgets
- New syntax: null-aware operators
- f12 (go to definition) does not always jump to definition
- The plugin doesn't work for stagehand console app HOT 2
- formatting introduces CR chars (Windows)
- DAS won't suggest localName for dom.Element HOT 1
- reinstate dart sdk autodiscovery
- handle error responses from DAS
- --no-package-symlinks with pub get
- Use dartdoc for generating documentation
- Installing Dart and setting up a project
- Syntax highlighter wont recognize nested comments
- Allow project configuration of pubspec.yaml
- When running file, kill the previous process.
- Command line args for server apps
- Dart analysis server wastes memory
- g_server not being initialized HOT 1
- Is this project abandoned? HOT 4
- Sublime Text 3 Version 3211 Don't recognize path to dart-sdk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-sublime-bundle.