Code Monkey home page Code Monkey logo

meteor-harmony's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meteor-harmony's Issues

How to create Classes as Globals

Normally in meteor calling var foo = 'bar' will create a file scoped var and foo = 'bar' will be a package or app scope var.

Unfortunately calling class foo {} creates a file scoped var. What should be done to make a class visible within a package and exportable to an app?

Cannot find variable `require`

Traceur tries to use require to import a variable, which doesn't exist in Meteor (because all variables are already imported). Should the divergence from the Traceur documentation be talked about in the readme, or should we handle it differently @mquandalle?

I didn't know about this problem until reading @jakobdamjensen's comment in #24.

Version

Meteor 0.9.3 introduced a new version convention for wrapper packages:

Support for "wrapped package" version numbers. There is now a _ field in version numbers. The _ field must be an integer, and versions with the _ are sorted after versions without. This allows using the upstream version number as the Meteor package version number and being able to publish multiple version of the Meteor package (e.g. [email protected]_2).

Unfortunatly we have already released v1.3.0... So for instance v0.0.66_1 will be lower than v1.3.0 even if it has been released after. Any idea how we can solve this? Is there any way to “deprecate” version so the meteor package manager don't use them? Should we start a new package from scratch?

cc @christianbundy

Libraries with import.

I know this doesn't support import, but what if I want to use a 3rd party library written in ES6 that uses import to import it's own files locally?

Global variable declaration doesn't work with packages

Exported package variables are handled differently than anything else, which results in the following (where Fibonacci is the exported variable):

if (typeof Package === 'undefined') Package = {};
Package['harmony-example-package'] = {
  Fibonacci: Fibonacci
};

Since our globals are scoped to this, the code should instead be something like:

if (typeof Package === 'undefined') Package = {};
Package['harmony-example-package'] = {
  Fibonacci: this.Fibonacci
};

I think it's almost time to get Graspy...


This is because Meteor declares your exported variables beforehand, so you never need to do it with packages. Closing this issue.

Distinct filenames for the compiled files

If you have a file "example.next.js", it will be compiled to a es5 compliant file called "example.next.js" as well which is source-mapped to the original "example.next.js".

This might be confusing in the browser debugger as now you can see two files with the same name, but one is the original source-map and the second is the compiled version.

Proposition: the compiled file should differ and reflect that it is a compiled version. Examples: "example.next.js" => "example.now.js" or "example.es5.js" or "example.compiled.js".

How to reproduce:

mrt create example
cd example
mv example.js example.next.js
mrt add harmony
mrt run
  • open the browser
  • open the developer tools (menu -> tools -> developer tools)
  • open the "sources tab"
  • see there are two files named "example.next.js", one is the compiled version

Expected: user can distinguish compiled vs original files

Possibility to set flags

I want to user traceur type assertions with this library, so it would be neat if there was a possibility to set config flags on the compiler. (--type-assertions, --annotations etc)

Package breaks Markdown usage

It is impossible to use markdown with this package
Steps to reproduce

  1. Create new project
  2. Add markdown and mquandalle:harmony packages
  3. Edit template and add {{#markdown}}I am using __markdown__.{{/markdown}}

Render page and you will receive error:

ReferenceError: require is not defined
    var fs = require('fs');                                                         ...
        markdow...7164765 (line 155, col 5)

Need docs

It would be nice if some docs were written for how to use this. I guess the main thing I would be confused on how to do is the path to imports and exports. Does it just take the path to the file or is it some other pattern?

Thanks

0.9 support missing?

Just made a new meteor 0.9 project and added Harmony. But it doesn't seem to support/work on 0.9 at all =(

Downgraded to 0.8.3 and it worked fine..

Unable to use this with the Velocity test framework

I really like your initiative, yet I am unable to use it currently since it does not play well with velocity test framework. Here are steps to reproduce:

meteor create velocityEs6Test
cd velocityEs6Test
meteor add mquandalle:harmony
meteor add sanjo:jasmine
meteor

I immediately receive following errors:

W20141010-10:12:33.498(11)? (STDERR) The file "/Users/tomi/Documents/Platforms/Learning/es6test/tests/jasmine/server/unit/package-stubs.js" has syntax errors. [TypeError: Cannot read property 'type' of null]

Usage on the Server side?

I renamed a file (server.js → server.next.js) and nothing seemed to be loaded... Am I missing something?

Undefined Error using PhantomJS CLI

I'm having issues using PhantomJS and meteor-harmony. When I run my acceptance specs with Meteor-Capybara using PhantomJS it throws the following:

Failures:

  1) Model: Project should switch projects
     Failure/Error: visit root_path
     Capybara::Poltergeist::JavascriptError:
       One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).

       TypeError: 'undefined' is not a function (evaluating 'ModuleStore.register.bind(ModuleStore)')
       TypeError: 'undefined' is not a function (evaluating 'ModuleStore.register.bind(ModuleStore)')
           at http://localhost:3000/packages/harmony.js?d3d1f36ffdf75eff955aee4cc92356d83062d3ce:898
           at http://localhost:3000/packages/harmony.js?d3d1f36ffdf75eff955aee4cc92356d83062d3ce:907
           at http://localhost:3000/packages/harmony.js?d3d1f36ffdf75eff955aee4cc92356d83062d3ce:2135
           at http://localhost:3000/packages/harmony.js?d3d1f36ffdf75eff955aee4cc92356d83062d3ce:2142

Is there anything I can do on my end? Currently i'm using the Chrome browser instead of PhantomJS to get them to run. There's a similar issue filed on Traceur issue 908 but i'm not sure how it applies to Meteor-Harmony

Babel

Meteor v1.2 will include official ES6 support using the BabelJS transpiler. MDG put a fair amount of work on ES6 integration, including the work on a new compiler API that allow for more powerful and efficient meteor plugins.

I propose to deprecate this mquandalle:harmony package in favour of the new official ecmascript package.

Is their any feature we will miss by moving from traceur to babel? Or is there any other reason to keep this package (and upgrade it to use the new compiler API, which is quite a bit of work)? What do you think @christianbundy?

Version number can not have '+'

Meteor's new packaging release uses a '+' to tack a build id onto each package version. It looks to see if a build id exists by checking for the '+' and throws this error if it finds one.

version already has a buildid?

So good work getting the version number into the package.js but bad luck that the versioning chosen errors. I fixed it by making the '+' a '-' in my local version.

Seems to be busted by Meteor 1.0.2

Can't seem to start my project now. :(

Why-Not:storm alpjor$ meteor --settings config/settings.json 
[[[[[ ~/Documents/Code/bolt/storm ]]]]]       

=> Started proxy.                             
=> Started MongoDB.                           

/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
                        throw(ex);
                              ^
TypeError: Cannot read property 'length' of undefined
    at Map.size (/Users/alpjor/.meteor/packages/mquandalle_harmony/.1.3.79.vsi28k++os+web.browser+web.cordova/plugin.compileHarmony.os/npm/compileHarmony/node_modules/traceur/bin/traceur.js:1254:27)
    at /Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/node_modules/harmony-collections/harmony-collections.js:719:27
    at initialize (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/node_modules/harmony-collections/harmony-collections.js:317:38)
    at /Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/node_modules/harmony-collections/harmony-collections.js:716:3
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/node_modules/harmony-collections/harmony-collections.js:793:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js:8:54)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/node_modules/property-accessors/lib/property-accessors.js:74:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/behavior.js:9:23)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/behavior.js:120:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/helpers.js:5:14)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/helpers.js:55:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/emissary.js:4:13)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/node_modules/emissary/lib/emissary.js:14:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/lib/file.js:12:18)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/lib/file.js:384:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/lib/main.js:203:18)
    at Object.<anonymous> (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/pathwatcher/lib/main.js:207:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.watch (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/safe-pathwatcher.js:27:5)
    at [object Object]._.extend._watchFileOrDirectory (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/watch.js:417:35)
    at /Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/watch.js:384:14
    at Function._.each._.forEach (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at [object Object]._.extend._startFileWatches (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/watch.js:379:7)
    at new Watcher (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/watch.js:309:8)
    at [object Object]._.extend._runOnce (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:653:23)
    at [object Object]._.extend._fiber (/Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:758:28)
    at /Users/alpjor/.meteor/packages/meteor-tool/.1.0.37.1ovh56a++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:365:12
Why-Not:storm alpjor$ mate /Users/alpjor/.meteor/packages/mquandalle_harmony/.1.3.79.vsi28k++os+web.browser+web.cordova/plugin.compileHarmony.os/npm/compileHarmony/node_modules/traceur/bin/traceur.js

"ReferenceError: module is not defined"

I'm getting the above error on running my code, but if I clone my repo (not copying the .meteor, .build, or .npm folders) and retry it works. Here's a screenshot of the error:

screen shot 2014-05-19 at 7 52 32 pm

You can reproduce this bug with:

this.foo = 'bar';

This happens because Traceur wraps the code in module.exports = function () { ... }, and module.exports doesn't exist in Meteor. I've written #16 to resolve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.