I'm Casper, a 30 something software developer from Norway.
caspervonb / amokify Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
The transform and runtime will go into a standalone package revile
(name to be finalized). Its just the logical thing to do so we can share the code across different loaders and bundlers.
Starting with a live function like this
setInterval(function() {
console.log('tick');
}, 1000);
And adding an assignment expression into the module breaks the v8 function updates.
module.locals.foo = 1;
Call expressions are fine however, but only if they do not reference the module.exports or module.locals objects.
This only breaks on the first statement, if there is a statement referencing locals when starting for example, everything is fine.
As far as i know, this worked fine before #1 was added and things got moved around a bit, scopes have changed.
The way the current prelude works takes a lot of time because it works in several (redundant) steps
It also completely destroys any source maps.
If we redesign the prelude ever so slightly.
(function bundle(acquire, cache, entries, modules) {
function require(name) {
var updates = acquire();
Object.keys(updates).forEach(function(key) {
if (modules[key]) {
modules[key][1] = updates[key][1];
} else {
modules[key] = updates[key];
}
});
}
}(function() {
return {
'0': [function() {
}, {}]
};
}, {}, [], {}));
Provided that this works as expected, it should tho as function references are being kept. We should be able to do it in a wrap phase with just some basic string searching in the first and last chunk of the bundle stream. Drastically reducing the overhead of Amokify.
Details to come.
Using npm v2.12.1:
โ client git:(amokify) โ npm install --save-dev caspervonb/amokify
npm ERR! addLocal Could not install /var/folders/rs/k1q260bx1q73kcqyy8t2vq080000gn/T/npm-83810-8d0bb289/git-cache-4788f2bb8499/b39e148d46c3222a42b10f4852389c66f2f7d566
npm ERR! addLocal Could not install /var/folders/rs/k1q260bx1q73kcqyy8t2vq080000gn/T/npm-83810-8d0bb289/git-cache-4b788ae02feb/b39e148d46c3222a42b10f4852389c66f2f7d566
npm ERR! addLocal Could not install /var/folders/rs/k1q260bx1q73kcqyy8t2vq080000gn/T/npm-83810-8d0bb289/git-cache-de9f87484014/b39e148d46c3222a42b10f4852389c66f2f7d566
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.12.1
npm ERR! No version provided in package.json
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kshipley/Programming/rms/client/npm-debug.log
I also tried adding it directly to package.json with a branch name / SHA and that failed too.
(It's possible that npm 3 is more lenient on this, but don't have it handy on this machine.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.