Coder Social home page Coder Social logo

pattern-lab / edition-node-gulp Goto Github PK

View Code? Open in Web Editor NEW
279.0 22.0 111.0 1.06 MB

ARCHIVED - The gulp wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.

License: MIT License

JavaScript 51.82% HTML 17.73% CSS 30.45%
pattern-lab gulp design-systems nodejs edition

edition-node-gulp's People

Contributors

amaldare93 avatar benhalverson avatar bmuenzenmeyer avatar geoffp avatar simonknittel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edition-node-gulp's Issues

Nested element in Dom, not nested in markup

I am using Pattern Lab Node v2.0.0 on Mac, using the gulp configuration.

Expected Behavior

Same Dom as Markup.

Actual Behavior

Nested Dom, not nested Markup. Look this up in the screenshots.

Steps to Reproduce

DOM:
bildschirmfoto 2016-07-20 um 16 18 07
Markup:
bildschirmfoto 2016-07-20 um 16 18 13

Thanks.

TypeError: Cannot read property 'apply' of undefined

Sorry I'm probably in over my head here, but:

I am using Pattern Lab Node v1.2.4 on Mac, using the gulp configuration. I just ran sudo npm install, worked fine. (Not sure why i'm forced to do sudo but anytime i run npm install on any project thats the only way to get things installed properly)

When i run gulp patternlab:serve or any other gulp command I get the following:

$ gulp patternlab:serve

Loading engines...
...scanning for engines in the core...
- mustache engine: good to go
...scanning for engines in the edition or test directory...
...done loading engines.

[13:17:18] Using gulpfile ~/dev/pd-lab/gulpfile.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                  ^

TypeError: Cannot read property 'apply' of undefined
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:19
    at doNTCallback0 (node.js:408:9)
    at process._tickCallback (node.js:337:13)
    at Function.Module.runMain (module.js:477:11)
    at startup (node.js:118:18)
    at node.js:952:3

Versions:

$ node -v
v4.1.2

$ gulp -v
[13:32:42] CLI version 3.8.11
[13:32:42] Local version 4.0.0-alpha.2

Gulp build ignores .scss files

I am using Pattern Lab Node v1.2.3 on Mac, using the gulp configuration.

Expected Behavior

I would expect everything inside source/css (the style.scss file and everything inside the /scss folder) to get compiled into style.css

Actual Behavior

Nothing gets compiled. I understand this seems to be intentional but:

  1. Why do you distribute and include the scss files if they do not get compiled?
  2. How can I change this behaviour so that the gulp build will consider the scss files?

Shouldn't the style of my components (atoms, molecules, etc) be described in the scss files that are being ignored by the build?

Steps to Reproduce
  1. Added some variables and classes for my atoms in source/css/scss/base/_text.scss
  2. Tried to apply this new classess to an atom in my pattern library
  3. gulp patternlab:serve
  4. No changes

Code View CSS is 404ing or pointing to old asset

404 on the code-viewer tab syntax highlighting.

image

https://github.com/pattern-lab/styleguidekit-assets-default/tree/feature-panels/src/css still has a reference to this file - but I see in https://github.com/pattern-lab/styleguidekit-assets-default/blob/feature-panels/gulpfile.js#L59-L67 that it's being sucked in and renamed.

My guess is that I have an old template in https://github.com/pattern-lab/styleguidekit-mustache-default - or possibly that the template is up to date but just needs to reflect the new filename. If the latter, will open issue / pr on that repo

cc @dmolsen

update looks like template is pointing to wrong file - https://github.com/pattern-lab/styleguidekit-mustache-default/blob/feature-panels/views/partials/general-header.mustache#L10

Problem with gulpjs/[email protected]

I am using Pattern Lab Node v1.2.3 on Windows|Linux, using the gulp configuration.
Actually my problem is gulp 4.0 :( , i know all fancy series , parallel , etc functions are cool but it takes so much time for other projects start migrating , it breaks all of my pipelines , i was using semantic-ui and many other stuffs which rely on gulp@3.* and importing other tasks into my patternlab setup , now i can't update i think for a long period or changing all gulp new functions to polyfills like sequencer in patternlab gulp , is there any solution other than this !?

File changes sometimes cause double reloads

I am using Pattern Lab Node- Gulp Edition v1.3.0 on Windows.

Expected Behavior
  • when I save a pattern, I expect pattern lab to rebuild once
Actual Behavior
  • double reloads occur

I've researched this and found the issue, outlined here: http://stackoverflow.com/questions/21608480/gulp-js-watch-task-runs-twice-when-saving-files

I confirmed by saving with Atom vs Notepad. Atom saves caused double reloads. Notepad does not.
I've added these chokidar flags to the watches and it appears to resolve the issue.

Angular Templates

Hey guys, how are you? We are working with atomic design concept for all our frontends from some time till now. We are currently testing the edition-node-gulp for pattern-lab, great work by the way! Just wondering.. Is it possible to use Angular templates with it? Or maybe better.. is there an Angular Pattern Engine in your development roadmap to use in place of the default mustache engine?

`gulp patternlab:build` failing

I am using Pattern Lab Node- Gulp Edition v1.2.4 on Mac OS 10.11.5 with Node version 6.2.2.

Expected Behavior

Command to gulp patternlab:build to build.

Actual Behavior
$ gulp patternlab:build

Loading engines...
...scanning for engines in the core...
...scanning for engines in the edition or test directory...
- mustache engine: good to go
...done loading engines.

[17:14:15] Using gulpfile ~/Projects/edition-node-gulp-1.2.4/gulpfile.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                  ^

TypeError: Cannot read property 'apply' of undefined
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:19
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:577:11)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
Steps to Reproduce

Unzip fresh download of v1.2.4 from the releases page on the project's github page.
npm install
gulp patternlab:build

patternlab:build error

I am using Pattern Lab Node v1.2.3 on Windows7, using the gulp configuration.

after running gulp patternlab:build the following error happens

C:\projects_node\edition-node-gulp-1.2.3>gulp patternlab:build

Loading engines...
...scanning for engines in the core...
...scanning for engines in the edition or test directory...

  • mustache engine: good to go
    ...done loading engines.

[18:00:58] Using gulpfile C:\projects_node\edition-node-gulp-1.2.3\gulpfile.js
[18:00:58] Starting 'patternlab:build'...
[18:00:58] Starting 'pl-assets'...
[18:00:58] Starting 'pl-copy:js'...
[18:00:58] Starting 'pl-copy:img'...
[18:00:58] Starting 'pl-copy:favicon'...
[18:00:58] Starting 'pl-copy:font'...
[18:00:58] Starting 'pl-copy:css'...
[18:00:58] Starting 'pl-copy:styleguide'...
[18:00:58] Starting 'pl-copy:styleguide-css'...
[18:00:58] Finished 'pl-copy:js' after 31 ms
[18:00:59] Finished 'pl-copy:favicon' after 71 ms
[18:00:59] Finished 'pl-copy:css' after 77 ms
[18:00:59] Finished 'pl-copy:styleguide-css' after 89 ms
[18:00:59] Finished 'pl-copy:font' after 94 ms
[18:00:59] Finished 'pl-copy:img' after 128 ms
[18:00:59] Finished 'pl-copy:styleguide' after 133 ms
[18:00:59] Starting ''...
[18:00:59] Finished '' after 1.22 ms
[18:00:59] Finished 'pl-assets' after 142 ms
[18:00:59] Starting 'build'...
[18:00:59] 'build' errored after 377 ms
[18:00:59] TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.extname (path.js:889:5)
at C:\projects_node\edition-node-gulp-1.2.3\node_modules\patternlab-node\cor
e\lib\media_hunter.js:13:16
at diveSync (C:\projects_node\edition-node-gulp-1.2.3\node_modules\diveSync
diveSync.js:62:5)
at findMediaQueries (C:\projects_node\edition-node-gulp-1.2.3\node_modules\p
atternlab-node\core\lib\media_hunter.js:12:5)
at Object.find_media_queries (C:\projects_node\edition-node-gulp-1.2.3\node_
modules\patternlab-node\core\lib\media_hunter.js:34:7)
at buildFrontEnd (C:\projects_node\edition-node-gulp-1.2.3\node_modules\patt
ernlab-node\core\lib\ui_builder.js:420:16)
at Object.build (C:\projects_node\edition-node-gulp-1.2.3\node_modules\patte
rnlab-node\core\lib\patternlab.js:366:7)
at build (C:\projects_node\edition-node-gulp-1.2.3\gulpfile.js:79:14)
at bound (domain.js:280:14)
[18:00:59] 'patternlab:build' errored after 530 ms

Out-of-the-box gulp build fails

I am using Pattern Lab Node v2.0.0 on Mac, using the gulp configuration.

Expected Behavior

Running gulp after the initial setup should complete successfully

Actual Behavior

The build task errors with the following message:

...
[15:51:21] Finished 'pl-assets' after 87 ms
[15:51:21] Starting 'build'...
[15:51:21] 'build' errored after 181 ms
[15:51:21] TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.extname (path.js:1433:5)
    at /Users/ja310147/tmp/edition-node-gulp/node_modules/patternlab-node/core/lib/media_hunter.js:13:16
    at diveSync (/Users/ja310147/tmp/edition-node-gulp/node_modules/diveSync/diveSync.js:62:5)
    at findMediaQueries (/Users/ja310147/tmp/edition-node-gulp/node_modules/patternlab-node/core/lib/media_hunter.js:12:5)
    at Object.find_media_queries (/Users/ja310147/tmp/edition-node-gulp/node_modules/patternlab-node/core/lib/media_hunter.js:34:7)
    at buildFrontEnd (/Users/ja310147/tmp/edition-node-gulp/node_modules/patternlab-node/core/lib/ui_builder.js:420:16)
    at Object.build (/Users/ja310147/tmp/edition-node-gulp/node_modules/patternlab-node/core/lib/patternlab.js:366:7)
    at build (/Users/ja310147/tmp/edition-node-gulp/gulpfile.js:79:14)
    at bound (domain.js:280:14)
[15:51:21] 'patternlab:build' errored after 271 ms
Steps to Reproduce
  1. Cloned the latest edition-node-gulp repo using git clone [email protected]:pattern-lab/edition-node-gulp.git
  2. Ran npm install to fetch all the dependencies
  3. Ran gulp patternlab:build
Notes

I haven't had time to investigate thoroughly, but judging by the messages, this error occurs in patternlab-node/core/lib/media_hunter.js so this may be a bug within patternlab-node itself, rather than this edition.

FWIW, it looks like it's coming from the code using to diveSync that searches for CSS files. I guess the callback function is being called with the file argument not being set to a string. Dunno if that's any help.

'all' default pattern not building. No errors.

I am using Pattern Lab Node- Gulp Edition v1.3.0 on Mac.

Expected Behavior

After successful build and serve, default screen should be 'all' pattern and that when clicking the link to the 'all' pattern would display all patterns.

Actual Behavior

A white screen displays.

Steps to Reproduce

Download v1.3.0
create some patterns
gulp patternlab:serve
all screen will be empty

Cache Buster not outputting.

I am using Pattern Lab Node v6.2.0 on Mac, using the gulp configuration.

Expected Behavior

{{ cacheBuster }} should output the current time in the head and foot mustache templates.

Actual Behavior

{{ cacheBuster }} doesn't output anything.

Steps to Reproduce

Download pre-built gulp edition and get it running, make sure the cacheBust setting is set to true. Nothing is output behind the ? of the stylesheets in the head.

It seems like this variable isn't getting provided to the actual template, it's working properly in {{{ patternLabHead }}} section.

Postinstall error prevents use of edition-node-gulp (v1.3.1) as a dependency

I am using Pattern Lab Node- Gulp Edition v1.3.0 and 'v1.3.1' on Mac|Linux.

Expected Behavior

Running

cd install/location/
npm install eedition-node-gulp

should install eedition-node-gulp as a dependency

Actual Behavior

Instead I get the following error message:

> [email protected] postinstall [...]/component-library/node_modules/edition-node-gulp
> node node_modules/patternlab-node/core/scripts/postinstall.js

module.js:457
    throw err;
    ^

Error: Cannot find module '[...]/component-library/node_modules/edition-node-gulp/node_modules/patternlab-node/core/scripts/postinstall.js'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
npm WARN enoent ENOENT: no such file or directory, open '[...]/component-library/package.json'
Steps to Reproduce
cd install/location/
npm install eedition-node-gulp

The error seems to be that node is looking for the patternlab-node package in the node_modules subdirectory under edition-node-gulp instead of looking in the my project node_modules subdirectory (which contains both the patternlab-node and edition-node-gulp packages)

Most Form Elements Refuse Focus

I am using Pattern Lab Node v1.2.3 on Mac, using the gulp configuration.

Expected Behavior

When clicking a form element (text input, select, textarea) it should receive and keep focus.

Actual Behavior

When clicking on a form element, focus is removed, preventing interaction. Radio button behavior appears normal, as I am able to change a radio button's selected option.

Steps to Reproduce

I started with a fresh install by downloading the release zip.

If I comment out {{{ patternLabFoot }}} in _01.foot.mustache, I can interact with the form element, enter values, etc. But obviously, I lose PatternLab functionality.

TypeError: Cannot read property 'apply' of undefined

I am using Pattern Lab Node v1.2.4 on Mac, using the gulp configuration.

Expected Behavior

Running gulp after npm install, I expect gulp to run.

Actual Behavior

[16:30:45] Using gulpfile ~/Sites/pattern-library/gulpfile.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^

TypeError: Cannot read property 'apply' of undefined
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:19
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:577:11)
at run (node.js:348:7)
at startup (node.js:140:9)
at node.js:463:3

Steps to Reproduce

on node 6.2.2 clone repo, run npm install and run Gulp

Issue installing starterkit

I am using Pattern Lab Node- Gulp Edition v1.2.4 on Mac.

Expected Behavior

When following directions from readme.md to install a starter kit, starter kit should load successfully.

Actual Behavior

Starter kit load does not install and returns an error.

Steps to Reproduce

Download a fresh copy of 1.2.4
npm install

$ npm install pattern-lab/starterkit-mustache-bootstrap --save
[email protected] /Users/mimiflynn/Projects/edition-node-gulp-1.2.4
└── [email protected]  (git://github.com/pattern-lab/starterkit-mustache-bootstrap.git#1ab9fcfc1f66131aa4534759bd05bb4c265e07f0)
$ gulp patternlab:loadstarterkit --kit=[starterkit-mustache-bootstrap]

Loading engines...
...scanning for engines in the core...
...scanning for engines in the edition or test directory...
- mustache engine: good to go
...done loading engines.

[10:23:14] Using gulpfile ~/Projects/edition-node-gulp-1.2.4/gulpfile.js
[10:23:14] Starting 'patternlab:loadstarterkit'...
Attempting to load starterkit from /Users/mimiflynn/Projects/edition-node-gulp-1.2.4/node_modules/[starterkit-mustache-bootstrap]/dist
 [starterkit-mustache-bootstrap] not found, please use npm to install it first.
 [starterkit-mustache-bootstrap] not loaded.

patternlab:serve not working on fresh install

I am using Pattern Lab Node edition-node-gulp v1.2.1 on Windows

Expected Behavior

Running gulp patternlab:serve compiles patternlab and spins up a local server on port :3000

Actual Behavior

Get the following error:

 Using gulpfile c:\dev\_tests\plne\gulpfile.js
C:\Users\bren.murrell\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                  ^

TypeError: Cannot read property 'apply' of undefined
    at C:\Users\bren.murrell\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:19
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3
Steps to Reproduce
  1. install repo by running git clone https://github.com/pattern-lab/edition-node-gulp . in empty directory
  2. run npm install
  3. run gulp patternlab:serve
Environment
  • Node v4.4.5 (64 bit)
  • Gulp v4.0.0-alpha.2
  • Gulp CLI version 3.9.1

Styleguide Tools > Annotations

  • parse and include current annotations.js
  • parse pattern-based markdown annotations
  • parse and include current annotations.md
  • parse yaml annotations?
  • unit test coverage for annotation_exporter

twig pattern engine

Is there currently a way to use the node version of Pattern Lab with Twig?

Cannot read property 'apply' of undefined

I am using Pattern Lab Node v6.2.2 on Windows & Mac, using the gulp configuration.

Expected Behavior

After installing npm packages, gulp should be able to perform its defined tasks in /gulpfile.js

Actual Behavior

All gulp tasks results in thrown error.
Full output:

Loading engines...
...scanning for engines in the core...
- mustache engine: good to go
...scanning for engines in the edition or test directory...
...done loading engines.

[10:25:17] Using gulpfile ~/[...]/edition-node-gulp/gulpfile.js
/[...]/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                  ^

TypeError: Cannot read property 'apply' of undefined
    at /opt/local/lib/node_modules/gulp/bin/gulp.js:129:19
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:577:11)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
Steps to Reproduce

Issue is duplicated on both Windows 10 & OSX

  1. Clone git repository
  2. Run 'npm install' (gulp already installed globally)
  3. Run any gulp command

Integrate styleguidekit-assets-default

https://github.com/pattern-lab/styleguidekit-assets-default

  • Rename UI menu items to support pl-pattern-nav-template
  • Rename ishControlsVisible to support pl-ish-controls-template
  • Write to patternlab-data.js
  • Navigation not working yet
  • Rendering of pl-ish-controls-template
  • Rendering of pl-pattern-nav-template
  • Get a local copy of PL PHP v2 running

Reverse engineering of this styleguidekit template will handle a lot of the work

  • Delete patternlab_grunt.js and patternlab_gulp.js from core
  • [ONGOING] Reconcile other ways we've deviated from this styleguide (basePath, default pattern, etc)
  • [x ] Unit tests ?
  • Cleanup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.