New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

buildman

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buildman - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

tests/package.json

22

index.js

@@ -11,9 +11,24 @@

function callmin(file, min_file) {
function callmin(file, min_file, next) {
if (typeof file == 'string') file = [file]
var newestSource = 0
file.forEach(function(name, i, arr){
if (!fs.existsSync(name)) {
name = arr[i] = require.resolve(name)
}
var stat = fs.statSync(name)
if (newestSource < stat.mtime) newestSource = stat.mtime
})
if (newestSource < fs.statSync(min_file).mtime) return next && next();
console.log("# Build "+min_file)
var http = require('http')
, querystring = require('querystring')
, fileString = file.map(function(name){
return fs.readFileSync( fs.existsSync(name) ? name : require.resolve(name), 'utf8')
return fs.readFileSync(name, 'utf8')
}).join('\n')

@@ -59,2 +74,3 @@

}
next && next()
})

@@ -69,2 +85,4 @@ });

exports.callmin = callmin
function buildAll() {

@@ -71,0 +89,0 @@ var min = Object.keys(conf.buildman || {})

41

package.json
{
"name": "buildman",
"version": "0.0.3",
"description": "Expiremental webapp bundler",
"main": "index.js",
"scripts": {
"test": "node tests/run.js"
},
"repository": {
"type": "git",
"url": "git://github.com/lauriro/buildman.git"
},
"keywords": [
"readme"
],
"author": "Lauri Rooden <lauri@rooden.ee>",
"license": "MIT",
"bugs": {
"url": "https://github.com/lauriro/buildman/issues"
}
"name": "buildman",
"version": "0.0.4",
"description": "Expiremental webapp bundler",
"main": "index.js",
"scripts": {
"test": "node tests/run.js"
},
"repository": {
"type": "git",
"url": "git://github.com/lauriro/buildman.git"
},
"keywords": [
"readme"
],
"author": "Lauri Rooden <lauri@rooden.ee>",
"license": "MIT",
"devDependencies": {
"testman": "*"
},
"bugs": {
"url": "https://github.com/lauriro/buildman/issues"
}
}
var buildman = require("../")
, fs = require('fs')
, testfile = "tests/test-min.js"
require("testman").
describe("buildman").
it( "should minimize js" ).
run(function(){
console.log("# run 1")
buildman.callmin(["dummy"], testfile, this.wait() )
}).
run(function(){
console.log("# run 2")
}).
equal(
function(){
console.log("# run 3")
return ""+fs.readFileSync(testfile)
},
function(){
return ""+fs.readFileSync("tests/target-min.js")
}
).
run(function(){
console.log("# run 4")
}).
done()
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc