From 56d2b9ab538e1fb2eb29869852b577543e19e7a2 Mon Sep 17 00:00:00 2001 From: calebboyd Date: Fri, 9 Feb 2018 00:26:34 -0600 Subject: [PATCH] chore: remove outdated examples --- .npmrc | 1 - README.md | 2 - examples/dynamic-modules/index.js | 2 - examples/dynamic-modules/nexe-bundle.js | 37 ------ examples/dynamic-modules/package-lock.json | 126 --------------------- examples/dynamic-modules/package.json | 15 --- examples/native-build/build.js | 13 --- examples/native-build/index.js | 18 --- examples/native-build/package.json | 16 --- 9 files changed, 230 deletions(-) delete mode 100644 .npmrc delete mode 100644 examples/dynamic-modules/index.js delete mode 100644 examples/dynamic-modules/nexe-bundle.js delete mode 100644 examples/dynamic-modules/package-lock.json delete mode 100644 examples/dynamic-modules/package.json delete mode 100644 examples/native-build/build.js delete mode 100644 examples/native-build/index.js delete mode 100644 examples/native-build/package.json diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 43c97e7..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/README.md b/README.md index bc0b487..ab9cf5e 100644 --- a/README.md +++ b/README.md @@ -211,8 +211,6 @@ Any modifications made to `NexeFile#contents` will be maintained in the cache _w ## Native Modules -A note about native modules, - TODO - [ ] Implement support for `node-pre-gyp#find`. diff --git a/examples/dynamic-modules/index.js b/examples/dynamic-modules/index.js deleted file mode 100644 index e0ca5cb..0000000 --- a/examples/dynamic-modules/index.js +++ /dev/null @@ -1,2 +0,0 @@ -const { echo } = require('shelljs') -echo('hello world') diff --git a/examples/dynamic-modules/nexe-bundle.js b/examples/dynamic-modules/nexe-bundle.js deleted file mode 100644 index e0e7b46..0000000 --- a/examples/dynamic-modules/nexe-bundle.js +++ /dev/null @@ -1,37 +0,0 @@ -const { resolve } = require('resolve-dependencies') -const path = require('path') - -module.exports.createBundle = async function createBundle (options) { - console.log(path.isAbsolute(options.input)) - const { entries, files } = await resolve(options.input) - const lcp = findLcp(Object.keys(files)) - const relFiles = relativize(files, lcp) - console.log('LCP', relFiles) - return Promise.resolve(`console.log('hello world')`) -} - -function relativize (files, lcp) { - const result = {} - for(const absPath in files) { - const relPath = '.' + path.sep + path.relative(lcp, absPath) - const file = files[absPath] - file.relPath = relPath - result[relPath] = file - } - return result -} - -function findLcp(paths, sep = path.sep) { - let position, first = paths[0] || '' - findPosition: { - for (position = 0;; position++) { - for (let i = 0; i < paths.length; i++) { - if (paths[i][position] && paths[i][position] === first[position]) - continue - while (position > 0 && first[--position] !== sep) {} - break findPosition - } - } - } - return first.slice(0, position) -} diff --git a/examples/dynamic-modules/package-lock.json b/examples/dynamic-modules/package-lock.json deleted file mode 100644 index 63554ad..0000000 --- a/examples/dynamic-modules/package-lock.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "dynamic-modules", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "circular-json": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.1.tgz", - "integrity": "sha512-UjgcRlTAhAkLeXmDe2wK7ktwy/tgAqxiSndTIPiFZuIPLZmzHzWMwUIe9h9m/OokypG7snxCDEuwJshGBdPvaw==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.8" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "1.5.0" - } - }, - "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", - "requires": { - "path-parse": "1.0.5" - } - }, - "shelljs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.1.tgz", - "integrity": "sha512-YA/iYtZpzFe5HyWVGrb02FjPxc4EMCfpoU/Phg9fQoyMC72u9598OUBrsU8IrtwAKG0tO8IYaqbaLIw+k3IRGA==", - "requires": { - "glob": "7.1.2", - "interpret": "1.1.0", - "rechoir": "0.6.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/examples/dynamic-modules/package.json b/examples/dynamic-modules/package.json deleted file mode 100644 index 1f6660e..0000000 --- a/examples/dynamic-modules/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "dynamic-modules", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "circular-json": "^0.5.1", - "shelljs": "^0.8.1" - } -} diff --git a/examples/native-build/build.js b/examples/native-build/build.js deleted file mode 100644 index c4e7780..0000000 --- a/examples/native-build/build.js +++ /dev/null @@ -1,13 +0,0 @@ -const nexe = require('../..') -nexe.compile({ - output: 'native-build', - silent: true, - native: { - zmq: { - additionalFiles: [ - '../../windows/lib/x64/libzmq-v100-mt-4_0_4.dll' - ] - } - } -}) - diff --git a/examples/native-build/index.js b/examples/native-build/index.js deleted file mode 100644 index 8990491..0000000 --- a/examples/native-build/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var zmq = require('zmq') -var pub = zmq.socket('pub') - -pub.bindSync('tcp://127.0.0.1:3000') -console.log('Publisher bound to port 3000') - -setInterval(function(){ - console.log('sending a multipart message envelope') - pub.send(['kitty cats', 'meow!']) -}, 2500) -var sub = zmq.socket('sub') -sub.connect('tcp://127.0.0.1:3000') -sub.subscribe('kitty cats') -console.log('Subscriber connected to port 3000') - -sub.on('message', function(topic, message) { - console.log('received a message related to:', topic.toString(), 'containing message:', message.toString()) -}) diff --git a/examples/native-build/package.json b/examples/native-build/package.json deleted file mode 100644 index b82fe63..0000000 --- a/examples/native-build/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "native-build", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "node build" - }, - "author": "", - "license": "ISC", - "dependencies": { - "sqlite3": "^3.1.10", - "zmq": "^2.15.3" - }, - "devDependencies": {} -}