A node-based script for importing patterns, following the Pattern Library model.
THIS IS POC CODE
but...we can still make it work by following these steps for Atlas:
Install Atlas using the yeoman generator
Add the pattern-importer as a node module:
npm install git+ssh://git@github.com:pattern-library/pattern-importer.gitAdd the pattern-library as a bower dependency:
bower install git@github.com:pattern-library/pattern-library.gitCreate a new gulp file
./app/_gulp/pattern-import.jsAdd the following code to
pattern-import.js:/** * @fileOverview Uses Gulpjs to grab html patterns * * @author Scott Nath * * @requires NPM:gulp * @requires NPM:js-yaml * @requires /gulp/config.js */ 'use strict'; var gulp = require('gulp'), print = require('gulp-print'), patternImporter = require('pattern-importer'); var pattFiles = ['./app/bower_components/pattern-library/patterns/**/pattern.yml']; gulp.task('pattern-import', function() { console.log('-------------------------------------------------- DEVELOPMENT: GRABBING HTML PATTERNS'); return gulp.src(pattFiles) .pipe(print()) .pipe(patternImporter()); });Import the patterns on the command line with:
gulp pattern-importFind your imported patterns in ./app/_patterns