barneyjs

    5.1.0 • Public • Published

    Barney

    Build Status Coverage Status npm version Bower version GitHub version

    Barney is a collection of Angular micro-libraries, useful for various purposes.

    Every micro-library is indipendent, tested and documented.

    This is the list of Barney libreries with related description:

    Library Description
    Browser It allows to manage paths, states and query string of your browser.
    Config It allows to manage configuration parameters of your application.
    Dictionary It allows to manage dictionary keys of your application.
    Infinite It allows to use the infinite-scoll feature: it runs a method (i.e. call an API) when the user scrolls the page and reaches the end of a component (i.e. a list of items).
    Live HTML It allows to load trusted HTML code in your application, without pre-checks and sanitization.
    Meta It allows to set different metatags for each page, in an Angular application.

    How to install Barney

    Bower

    • Install Barney with Bower
    bower install --save barney
    
    • Add barney files you want use to index.html file, according to Barney documentation.
      For example, for infinite module add:
    <script src="bower_components/barney/dist/infinite.min.js"></script>
    
    • Add barney main module to your app.js file
    angular.module('myproject', [ ..., 'barney'])
    

    NPM

    • Install Barney with NPM
    npm install --save barneyjs
    
    • Add barney files you want use to index.html file, according to Barney documentation.
      For example, for infinite module add:
    <script src="node_modules/barneyjs/dist/infinite.min.js"></script>
    
    • Add barney main module to your app.js file
    angular.module('myproject', [ ..., 'barney'])
    

    Full documentation

    To read documentation, open

    http://d-mobilelab.github.io/barney/temp replacing temp with version number.

    For example, for version 4.0.0, open

    http://d-mobilelab.github.io/barney/4.0.0

    Contribute

    Clone and install dependecies

    • Clone Barney git
    git clone https://github.com/D-Mobilelab/barney.git barney
    
    npm install -g bower grunt
    
    • Install NPM and Bower dependecies
    npm install
    bower install
    

    Grunt command list

    Command Description
    grunt lint Run es-lint to check that code respects the style guide. Single run task.
    grunt test Run unit test. Single run task.
    grunt coverage Run unit test, calculate coverage, run a local server to display the coverage report and wait. When a file is changed (in "example", "src" or "test" folder), the test re-run and the server is reloaded.
    P.S. to read coverage, open "lcov-report" folder in browser.
    grunt doc Create temporary documentation, run a local server to display it and wait. When a file is changed (in "modules" folder), the documentation is re-created and the server is reloaded.
    grunt serve Run a local server on "example" folder. When a file is changed (in "example" or "src" folder), the server is reloaded.
    grunt travis Create a new build, run unit test, calculate coverage, send coverage to coveralls, run es-lint and create a temporary documentation. (This command can be executed only on Travis; it's useful to check if build is successful).
    grunt version Create a new build, run unit test, calculate coverage, run es-lint, create a new version (major, minor or patch), create a new official documentation.

    Create a new version

    Barney uses Git flow to create a new feature or make an hotfix and Semantic Versioning to create a new version.

    • When you push on master branch, Travis checks if all test are successful, es-lint is successful, the documentation is created without problems and the coverage is sent to coveralls successful. If everything goes well, then Travis approves the merge and a new version can be created
    • On master branch use this command
    grunt version
    
    • You can choose between a major version, a minor version or a patch
    ? Current: 1.1.0 - Choose a new version for Barney: (Use arrow keys)
    ❯ No new version 
      Major Version (2.0.0) 
      Minor Version (1.2.0) 
      Patch (1.1.1)
    
    • Describe the features of this new version, seperating them with semicolons
    ? Features for version 1.2.0 (use ";" to separate features): ()
    
    • Commit, Push, Tag, Docs and NPM version will be automatically updated during the grunt version process

    • The new Barney version is ready!

    Problems publishing a new npm version?

    Try running the following commands

    npm login
    
    • Enter your credentials
    npm publish
    

    The new version will be now published on npm!

    Install

    npm i barneyjs

    DownloadsWeekly Downloads

    1

    Version

    5.1.0

    License

    MIT

    Unpacked Size

    17.6 MB

    Total Files

    876

    Last publish

    Collaborators

    • aureliome
    • ffognani
    • lore96