I am trying to run Aframe in a sandbox that doesn't allow the modification of built in javascript objects. It causes an error as it tries to add a polyfill Math.sign
How can I change this and other built-in object changes when building Aframe (0.6.0)
Related
I'm trying to create a simple proof-of-concept of using Deno to bundle a browser application which is using Lit. Basic functionality (e.g., initial component rendering) is functional, but I'm unable to get simple DOM manipulations to trigger the reactive property changes.
My simple example can be seen working at this Lit Playground example. An example which does not work is this Deno bundle version. These 2 versions have the exact same source code (i.e., index.html and main.ts).
You can view all of the code and the build process for creating the Deno bundle here.
Is Deno capable of producing bundles which behave in the expected manner?
Deno 1.17.2 is able to successfully create a bundle. See https://github.com/denoland/deno/issues/13048 for background. As #jsejcksn said, SWC is most likely the culprit for the original issue.
try https://github.com/mindon/packup which is using esbuild to bundle js for browser.
here's a demo with lit (with locales), material design web and three.js
https://github.com/mindon/deno.lit-and-mw3.demo
I've read a bit about AFrame, and I am very familiar with Node.js. But why does AFrame require Node to run? I tried looking at the index.html in the Aframe boilerplate sample--and it runs just the same in the browser with or without Node running. Is Node really required to be running? What is Node rendering?
Node.js is not required to run A-Frame — it runs in a browser with no expectation that your server use Node vs PHP, or that you use a webserver at all. Are you seeing something that makes it seem like Node would be needed?
However, the aframe-boilerplate starter kit does provide convenience features — used only during development — that rely on Node.js to automatically reload the page when your HTML changes, or deploy to GitHub Pages. These are not requirements for A-Frame itself, and can be ignored if you prefer.
I am a beginner trying to use RubyMotion-PixateFreestyle, I have installed the gem, added the framework to \vendor and i run the simulator. I don't receive any errors but still the css has no effect on my views.
As example just I try adding the pixate freestyle to the timer app coming with rubymotion which is used as an example here: Pixate-freestyle
I have followed every step of the instructions, my app builds without errors but my changes to the views doesn't show up.
When I attempt to run the tests using
JASMINE_BROWSER=PhantomJS meteor --test
I get the following output from PhantomJS
[PhantomJS] TypeError: instanceof called on an object with an invalid prototype property.
at which point nothing happens unless I open the app in my browser and then the tests complete. Seems to be the same issue as this closed one. I should add that my only integration test at this point (to rule out PhantomJS issues) is
describe("jasmineTest", function(){
it("1 equals 1", function(){
expect(1).toEqual(1);
});
});
My versions are
$ meteor list
accounts-password 1.1.1 Password support for accounts
alanning:roles 1.2.13 Role-based authorization
dburles:google-maps 1.1.3 Google Maps Javascript API v3
fortawesome:fontawesome 4.4.0 Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly
imsky:holder 2.8.1 Holder uses SVG to render image placeholders entirely in browser.
insecure 1.0.3 Allow all database writes by default
iron:router 1.0.9 Routing specifically designed for Meteor
jquery 1.11.3_2 Manipulate the DOM using CSS selectors
manuelschoebel:wait-on-lib 0.3.0 Use Meteor Iron-Routers waitOn to load external javascript
materialize:materialize 0.97.0 Materialize (official): A modern responsive front-end framework based on Material Design
matteodem:easy-search 1.6.2 Easy-to-use search with Blaze Components (+ Elastic Search support)
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
meteorhacks:kadira 2.23.0 Performance Monitoring for Meteor
msavin:mongol 1.1.5 The insanely handy development package for Meteor.
nicolaslopezj:tabular-materialize 1.2.1 Datatables for large or small datasets in Meteor
peernohell:c3 1.1.3 C3 (0.4.10) charting library based on D3.
reactive-var 1.0.5 Reactive variable
sacha:spin 2.3.1 Simple spinner package for Meteor
sanjo:jasmine 0.17.0 Velocity integration of the Jasmine testing framework
stevezhu:lodash 3.10.1 A utility library delivering consistency, customization, performance, & extras.
useraccounts:iron-routing 1.12.1 UserAccounts package providing routes configuration capability via iron:router.
useraccounts:materialize 1.12.1 Accounts Templates styled for Materialize Css.
velocity:html-reporter 0.8.2 Reactive Velocity test reports in your app.
UPDATE
The instanceof called on an object with an invalid prototype property error seems to be resolved by using PhantomJS 2.
I have subsequently found a simple workaround for the client-integration tests not running, whereby I just move the client-integration tests to the client-unit directory. This, however, seems exactly that, a workaround. I would still like to know what is causing the problem, and how it can be resolved without my hacky workaround.
It turns out it is a bug, the issue is raised here
I have a phongap app with a sqlite plugin that runs in both android and iphone. When I try to run it in Ripple i get several errors depending on the inclusion of the cordova version and device I use. Non of them are working at all. In some comments in stackoverflow i've seen people running sqlite in phonegap under ripple.
I'm using the PG-SQLitePlugin-Android plugin in my project, which it acually only supports Phonegap 2.7.0+.
I've found that i can force Ripple to use 2.7.0 by calling it :
file://localhost/Users/----/----/----/www/index.html?enableripple=cordova-2.7.0
Ripple actually loads great after enabling access to file system through chrome.
When i include cordova-2.7.0.js in my script
The index.html pops me a pop up with the following text :
gap:["Device","getDeviceInfo","Device119187522"]
that i can accept or cancel, then 2 more dialogs appeare, if I accept it gets hanged.
the js console shows that cordova 2.7.0 is really running :
Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. cordova-2.7.0.js:906
deviceready is not fired
When i include cordova-2.9.0.js in my script
It happens the same as 2.7
Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. cordova-2.7.0.js:906
but this time I get this other errors
Failed to load resource file://localhost/Users/laullobetpayas/-------/---/------/www/cordova/cordova_plugins.json
Failed to load resource file://localhost/Users/-------/---/------/www/cordova/cordova_plugins.js
deviceready is not fired
When I don't include any cordova.js in my script
SQLitePlugin.js:31
Uncaught ReferenceError: cordova is not defined SQLitePlugin.js:34
Am I using the proper plugin ?
which is the propper version of cordova / device tu run with the plugin and ripple ?
Do i have to include the cordova.js in my project
Hel will be very apreciated, it's for a long time that I'm trying to solve this.
Thank you in advanced.
Phonegap plugins won't work with Ripple because the idea of a Phonegap plugin is that it provides a Javascript interface in order to execute native code. That means, in the case of Android, the Javascript will invoke native Java code and in the case of iOS, the Javascript will invoke native Objective-C.
Ripple is purely Javascript-based, so the Javascript part of the plugin has nothing to interface with.
In the case of the SQLitePlugin, for example, calling SQLitePlugin.close() results in the call:
cordova.exec(null, null, "SQLitePlugin", "close", [this.dbname]);
where SQLitePlugin is the native class name and close is the native function name.
If you want to use the same storage API across Android, iOS and Ripple, maybe consider using lawnchair with appropriate adapters.
As for the issues with Ripple and Phonegap 2.7.0/2.9.0, Ripple has not quite caught up with Phonegap, so you will get these popups and error messages in the console, but that will not stop your Phonegap app (without native plugins) running in Ripple. You can convince yourself of this with a simple test case like:
document.addEventListener("deviceready", function(){
alert("I'm alive");
});
But the answer is, yes, you do need to include cordova.js in order for it to work at all in Ripple.
The Cordova-SQLitePlugin is a drop-in replacement for the HTML5 SQL API, so when running inside Ripple you don't need to call the Cordova layer you can just replace calls to sqlitePlugin.openDatabase() with window.openDatabase(). I've not yet tested this with Ripple but it should work. There are some database size limitations but this is probably all you need for testing.
There several ways to test if your inside Cordova. You could create a shim for the openDatabase() method based on testing for Cordova on app startup.
Since your primary goal is really to do rapid testing of SQLite with Cordova (rather than specifically to use Ripple) I'd like to suggest another new alternative to using Ripple.
I wrote an app call Sencha Touch Live that can be used for rapid development of Cordova / HTML5 apps by allowing you to Live Edit and Debug the HTML/JS/CSS code on your mobile device simply by updating files on your development computer - so you can skip most recompile/redeploy/restart debugger time costs. It has tons of other cool features. I'm using it myself for SQLite app testing instead of Ripple or Weinre
Detailed overview and Step by Step Guides
Installation Guide
It's based on the code from Adobe's PhoneGap Developer App so core code is well tested. It's been extensively adapted and tuned for Sench Touch framework though it should also work for jQuery Mobile or any framework that places HTML5 code under the phonegap/www or cordova/www folder. Just start up the server in you PhoneGap or Cordova project folder.
For testing your SQL and controller logic, I recommend using Geny Motion emulator with a version of Android 4.4.x KitKat. Start up an recent version of Chrome on your desktop and once you get your app working on the emulator or real device open chrome://inspect and now you can use the full Chrome debugger on your remote device app. You can also use a recent version of Safari for OSX/iPhone Simulator testing.
You can watch a demo here (starts at the 5 min. mark). Yes! It needs a more polished video with less echoes but you'll get the idea:
https://www.youtube.com/watch?v=94J4HBB0f7I