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

Closes #2043 #2056

Merged
merged 3 commits into from
Oct 17, 2015
Merged

Closes #2043 #2056

merged 3 commits into from
Oct 17, 2015

Conversation

fakenickels
Copy link
Contributor

You can not define Materialize with window.Materialize because Meteor package export won't be able to export the variable.
Tell me if I have to do some changes before merging :).

@fakenickels
Copy link
Contributor Author

One more thing, for Meteor developers, it's better to add uncompressed assets in packages due two things:

  1. Better to debug.
  2. Meteor compresses assets automatically for us.

So I take the freedom to replace bin/materialize.js by dist/js/materialize.js.

@lampe
Copy link

lampe commented Sep 22, 2015

+1

2 similar comments
@JulianKingman
Copy link

+1

@nelreina
Copy link

+1

@Crenshinibon
Copy link

+1

@serkandurusoy
Copy link

@grsabreu while at it, would you mind also updating package.js to support the new addAsset directive? Because otherwise, this package won't build.

// Check if we are post Meteor@1.2 with which api.addFiles() throws error requiring api.addAssets()
var assetDirective = api.addAssets === undefined ? 'addFiles' : 'addAssets';

// Add material design icons
api[assetDirective]([
  'dist/font/material-design-icons/Material-Design-Icons.eot',
  'dist/font/material-design-icons/Material-Design-Icons.svg',
  'dist/font/material-design-icons/Material-Design-Icons.ttf',
  'dist/font/material-design-icons/Material-Design-Icons.woff',
  'dist/font/material-design-icons/Material-Design-Icons.woff2'
], 'client');

// Add roboto bold font
api[assetDirective]([
  'dist/font/roboto/Roboto-Bold.ttf',
  'dist/font/roboto/Roboto-Bold.woff',
  'dist/font/roboto/Roboto-Bold.woff2'
], 'client');

// Add roboto light font
api[assetDirective]([
  'dist/font/roboto/Roboto-Light.ttf',
  'dist/font/roboto/Roboto-Light.woff',
  'dist/font/roboto/Roboto-Light.woff2'
], 'client');

// Add roboto medium font
api[assetDirective]([
  'dist/font/roboto/Roboto-Medium.ttf',
  'dist/font/roboto/Roboto-Medium.woff',
  'dist/font/roboto/Roboto-Medium.woff2'
], 'client');

// Add roboto regular font
api[assetDirective]([
  'dist/font/roboto/Roboto-Regular.ttf',
  'dist/font/roboto/Roboto-Regular.woff',
  'dist/font/roboto/Roboto-Regular.woff2'
], 'client');

// Add roboto thin font
api[assetDirective]([
  'dist/font/roboto/Roboto-Thin.ttf',
  'dist/font/roboto/Roboto-Thin.woff',
  'dist/font/roboto/Roboto-Thin.woff2'
], 'client');

// Add css and javascript
api.addFiles([
  'dist/css/materialize.css',
  'dist/js/materialize.js'
 ], 'client');

@fakenickels
Copy link
Contributor Author

@serkandurusoy fakenickels@add48e4
I did that :)

@serkandurusoy
Copy link

Hah, I had not realised you've already done it, and even more properly :)

@dcworldwide
Copy link

:+1

@bkuri
Copy link

bkuri commented Sep 26, 2015

👍

@0o-de-lally
Copy link

+1 @Dogfalo can we merge it?

@brokenseal
Copy link

👍

} else {
api.addFiles(assets, 'client', {isAsset: true});
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line? :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's true! I'll add one!

@dandv
Copy link
Contributor

dandv commented Oct 7, 2015

Yes, the package should include the _un_minified .js file.

@Dogfalo Dogfalo merged commit f7ed3c9 into Dogfalo:master Oct 17, 2015
@Dogfalo
Copy link
Owner

Dogfalo commented Oct 17, 2015

Thank you everyone for finding out the problem. I do not do much meteor development and so I am grateful for your help.

@fakenickels
Copy link
Contributor Author

Nice one, @Dogfalo!
When the new version will be published to Atmosphere?

@methodbox
Copy link

Yes, please! I am eager to get this rolled into my app with the fix. Thank you @grsabreu. There are many breaking changes with Meteor 1.2.x, and this is actually a common one.

@Dogfalo, if your packaging anything else for Meteor, this should be a consideration.

@Dogfalo
Copy link
Owner

Dogfalo commented Oct 17, 2015

If you want to grab updates before release you can see what I wrote here to use a github repo as a meteor package #2171

@PolGuixe
Copy link

+1 for new release to be rolled to Atmosphere.

@donwojtallo
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.