pretty_samples 0.0.5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 30

pretty_samples

Prettify code samples in HTML files using Javascript code prettifier in AngularDart apps.

This library could be used with DaCSS Presentation Library

Demo

Demo is built version of example` folder.

Usage

Check example folder.

Add SamplesModule:

import 'package:angular/application_factory.dart';
import 'package:pretty_samples/dacss_samples.dart';

main() {
       applicationFactory().addModule(new SamplesModule()).run();
}

After that you can add sample attribute to any HTML element, like

<div sample='some-sample.html`></div>

Module will download some-sample.html content, prettify it and put into div.

You can also reference samples inside same document by IDs:

<div sample='#someId'></div>
<div id="#sampleId" style="display:none"></div>

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version

example/pretty_samples.dart

// Copyright (c) 2015, Valentyn Shybanov. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library dacss_samples.example;

import 'package:angular/application_factory.dart';
import 'package:pretty_samples/pretty_samples.dart';

main() {
  applicationFactory().addModule(new SamplesModule()).run();
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  pretty_samples: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:pretty_samples/pretty_samples.dart';
  
Version Uploaded Documentation Archive
0.0.5 May 27, 2016 Go to the documentation of pretty_samples 0.0.5 Download pretty_samples 0.0.5 archive
0.0.4 May 11, 2015 Go to the documentation of pretty_samples 0.0.4 Download pretty_samples 0.0.4 archive
0.0.3 May 11, 2015 Go to the documentation of pretty_samples 0.0.3 Download pretty_samples 0.0.3 archive
0.0.2 Apr 20, 2015 Go to the documentation of pretty_samples 0.0.2 Download pretty_samples 0.0.2 archive
0.0.1 Apr 20, 2015 Go to the documentation of pretty_samples 0.0.1 Download pretty_samples 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
30
Learn more about scoring.

We analyzed this package on Jul 22, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7

Platforms

Detected platforms: web

Primary library: package:pretty_samples/pretty_samples.dart with components: html, js, mirrors.

Issues and suggestions

Running dartdoc failed.

Make sure dartdoc runs without any issues.

Add SDK constraint in pubspec.yaml.

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Package is too old.

The package was released more than two years ago.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Format lib/pretty_samples.dart.

Run dartfmt to format lib/pretty_samples.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
angular >=1.1.1 <1.2.0 1.1.2+2 4.0.0+2
Transitive dependencies
analyzer 0.26.4 0.32.4
args 0.12.2+6 1.4.4
async 1.9.0 2.0.8
barback 0.15.2+7 0.15.2+16
browser 0.10.0+3
charcode 1.1.2
cli_util 0.0.1+2 0.1.3+2
code_transformers 0.2.11 0.5.1+5
collection 1.1.3 1.14.11
csslib 0.13.7+1 0.14.4+1
di 3.3.5+1 3.3.10
glob 1.1.7
html 0.12.2+2 0.13.3+2
html5lib 0.12.1
intl 0.8.10+4 0.15.7
logging 0.11.3+2
meta 1.1.6
observe 0.13.1+3 0.15.1
package_config 0.1.5 1.0.5
path 1.6.2
perf_api 0.0.9 0.1.0
plugin 0.1.0 0.2.0+3
pool 1.3.6
route_hierarchical 0.6.2 0.7.0
smoke 0.3.5 0.3.6+3
source_maps 0.10.7
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.3
utf 0.9.0+5
watcher 0.9.7 0.9.7+10
when 0.2.0
which 0.1.3
yaml 2.1.15
Dev dependencies
guinness >=0.1.17 <0.2.0
unittest >=0.11.0 <0.13.0 0.11.7 0.12.4+1