Giter Club home page Giter Club logo

butler's People

Contributors

acyborg avatar becw avatar biz123 avatar deadarm avatar froboy avatar gleroux02 avatar labbydev avatar lukewertz avatar martensc avatar mathewpeterson avatar michellanneli avatar nstriedinger avatar patrickfweston avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

butler's Issues

Solving issue The unauthenticated git protocol

There is an issue trying to execute npm install you will get the following error:

npm ERR! git fetch -a origin (git://github.com/squizlabs/HTML_CodeSniffer.git) fatal: remote error:
npm ERR! git fetch -a origin (git://github.com/squizlabs/HTML_CodeSniffer.git)   The unauthenticated git protocol on port 9418 is no longer supported.

To solve this issue is needed to change the git:// to https:// or to github://

External site only branch

We need a branch which only supports proxy for an external site for its compiling, so Drupal (and other) sites without a prototype can benefit from Butler.

Butler fails silently on YAML syntax errors

When Butler attempts to compile faulty YAML files it fails silently. It should notify the user of the error, preferably what line of which file is failing.

I've tried implementing this with something like https://github.com/dtothefp/gulp-yaml-validate, but I wasn't able to integrate it into Butler's Gulpfile.js.

Optimally, I see this running before or after the CSS linter, scanning styleguide/source/styleguide/*.html for YAML parsing errors, and then outputting the errors to the terminal.

Update master branch README

Currently the README for master doesn't address the "Umm... there's no code here, how do I work with this" aspect, which I think should be addressed first thing in the README.

Styleguide deploy missing timestamp

Seems likely [timestamp] should actually be a timestamp, but when butler deploys to github pages, the commit message is always:
Updated with Butler - [timestamp]

While we're in that area of the code, it would also be handy to have the commit hash and message of the branch the deploy is working from. You can get this with git log -1 --format="[%ai] %h: %s" So if we were deploying from here:

commit d23a45909d32aec3caade7a73b7e26725860e42c
Author: Amazing Designer <[email protected]>
Date:   Tue Sep 13 14:28:49 2016 -0500

    create breadcrumb component

The commit message would be:
Updated with Butler - [2016-09-13 14:28:49 -0500] d23a459: create breadcrumb component

This suggestion means we get the timestamp of the recent commit, and not the timestamp of the commit which triggers the deployment, but the timestamp of the commit triggering the deployment is already in the commit. If we have the commit log, we probably already have that timestamp.

Variables in deploy

Notice Beginning deploy to gh-pages forundefined. There's no space after "Beginning deploy to gh-pages for" but also, the variable that is being printed after is "undefinded".

Also, pretty sure Committing "Updated with Butler - [timestamp] should actually be a timestamp and not [timestamp]
screen shot 2016-08-10 at 12 23 27 pm

For what it's worth, some of these may actually be set. The deploy seems to work, but the output is flawed. The exception being the git commit messages which really do just say [timestamp].

Butler isn't overriding sculpin variable

So there are a couple of issues:

  • the README says the variable should be defaults.sculpin_run and it should actually be overrides.sculpin_run
  • when adding the override to a project conf/defaults.butler.js Butler is not overriding the path variable. Instead, it continues to look for the vendor/bin/sculpin

Private repo, MIT license

@agentrickard we added a MIT license to the project to allow other people to use it, but the repository is still private. Seems like if we're going to allow others to use it, then we should at least make the repo public. I'd be interested in exploring, what else needs to be done to make this a public artifact.

Unable to install via npm in vagrant

I am running into an issue with installing butler via npm in vagrant. I've updated node and npm but maybe this is only an issue with vagrant: npm/npm#9633 (comment). Either way I'm reporting it in case other people run into the issue. Does it make sense to add it as a git clone instead?

npm ERR! Linux 3.19.0-47-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "git://github.com/palantirnet/butler.git"
npm ERR! node v5.9.1
npm ERR! npm  v3.8.3
npm ERR! path /var/www/palantir20.local/node_modules/@palantirnet/butler/bin/butler
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/var/www/palantir20.local/node_modules/@palantirnet/butler/bin/butler'
npm ERR! enoent ENOENT: no such file or directory, chmod '/var/www/palantir20.local/node_modules/@palantirnet/butler/bin/butler'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/palantir20.local/npm-debug.log
npm ERR! code 1

Installing Butler is slow

I've run into this a few times while bringing projects up. Running npm install initially can take over an hour to run. I'm unsure what might be causing the problems.

I may investigate using another npm compatible package manager like yarn to see if it speeds up the process.

SVGO?

https://github.com/svg/svgo can automate a lot of SVG optimization tasks, which I've heard:

we literally have no standards around

It might be worth considering as an addition.

README description

Does "The beginnings of a Sculpin-based style guide creation tool." really explain what this is? Is there something better that could go here?

Config overrides in conf/butler.default.js not being used

The configuration variables custom to the project that are stored in the conf/butler.default.js are not being used. If you run console.log(defaults) in the gulpfile after trying to pull in the custom variables you will receive the following output even with a git remote repository being set:

{ scss:
   [ '../../styleguide/source/code/sass/*.scss',
     '../../styleguide/source/code/sass/**/*.scss' ],
  css: '../../styleguide/source/code/css/',
  sculpin: '../../styleguide/',
  output_dev: '../../styleguide/output_dev',
  output_prod: '../../styleguide/output_prod/**/*',
  sculpin_run: '../../vendor/bin/sculpin',
  autoprefixer: { browsers: [ 'last 2 versions', '> 5%' ] },
  stylelint: { configFile: 'config/linters/stylelint.config.json' },
  deploy: { remoteUrl: undefined } }

I have a solution for this that I will link a PR to: #29

THE SOCKETS ARE OVERLOADED!

'events.js:85
throw er; // Unhandled 'error' event
^
Error: stdout maxBuffer exceeded.
at Socket. (child_process.js:792:12)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at Pipe.onread (net.js:538:20)'

npm-debug.txt

Shrinkwrap.json

This could probably be left out of the Butler repo and and installed as part of startup on a per project basis.

Butler isn't overriding sculpin variable

So there are a couple of issues:

  • the README says the variable should be defaults.sculpin_run and it should actually be overrides.sculpin_run
  • when adding the override to a project conf/defaults.butler.js Butler is not overriding the path variable. Instead, it continues to look for the vendor/bin/sculpin

Use JSON fixtures and Vue.js for templating with real data?

Over in the PNet project, I've taken Carl's styleguide and enhanced it with real data using Vue.js (a single JS include) and some JSON exports of real Drupal data.

That work is in https://github.com/palantirnet/palantirnet-d8/pull/78

Is this something we want to do with our styleguide work? It would entail:

  • Creating JSON fixtures for each data model in the project.
  • Learning Vue.js syntax for looping and variable syntax.
  • Understanding how to use {% verbatim %} in Twig templates so that Vue.js handlebar tags are not interpreted.

Here's a snippet of the final code, which iterates over content for populating a list:

    <div class="grid">
      <div class="grid-sizer"></div>
      <div class="gutter-sizer"></div>
      <!-- Vue.js template for printing each item. -->
      <template v-for="(item, index) in selectedContent(content, display, topicSelected, industrySelected)">
        <div :class="'grid-item' + getClass(index)">
          <a class="grid-link" :v-bind="{ href: item.url }" :style="{ backgroundImage: 'url(\'' + background(index, item.image) + '\')' }">
          <div class="grid-link__content">
            <span class="grid-link__label">{% verbatim %}{{ item.type }}{% endverbatim %}</span>
            <h2 class="grid-link__title">{% verbatim %}{{ item.title | decode }}{% endverbatim %}</h2>
          </div>
          <div class="grid-link__view">
            <span class="grid-link__label">{% verbatim %}{{ item.title | decode }}{% endverbatim %}</span>
            <span class="grid-link__view-text" :style="{ color: getColor(index) }">View {% verbatim %}{{ item.type }}{% endverbatim %}</span>
          </div>
          </a>
        </div>
      </template>
    </div>

contributing.md

this needs some instructions on how to review things and should be setup to flag that users read the contributing.md before creating a PR

Use Drupal breadcrumb markup

Use Drupal breadcrumb as an include in our base install. This can be static.

<nav role="navigation" aria-labelledby="system-breadcrumb">
    <h2 class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
    <ol>
    {% for item in breadcrumb %}
        {% if item.url %}
          <a href="{{ item.url }}">{{ item.text }}</a>
        {% else %}
          {{ item.text }}
        {% endif %}
    {% endfor %}
    </ol>
  </nav>

Cannot run static version of Butler

I tried just running Butler statically to see if it would pull up the sculpin prototype. It seems to have installed the dependencies, however when I ran gulp this is the error that I got:

Error: Cannot find module 'isarray'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/LaurenByrwa/Sites/butler/node_modules/gulp-inject/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js:25:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/LaurenByrwa/Sites/butler/node_modules/gulp-inject/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/readable.js:1:90)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Sass errors break rerunning Butler

When you encounter certain Sass errors, Butler is halted. Rerunning Butler throws an error because the port (8000) is occupied. I believe the former process never lets go of the port.

The only fix so far is restarting Vagrant and then running Butler.

Error thrown when trying to rerun Butler:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Command failed: /bin/sh -c ../../vendor/bin/sculpin generate --watch --server --project-dir="../../styleguide/"


  [React\Socket\ConnectionException]                            
  Could not bind to tcp://0.0.0.0:8000: Address already in use  

spress-deploy fails with npm run deploy

I get TypeError cannot read property '0' null when running npm run deploy either locally or in the virtual machine.

TypeError: Cannot read property '0' of null
at Function.module.exports.Commit.actor (/var/www/uw-stout.local/styleguide/node_modules/butler/node_modules/gulp-gh-pages/node_modules/gift/lib/commit.js:145:56)
at Function.module.exports.Commit.parse_commits (/var/www/uw-stout.local/styleguide/node_modules/butler/node_modules/gulp-gh-pages/node_modules/gift/lib/commit.js:111:21)
at /var/www/uw-stout.local/styleguide/node_modules/butler/node_modules/gulp-gh-pages/node_modules/gift/lib/commit.js:71:39
at ChildProcess.exithandler (child_process.js:745:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1019:16)
at Process.ChildProcess._handle.onexit (child_process.js:1091:5)

I've traced this to an error with the gulp-gh-pages module and from there to its dependent gift module:
notatestuser/gift#96

It looks like there is a pushed fix. Is there any way to update butler to get that fix in place?

Doesn't work in vagrant box

Seems to be a performance issue with the way that Virtual Box handles the NFS Mount, should be tested with VMWare to see if that would solve the problem or not.

README points to incorrect place

README instructions point to "#remove-ruby" which is no longer a branch it should point to the tag that we are using currently.

Project dependency or styleguide dependency?

Right now Butler assumes that it is the dependency of a project that has a styleguide. This means that the package.json and the node_modules are in the project root, but maybe that assumption is incorrect. Should it really be considered a styleguide dependency where those things would live in [project]/styleguide/ instead of inside [project]?

Linting configuration

If it is acceptable to ignore these linting warnings, can we configure the linter to ignore them too so real warnings do not get lost in the deluge?

โš  Expected double quotes (string-quotes) [stylelint],
โš  'rule-no-duplicate-properties' has been deprecated and in 5.0 it will be removed. Use 'declaration-block-no-duplicate-properties' instead. [stylelint]
โš  'declaration-block-no-single-line' has been deprecated and in 5.0 it will be removed. Use 'block-no-single-line' instead. [stylelint]
โš  'rule-trailing-semicolon' has been deprecated and in 5.0 it will be removed. Use 'declaration-block-trailing-semicolon' instead. [stylelint]

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.