Skip to content

Instantly share code, notes, and snippets.

@awatson1978
Last active August 29, 2015 14:27
Show Gist options
  • Save awatson1978/39cecf9ba5cd476ac85a to your computer and use it in GitHub Desktop.
Save awatson1978/39cecf9ba5cd476ac85a to your computer and use it in GitHub Desktop.
Package.addComponet()
function addComponent(api, name, imports) {
  api.addFiles('components/' + name + '/' + name + '.html', 'client');
  api.addFiles('components/' + name + '/' + name + '.js', 'client');
  api.addFiles('components/' + name + '/' + name + '.styl', 'client');
  if(imports) {
    api.addFiles('components/' + name + '/skin.import.styl', 'client');
    api.addFiles('components/' + name + '/structure.import.styl', 'client');
  }
}


function addView(api, name, imports) {
  api.addFiles('views/' + name + '/' + name + '.html', 'client');
  api.addFiles('views/' + name + '/' + name + '.js', 'client');
  api.addFiles('views/' + name + '/' + name + '.styl', 'client');
  if(imports) {
    api.addFiles('views/' + name + '/skin.import.styl', 'client');
    api.addFiles('views/' + name + '/structure.import.styl', 'client');
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment