-
Notifications
You must be signed in to change notification settings - Fork 405
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
Become require()
-able by allowing to become a dependency
#221
Comments
hey @EvanLovely I love the idea and the example syntax. For what it's worth this PR just landed in dev and I have plans to get it into 1.1.0 along with some example uses. You'll also see that @geoffp included an example usage. It's not ready, but it's coming! |
OK @bmuenzenmeyer - I've got the basics up in #223 ! |
Did the last commit of #223 address this issue in its entirety? |
It's a huge step forward, but I think for this issue to be complete, we'd need it documented and any other steps ironed out. The PR #223 laid most of the groundwork (hence the "Basic" part of the title). |
I am freed up, and will start testing and documenting using #223 (comment) as a starting point. |
Documenting this has moved to https://github.com/pattern-lab/patternlab-node/wiki/Running-Pattern-Lab-Node-as-an-NPM-Dependency Finishing #237 has helped simplify the styleguide steps quite a bit. When I pick this up again, I should be able to push through the remaining tasks and write up grunt docs too. |
I got grunt working tonight - sans all the styleguide hoops to jump through, and updated the grunt documentation accordingly. I will go through gulp at earliest opportunity too. I've also created reference repositories that can house the final product configuration, which might help people understand what to do... or perhaps they might directly fork? Hmm.. https://github.com/bmuenzenmeyer/patternlab-node-grunt-dependency-example . 🎉 🎈 🍻 🍰 |
Woohoo!
|
Documentation complete! Also setup a reference repo for gulp here: https://github.com/bmuenzenmeyer/patternlab-node-gulp-dependency-example.. @EvanLovely @geoffp any objections to calling this guy resolved?!? |
This is awesome! I'll sign off. 👍 |
Hi Guys. Thanks for tackling this, that's a huge improvement! But I think it can go even further to trully become a dependency of any other project. The current implementation involves copying Now, WDYT? |
I actually have a working example with I'll do more tests with |
Hi @tbouron I wasn't aware of the ability to require other grunt/gulp files. TIL. As with all contributions, I am eager to explore things that make consumption and developer workflow easier! |
Me neither, that's great news to me -- I have at least a couple projects for which I'd love that functionality. |
@bmuenzenmeyer, @geoffp I'll try to put something together tomorrow :) |
@bmuenzenmeyer, @geoffp I couldn't wait until tomorrow, so here you go: #244 :) |
SO happy we got this in! I often use In var plugin = require('gulp-plugin');
module.exports = function (gulp, config) {
gulp.task('task', function () {
// cool stuff here
});
}; In var gulp = require('gulp');
var config = require('config.json');
require('./task.js')(gulp, config); |
I meant to have this close with 1.1.0. |
It would be great to be able to use Pattern Lab Node as a dependency in another project (like a CMS theme build for a client - my use case). I would like my repo to contain the source code for the Pattern Lab Patterns, Data, Config, and Header/Footer template files, but not the compiled source – kinda like how we commit our
*.scss
but not our*.css
. To do this we'd need to be able to do this at the top of a Gulp file:Basically pass in the config object (could just read a
config.json
in our repo and pass it in too) and then run the build command.Is there any interest in the project moving in this direction? I could see the gulp and grunt "starter kits" you already provide getting ported to a yeoman generator for people who want all the stuff out of the box.
Thanks so much for your work and interest in the Pattern Lab world!! 🍻
The text was updated successfully, but these errors were encountered: