-
Notifications
You must be signed in to change notification settings - Fork 7
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
Package api.addFiles accept wildcards / folders #7
Comments
+1 |
+1 |
1 similar comment
👍 |
Great idea! (and pretty obvious... hey @ekatek) |
there is something like this but it got confusing when using PACKAGE_DIRS to load files while in local dev mode. packages in production have the "author:package" prefix when bundled but
|
So, someone should file an issue upstream? |
+1 |
This is a feature request, there is no place to file this upstream. |
It would be also great if package could traverse directories, so that one would not have to hard-code the paths but allow self-discovery: meteor/meteor#2626 |
+1 |
PR added, more for discussion - you are wellcome to join in working on the pr. Some of the comments are off talking about Arrays, needs tests+documentation writing before it can be merged - but let's get a "go" from core before polishing. At the moment its not recursive - but we could replace the Comments / ideas etc. are welcome - also please clone/checkout the branch and se if its working. Kind regards Morten |
+1 |
+1 really urgently needed ! |
+1 |
Any update on this ? |
+1 |
+1 |
@wilau2 use ecmascript imports example in coffeescript { Template } = require 'meteor/templating'
require './someTemplate.html'
require './someTemplate.scss'
Template.someTemplate.onCreated ->
# do some
So in Meteor 1.3+ packages You does not actual use api.addFile for all of templates/styles Just create a single entrypoint in pacakge.js api.mainModule('main.coffee'); |
👍 |
1 similar comment
+1 |
It's a good temporary solution? Package.onUse(function(api) {
var path = Npm.require('path'),
glob = Npm.require('glob'),
files = glob.sync('client/**/*js', {cwd: path.join(path.resolve('.'), 'packages'));
api.addFiles(files, ['client']);
}); |
Hugo Magalhaes: developing a application using the method suggested at http://www.matb33.me/2013/09/05/meteor-project-structure.html, so I have a package per feature and all the packages have the following structure:
Trying to find a way to add all files from each folder (and sub-folder in the following way):
The text was updated successfully, but these errors were encountered: