Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add support for a module system #1348

Closed
Bretto opened this issue May 12, 2015 · 4 comments
Closed

Please add support for a module system #1348

Bretto opened this issue May 12, 2015 · 4 comments

Comments

@Bretto
Copy link

Bretto commented May 12, 2015

First off great job and congratulation.
It would be great if you could integrate properly with a module loader system, we are using JSPM and when I tried your project I got some unexpected behaviours.

jspm install npm:materialize-css
errors on:
http://localhost:3000/jspm_packages/npm/[email protected] 404 (Not Found)

and when using jspm install bower:materialize
the wave effect doesn't work

the setup is simple:

<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
        System.import("src/bootstrap").catch(function (ex) {
        console.error('Internal Error ', ex.stack || ex);
    });
</script>
import $ from 'jquery';
import materialize from 'materialize';
import angular from 'angular';
import AppModule from './app/AppModule';

angular.element(document).ready(function () {
    angular.bootstrap(document, ['AppModule']);
});

I think you guys need to integrate with a good module loader as relying on globals is a way of the past and prone to errors... Let me know if you need any more info.

@KingRial
Copy link

I am trying to load the library using SystemJS ( https://github.com/systemjs/systemjs ) and the problem seems to be fired by how "VelocityJS.org" is inserted inside material.js.

That library tries to declare itself twice when a module loader is present.

Using systemJS I just had to declare materialize as a global script adding the following header to materialize.js:

"format global"
if(console)console.info("Loaded modified Materialize");
...the rest of the library...

This is just a workaround!

@kmmbvnr
Copy link
Contributor

kmmbvnr commented Nov 23, 2016

JSPM support was rejected - #1208

@tomscholz
Copy link
Contributor

Please close ;)

@fega
Copy link

fega commented Apr 4, 2017

Already approved in the feature request board for UMD and JSPM support rejected on #1208 as @kmmbvnr points

But if someone wants to create the JSPM is welcome 😃

@fega fega closed this as completed Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants