Skip to content
This repository

Add component.json #88

Closed
wants to merge 1 commit into from

1 participant

Andrey Sitnik
Andrey Sitnik
ai commented December 15, 2013

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.

Andrey Sitnik
ai commented December 15, 2013

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

Andrey Sitnik
ai commented December 15, 2013

Also Rework support Component and without component.json here Rework’s standalone builds can’t support Source Map: reworkcss/css-stringify#30

Andrey Sitnik
ai commented December 16, 2013

Seems browserify is better solution for Autoprefixer

Andrey Sitnik ai closed this December 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Dec 16, 2013
Andrey Sitnik Add component.json 117a23e
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. 20  component.json
20  component.json
... ...
@@ -0,0 +1,20 @@
  1
+{
  2
+  "name": "source-map",
  3
+  "repo": "mozilla/source-map",
  4
+  "version": "0.1.31",
  5
+  "main": "lib/source-map.js",
  6
+  "scripts": [
  7
+    "lib/source-map.js",
  8
+    "lib/source-map/array-set.js",
  9
+    "lib/source-map/base64-vlq.js",
  10
+    "lib/source-map/base64.js",
  11
+    "lib/source-map/binary-search.js",
  12
+    "lib/source-map/source-map-consumer.js",
  13
+    "lib/source-map/source-map-generator.js",
  14
+    "lib/source-map/source-node.js",
  15
+    "lib/source-map/util.js"
  16
+  ],
  17
+  "dependencies": {
  18
+    "jrburke/amdefine": ">=0.0.4"
  19
+  }
  20
+}
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.