Permalink
Browse files

Corrected component.js generation script, updated smoosh

Older smoosh was not possible anymore to be installed so it was replaced
with newest version
1 parent c8cca21 commit 00509bc5522130a0fc4b8a781736c9fab1234601 @piteer1 piteer1 committed Jun 12, 2014
Showing with 41 additions and 15 deletions.
  1. +1 −6 Makefile
  2. +15 −8 component.json
  3. +24 −0 make/component.js
  4. +1 −1 package.json
View
@@ -4,12 +4,7 @@ boosh:
node make/build.js
component_json:
- @echo '{' > component.json
- @egrep '(name|description|version|keywords)' package.json >> component.json
- @echo ' , "main": "bean.js"' >> component.json
- @echo ' , "scripts": ["bean.js"]' >> component.json
- @echo ' , "repo": "https://github.com/fat/bean"' >> component.json
- @echo '}' >> component.json
+ node make/component.js
components: component_json
component build
View
@@ -1,9 +1,16 @@
{
- "name": "bean",
- "description": "A small, fast, framework-agnostic event manager",
- "version": "1.0.14",
- "keywords": [ "ender", "events", "event", "dom" ]
- , "main": "bean.js"
- , "scripts": ["bean.js"]
- , "repo": "https://github.com/fat/bean"
-}
+ "name": "bean",
+ "description": "A small, fast, framework-agnostic event manager",
+ "version": "1.0.14",
+ "keywords": [
+ "ender",
+ "events",
+ "event",
+ "dom"
+ ],
+ "main": "bean.js",
+ "scripts": [
+ "bean.js"
+ ],
+ "repo": "https://github.com/fat/bean"
+}
View
@@ -0,0 +1,24 @@
+var fs = require("fs");
+fs.readFile('./package.json', "utf8", function (err, data) {
+ if (err) {
+ console.log(err);
+ process.exit(1);
+ }
+ var packagejson = JSON.parse(data);
+ fs.writeFile("component.json", JSON.stringify({
+ name: packagejson.name,
+ description: packagejson.description,
+ version: packagejson.version,
+ keywords: packagejson.keywords,
+ main: "bean.js",
+ scripts: ["bean.js"],
+ repo: "https://github.com/fat/bean"
+ }, null, 4),
+ function (err) {
+ if (err) {
+ console.log(err);
+ process.exit(1);
+ }
+ }
+ );
+});
View
@@ -21,7 +21,7 @@
"main": "./bean.js",
"devDependencies": {
"buster": "~0.6.2",
- "smoosh": "~0.3.2",
+ "smoosh": "~0.4.1",
"qwery": "~3.3.11"
},
"ender": "./src/ender.js"

0 comments on commit 00509bc

Please sign in to comment.