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

browserify-adventure

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-adventure - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.travis.yml

1

bin/cmd.js

@@ -8,2 +8,3 @@ #!/usr/bin/env node

require('../menu.json').forEach(function (name) {
if (/^!/.test(name)) return;
var d = name.toLowerCase().replace(/\W+/g, '_');

@@ -10,0 +11,0 @@ var dir = path.join(__dirname, '../problems', d);

36

menu.json
[
"BEEP BOOP",
"LOCAL REQUIRE",
"MODULE REQUIRE",
"IMPORT EXPORT",
"MODULARIZE",
"BUILD A WIDGET",
"DEBUGGING",
"WATCH",
"BUILTINS",
"NPM SCAVENGER HUNT",
"TESTING",
"USING TRANSFORMS",
"WRITING TRANSFORMS",
"CODE COVERAGE",
"BUILD YOUR OWN BROWSERIFY",
"COMPILER PIPELINE",
"BROWSER UNPACK",
"FACTOR BUNDLE"
"USING NPM PACKAGES",
"SINGLE EXPORT",
"MULTI EXPORT",
"!BUILD A WIDGET",
"!USING TRANSFORMS",
"!WIDGET WITH BRFS",
"!WRITING TRANSFORMS",
"!DEBUGGING",
"!WATCH",
"!BUILTINS",
"!NPM SCAVENGER HUNT",
"!TESTING",
"!CODE COVERAGE",
"!BUILD YOUR OWN BROWSERIFY",
"!COMPILER PIPELINE",
"!BROWSER UNPACK",
"!FACTOR BUNDLE"
]
{
"name": "browserify-adventure",
"version": "1.0.0",
"version": "1.1.0",
"description": "learn browserify with this educational adventure",
"main": "index.js",
"bin": {
"browserify-adventure": "bin/cmd.js"
},
"dependencies": {
"adventure": "^1.0.0"
"adventure": "^2.5.0",
"adventure-verify": "^2.1.1",
"browser-unpack": "~0.2.3",
"concat-stream": "^1.4.6",
"falafel": "~0.3.1"
},
"devDependencies": {
"browserify": "^4.2.0",
"tape": "^2.13.3",
"uniq": "^1.0.1"
},
"scripts": {
"test": "tape test/*.js"
},
"repository": {

@@ -10,0 +25,0 @@ "type": "git",

var fs = require('fs');
var tape = require('tape');
var verify = require('adventure-verify');
var unpack = require('browser-unpack');
var concat = require('concat-stream');
exports.show = function () {
return fs.createReadStream(__dirname + '/problem.txt');
};
exports.problem = fs.createReadStream(__dirname + '/problem.txt');
exports.solution = fs.createReadStream(__dirname + '/solution.txt');
exports.verify = require('../../lib/verify.js')(function (args, t) {
t.plan(2);
t.ok(true, 'beep boop...');
t.equal(1+1, 2);
exports.verify = verify({ modeReset: true }, function (args, t) {
t.plan(4);
process.stdin.pipe(concat(function (body) {
try { var rows = unpack(body) }
catch (err) { return t.fail('The input had a syntax error!') }
if (!rows) return t.fail('The input is not a browserify bundle!');
t.equal(rows.length, 1, 'a single file in this bundle');
t.equal(rows[0].entry, true, 'single file should be an entry file');
t.deepEqual(rows[0].deps, {}, "shouldn't have any deps");
Function(['console'], body.toString())({
log: function (msg) { t.equal(msg, 'BEEP BOOP') },
error: console.error
});
}));
});
exports.run = function (args) {
process.stdin.pipe(concat(function (body) {
Function(body.toString())();
}));
};

@@ -1,1 +0,21 @@

problem statement goes here...
First of all, make sure you have `browserify` installed as a command in
your $PATH.
You can do this by running:
npm install -g browserify
If you get permission errors, try putting `sudo` in front of that command.
Once you have browserify installed, write a program that prints the string
'BEEP BOOP' using `console.log()`.
Compile your program with `browserify` and pipe the bundle into
`$ADVENTURE_COMMAND verify` like this:
browserify main.js | $ADVENTURE_COMMAND verify
If you just want to run your solution with the test input without verifying
it you can do:
browserify main.js | $ADVENTURE_COMMAND run

Sorry, the diff of this file is not supported yet

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