<commit_before># Atom

Make Atom Packages in Dart

## Features

- Atom API Bindings
- Super Awesome Package Builder

## Example Package

See the [example package](https://github.com/DirectMyFile/atom.dart/tree/master/example) for more information.

## Example API

```dart
import "package:atom/atom.dart";

void main() {
  onPackageActivated(activate);
}

void activate() {
  atom.workspace.observeTextEditors((TextEditor editor) {
    print("Text Editor Opened");
    editor.onWillInsertText((WillInsertTextEvent event) {
      print("Inserting Text: ${event.text}");
    });
  });
}
```

## Package Builder

The package builder is a script that builds your package using the instructions you give it.

It generates the following:

- Styles
- KeyMaps
- Menus
- Context Menus
- Grammars
- package.json

And it also compiles your code to JavaScript and lints your package.json!

### Example

```dart
import "package:atom/builder.dart";

Menu textMenu = menu("dart-text", contextMenu: true, selector: "atom-workspace")
  .createMenu("Text Utilities");<commit_msg>Example API => Example Code<commit_after># Atom

Make Atom Packages in Dart

## Features

- Atom API Bindings
- Super Awesome Package Builder

## Example Code

```dart
import "package:atom/atom.dart";

void main() {
  onPackageActivated(activate);
}

void activate() {
  atom.workspace.observeTextEditors((TextEditor editor) {
    print("Text Editor Opened");
    editor.onWillInsertText((WillInsertTextEvent event) {
      print("Inserting Text: ${event.text}");
    });
  });
}
```

## Example Package

See the [example package](https://github.com/DirectMyFile/atom.dart/tree/master/example) for more information.

## Package Builder

The package builder is a script that builds your package using the instructions you give it.

It generates the following:

- Styles
- KeyMaps
- Menus
- Context Menus
- Grammars
- package.json

And it also compiles your code to JavaScript and lints your package.json!

### Example

```dart
import "package:atom/builder.dart";

Menu textMenu = menu("dart-text", contextMenu: true, selector: "atom-workspace")
  .createMenu("Text Utilities");
{'fraction_non_alphanumeric': 0.1188582124473561, 'fraction_numerical': 0.0, 'mean_word_length': 4.412658227848102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5337095', 'n_tokens_mistral': 667, 'n_tokens_neox': 654, 'n_words': 198}