pretty_samples 0.0.5

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

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();
}

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

Analysis

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

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
9 / 100
Overall score:
Weighted score of the above. [more]
31
Learn more about scoring.

Platforms

Detected platforms: web

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

Suggestions

  • 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 API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    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.31.1
args 0.12.2+6 1.4.2
async 1.9.0 2.0.6
barback 0.15.2+7 0.15.2+15
browser 0.10.0+3
charcode 1.1.1
cli_util 0.0.1+2 0.1.2+1
code_transformers 0.2.11 0.5.1+4
collection 1.1.3 1.14.9
csslib 0.13.7+1 0.14.1
di 3.3.5+1 3.3.10
glob 1.1.5
html 0.12.2+2 0.13.3
html5lib 0.12.1
intl 0.8.10+4 0.15.6
logging 0.11.3+1
meta 1.1.2
observe 0.13.1+3 0.15.1
package_config 0.1.5 1.0.3
path 1.5.1
perf_api 0.0.9 0.1.0
plugin 0.1.0 0.2.0+2
pool 1.3.4
route_hierarchical 0.6.2 0.7.0
smoke 0.3.5 0.3.6+3
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
utf 0.9.0+4
watcher 0.9.7 0.9.7+7
when 0.2.0
which 0.1.3
yaml 2.1.13
Dev dependencies
guinness >=0.1.17 <0.2.0
unittest >=0.11.0 <0.13.0 0.11.7 0.12.4+1