sprintjs

0.1.5 • Public • Published

sprint
npm

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

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

Examples & Demos

  • Demo - Check demo folder and start with some http service, for correct operation.

API

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

sprint(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

Readme

Keywords

Package Sidebar

Install

npm i sprintjs

Weekly Downloads

1

Version

0.1.5

License

MIT

Last publish

Collaborators

  • matuzalemteles