Code Monkey home page Code Monkey logo

dotfiles's People

Contributors

rpellerin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotfiles's Issues

Optimizing the npm install at the end

I personally run Antergos (like a half-crazy person), but all of these utilities are basic Linux commands.
Just out of curiosity, though, is there a reason you're not using nvm?
Also, I got and adapted the idea for this code from the eslint-config-airbnb Readme.

(
  # assuming Yarn's global path is in you $PATH; otherwise use [sudo] npm install --global
  # See https://yarnpkg.com/lang/en/docs/cli/global/ for more info
  export NPMGS="eslint cloc sloc gnomon livedown peerflix castnow"
  for cfg in $NPMGS; do npm info "$cfg@latest" peerDpendencies --json |  command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn global add; done
  for cfg in $NPMGS; do yarn global add "$cfg@latest"; done
)

I've used it for babel-* code, as well as eslint and/or tslint args:

for cfg in core preset-stage-0 preset-env plugin-lodash plugin-istanbul eslint; do echo "babel-$cfg"| xargs yarn add --dev; done; yarn add --dev eslint eslint-config-standard stylelint stylelint-config-standard

It lends itself to duplication code quite well; though I'd suppose the "more DRY" way to write that would be:

(
  for tool in core eslint; do echo "babel-$tool"| xargs yarn add --dev; done; for preset in stage-0 env; do echo "babel-preset-$preset"| xargs yarn add --dev; done; for plugin in lodash istanbul; do echo "babel-plugin-$plugin"| xargs yarn add --dev; done
  for lint in eslint stylelint; do echo "$lint $lint-config-standard"| xargs yarn add --dev; done; 
)

but that's beside the point.

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.