npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sofe

v3.0.0

Published

Service Oriented Front-end

Downloads

276

Readme

Project status

Sofe is a plugin for [email protected], but the latest version of systemjs is >3. The new versions of systemjs have the equivalent of sofe built into systemjs itself, via import maps. Because of this, we encourage that you use systemjs@>=3 + import maps, instead of using [email protected] + sofe. See this file for an example of what the new alternative looks like. For the equivalent of sofe's local storage overrides, check out import-map-overrides.

sofe

Service Oriented Front-end - Sofe is a SystemJS plugin that resolves a module name to a fully qualified url at runtime.

npm version Build Status Code Coverage

Sofe allows developers to avoid building monolothic front-end web applications and instead build software on top of micro-services. Sofe is a JavaScript library that enables independently deployable JavaScript services to be retrieved at run-time in the browser.

More on the motivation for SOA in the browser

Getting Started

  1. Setup SystemJS and JSPM
  2. Configure SystemJS to use the sofe plugin:
jspm install npm:sofe
  1. Load sofe services:
System.import('sofe-hello-world!sofe')
  .then(hello => hello())
// Sofe is properly setup if the browser alerts a hello world.
// You have successfully loaded the hello-world sofe service.

By default, any npm package with a UMD build can be a sofe service. Simply load the service by the package name:

System.import('backbone!sofe')
  .then(Backbone => new Backbone.View({}));

Create your own service

By default, all npm packages are loaded through npm (unpkg). While this is convenient, it isn't always what you want to do for your own services. You can provide a custom location for where your service distributable is located by adding a sofe property to your package.json:

{
  "name": "my-service",
  "version": "1.0.0",
  "sofe": {
    "url": "https://cdn.some-location.com/my-service-1.0.0.js"
  }
}

Republish a new sofe URL to npm whenever you want to update the location of your service distributable.

Services in production

Create your own private service by telling sofe how to resolve your service name. Add to your systemjs configuration a manifest option to a sofe property or auto-discover services by loading a remote manifest of available services:

System.config({
  sofe: {
    manifest: {
      "someInternalService": "http://somelocation.com/service-1.0.0.js"
    },
    manifestUrl: 'https://somelocation.com/available-services.json'
  }
});

Learn more about production configuration within the API documentation

Examples

Examples are available at sofe.surge.sh or you can run them locally

Tools

  1. sofe-inspector - Developer tool for inspecting and overriding available sofe services
  2. sofe-babel-plugin - A babel plugin for production sofe workflows with webpack
  3. sofe-deplanifester - A manifest deployment service for sofe
  4. sofe-hello-world - A simple sofe-service to say hello

License

Copyright 2016 CanopyTax

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.