Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add component.json #88

Closed
wants to merge 1 commit into from

1 participant

@ai
ai commented

TJ’s Component is a great tool to build standalone JS from npm package (to work in browser or any non-node environments).

For example, Autoprefixer uses Component to pack all it files and npm dependencies in one autoprefixer.js and run it in autoprefixer-rails (Autoprefixer integration to Rails/Ruby). It is necessary, because JS runtime in Ruby doesn’t work with file system and doesn’t have require().

To support Component you need only component.json (like bower.json) in project repo (no special publish commands).

A lot of npm libraries contains component.js: underscore, mocha, async, jade.

I make this pull request, because Autoprefixer 1.0 will use source-map and component.json in source-map is required to build autoprefixer-rails standalone file.

@ai
ai commented

I create PR in amdefine with component.json too: jrburke/amdefine#22

@ai
ai commented

Also Rework support Component and without component.json here Rework’s standalone builds can’t support Source Map: https://github.com/visionmedia/css-stringify/issues/30

@ai
ai commented

Seems browserify is better solution for Autoprefixer

@ai ai closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 16, 2013
  1. @ai

    Add component.json

    ai authored
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 0 deletions.
  1. +20 −0 component.json
View
20 component.json
@@ -0,0 +1,20 @@
+{
+ "name": "source-map",
+ "repo": "mozilla/source-map",
+ "version": "0.1.31",
+ "main": "lib/source-map.js",
+ "scripts": [
+ "lib/source-map.js",
+ "lib/source-map/array-set.js",
+ "lib/source-map/base64-vlq.js",
+ "lib/source-map/base64.js",
+ "lib/source-map/binary-search.js",
+ "lib/source-map/source-map-consumer.js",
+ "lib/source-map/source-map-generator.js",
+ "lib/source-map/source-node.js",
+ "lib/source-map/util.js"
+ ],
+ "dependencies": {
+ "jrburke/amdefine": ">=0.0.4"
+ }
+}
Something went wrong with that request. Please try again.