Comparing version 0.0.5 to 0.0.6
35
index.js
var | ||
BUILD_ROOT = "public/b" | ||
CONF_FILE = process.env.PWD + '/package.json' | ||
var fs = require('fs') | ||
, conf = require( process.env.PWD + '/package.json') || {} | ||
, exec = require('child_process').exec | ||
, conf = require( CONF_FILE ) || {} | ||
@@ -12,3 +18,4 @@ | ||
var newest = 0 | ||
// Build on conf changes | ||
var newest = fs.statSync(CONF_FILE).mtime | ||
@@ -105,3 +112,22 @@ args.input.forEach(function(name, i, arr){ | ||
var map = { | ||
"--all": buildAll, | ||
"--bundle": buildBundle | ||
} | ||
function buildBundle() { | ||
if (fs.existsSync(BUILD_ROOT)) { | ||
} else { | ||
fs.mkdirSync(BUILD_ROOT) | ||
} | ||
// get list of hashs | ||
exec('git log --format=%H -6', function (err, out, stderr) { | ||
console.log(out.split(/\s+/)) | ||
}) | ||
} | ||
function buildAll() { | ||
@@ -111,2 +137,4 @@ var min = Object.keys(conf.buildman || {}) | ||
min.forEach(function(file){ | ||
if (map[file]) return | ||
var args = { | ||
@@ -126,5 +154,2 @@ input: conf.buildman[file], | ||
var map = { | ||
"--all": buildAll | ||
} | ||
@@ -131,0 +156,0 @@ function invalidTarget(name) { |
{ | ||
"name": "buildman", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Expiremental webapp bundler", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5575
169
2