• Stars
    star
    1,365
  • Rank 34,436 (Top 0.7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 15 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gets JavaScript

steal

Join our Slack Join our Discourse License: MIT npm version Travis build status Greenkeeper badge

Sauce Test Status

In addition to a collection of plugins, StealJS is comprised of two main components:

  • steal: an extensible, universal module loader.
  • steal-tools: utilities for building, transforming, and exporting module formats.

This is the steal repository. For the tools, see https://github.com/stealjs/steal-tools.

Module Loading with steal

steal is unique because it can load JavaScript modules defined in ES6, AMD, and CommonJS formats (unlike most other module loaders, which only support one of these formats at a time).

In JavaScript, the word "modules" refers to small units of independent, reusable code. They are the foundation of many JavaScript design patterns, and can look like this in ES6:

export function hello() {
  console.log('hello');
}
export function goodbye() {
  console.log('goodbye');
}

Or like this in AMD:

define([], function() {
  return {
    hello: function() {
      console.log('hello');
    },
    goodbye: function() {
      console.log('goodbye');
    }
  };
});

Or like this CommonJS:

function hello() {
  console.log('hello');
}
function goodbye() {
  console.log('goodbye');
}
module.exports = {
  hello: hello,
  goodbye: goodbye
}

All of these formats are supported by steal, so you can mix and match modules in your project:

// ES6
import { hello, goodbye } from  "greetings";

// AMD
define(["greetings"],function(greetings){ ... });

// CommonJS
var hello = require('greetings').hello;
var goodbye = require('greetings').goodbye;

Additionally, plugins make it possible to load ANY module type you might come up with, such as Less or CSS. Anyone can write a plugin for steal to extend it's core module-loading functionality.

Extending steal with Plugins

The StealJS organization maintains popular plugins that extend and enhance the module-loading capabilities of steal (and, subsequently, steal-tools) such as:

For example, the Less plugin allows Less files to be loaded similarly to JavaScript modules:

// ES6
import "style.less";

// AMD
define(["style.less"],function(){ ... });

// CommonJS
require("style.less");

// steal
steal("style.less")

Looking to create a plugin for another format? See Writing Plugins.

For more information on StealJS, visit StealJS.com.

Contributing

For information on contributing and developing, see the Contributing Guide on StealJS.com.

More Repositories

1

steal-tools

Build easy. Load fast.
JavaScript
67
star
2

transpile

Transpiles from everything to everything else
JavaScript
25
star
3

react-example

An example app using React with StealJS
JavaScript
14
star
4

steal-npm

[DEPRECATED] StealJS plugin for using NPM
JavaScript
12
star
5

steal-sass

SASS plugin for stealjs
JavaScript
9
star
6

steal-qunit

A npm qunit project that starts tests after 'main' has loaded.
JavaScript
8
star
7

vuejs-example

An example of using StealJS with a simple Vue.js app.
HTML
7
star
8

steal-mocha

Starts Mocha tests automatically after main has loaded
JavaScript
7
star
9

steal-conditional

Conditional loading
JavaScript
6
star
10

cache-bust

A cache busting extension for StealJS
JavaScript
6
star
11

steal-react-jsx

A StealJS plugin that enables importing renderers from `*.jsx` files.
JavaScript
5
star
12

steal-less

A less plugin for StealJS
JavaScript
4
star
13

stealjs

StealJS website
HTML
4
star
14

steal-canjs-example

An example app using StealJS with CanJS
JavaScript
4
star
15

steal-cordova

Easily make Cordova projects with Steal
JavaScript
3
star
16

steal-electron

Create Electron applications from StealJS projects.
JavaScript
2
star
17

live-reload

[DEPRECATED] live-reload for StealJS and SystemJS
JavaScript
2
star
18

steal-css

StealJS plugin for CSS
JavaScript
2
star
19

steal-serviceworker

Creates a service worker for your steal-tools app.
JavaScript
2
star
20

steal-bundler

Bundle assets into your dist folder with StealTools
JavaScript
2
star
21

rfcs

A place to discuss higher level changes to Steal
2
star
22

steal-socket.io

A small wrapper that lets you use socket.io on the client and server
JavaScript
2
star
23

progressive-loading

Progressive Loading example app
JavaScript
2
star
24

babel-preset-steal-test

Dummy babel preset used for StealJS testing
JavaScript
1
star
25

steal-html-template

A plugin for loading html templates
JavaScript
1
star
26

steal-push

HTTP/2 for StealJS projects
JavaScript
1
star
27

quick-start

StealJS quick start app
HTML
1
star
28

myhub

CSS
1
star
29

steal-angular2-example

A StealJS - Angular2 example application.
JavaScript
1
star
30

steal-fuzzy-normalize

Try to normalize a module identifier given a set of possible module names. Match to the closest result possible.
JavaScript
1
star
31

steal-nw

Make build nw.js applications with StealJS
JavaScript
1
star
32

steal-almond

Create an Almond build for your Steal app.
JavaScript
1
star
33

platform

Detects which platform is being used
JavaScript
1
star
34

system-json

A JSON extension that detects JSON files.
JavaScript
1
star
35

steal-jasmine

Starts Jasmine tests automatically after main has loaded
JavaScript
1
star
36

steal-bundle-manifest

Tools for using bundle manifest files generated by steal-tools
JavaScript
1
star