Giter Club home page Giter Club logo

sprint's Introduction

sprint
npm Build Status Coverage Status gzip

Simple SPA alternative for small web pages in 2 kB.

Sprint

  • Tiny: under 2 kB of ES3 gzipped

🤔 What's Missing?

  • Use container to wrap new pages.
  • Simple virtual DOM or reconciliation, call as you wish. 😁
  • Test Creation
  • Create lifecycle

Table of Contents

Install

Install via yarn:

$ yarn add sprintjs

Install via npm:

$ npm install --save sprintjs

With a bundler module as a rollup or webpack, use:

// using ES6 modules
import sprintjs from 'sprintjs'

// using CommonJS modules
var sprintjs = require('sprintjs')

The UMD build is also available on unpkg:

<script src="//unpkg.com/sprintjs"></script>

Usage

Use from HTML tag.

<script>
  var Sprint = new sprintjs(
    {
      routes: [
        '*.html',
        '/site/*'
      ],
      enabled: true,
    }
  )
</script>

Or use Sprint package.

import Sprint from 'sprintjs';

const engine = new Sprint({
  routes: [
    '*.html',
    '/site/*'
  ],
  enabled: true,
});

Examples & Demos

API

Sprint's big proposition is to provide a familiar API and simple to implement on any static website.

sprintj(options: Object)

Sprint contains the following properties in options:

  • routes: An array, routes are added to enable Sprint. Use of the * before or after the / or . The mechanism understands and will process anything forward.
  • enabled: A boolean, true, or false to activate the engine.

Contribute

First of all, thank you for your contribution.

Now, remember the priority is simplicity to use and size.

Reporting Issues

Did you find a problem? Do you want a new feature? First check if your problem or idea has been reported. If there is a new question, please be clear and descriptive.

🚨 Check issue open and closed.

Submitting pull requests

Make sure your pull requests are within scope and that you follow the project assumptions.

🚨 Submit your pull solipsies with tests if necessary.

  • Fork it!
  • Clone your fork: git clone https://github.com/<your-username>/sprint
  • Navigate to the newly cloned directory: cd sprint
  • Create a new branch for the new feature: git checkout -b new-feature
  • Install the tools necessary for development: yarn
  • Make your changes.
  • yarn run build to verify your change doesn't increase output size.
  • Commit your changes: git commit -am 'Add new feature'
  • Push to the branch: git push origin new-feature
  • Submit a pull request with full remarks documenting your changes.

License

MIT License © Matuzalém Teles

sprint's People

Contributors

matuzalemsteles avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.