configer 0.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 46

Configer

Configer is a small library for Dart that makes creating config files easy.

Early alpha state of development! But it works :D

Inspired by Yamler of geNAZt (https://www.spigotmc.org/resources/yamler.315/)

Usage

A simple usage example:

import 'dart:io';
import 'package:Configer/configer.dart';

main( ) async {
    var myConfig = new TestConfig( new File( "myCoolConf.json" ) );
    await myConfig.init();
    print( myConfig.foo ); // Outputs the value in
    print( myConfig.bar ); // myCoolConf.json or the
    print( myConfig.foobar ); // default value if there is one
}

class TestConfig extends Config {
    int foo = 34;
    bool bar;
    String foobar;

    TestConfig( File configLocation ) : super( configLocation );
}

This generates a file myCoolConf.json which contains the default values:

{
  "foo": 34,
  "bar": null,
  "foobar": "Default string"
}

Just edit the config and see the result!

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version
  • basic functionality
  • save/read config file
  • default values

1. Depend on it

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


dependencies:
  configer: "^0.0.1"

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:configer/configer.dart';
        
Version Uploaded Documentation Archive
0.0.1 Dec 8, 2016 Go to the documentation of configer 0.0.1 Download configer 0.0.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: other

Primary library: package:configer/configer.dart with components: io, mirrors.

Suggestions

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

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
test >=0.12.0 <0.13.0