Git Product home page Git Product logo

weblee-utils's Introduction

weblee-utils Build Status

A cli/gulp library for quicker front-end development

How To Use

  1. run npm i --save-dev git://github.com/weblee-solutions/weblee-utils.git
  2. Run weblee from root folder to see list of tasks.
  3. Run weblee setup within the project's npm environment (add weblee-setup to npm scripts).

Example Config

{
  "name": "project_name"
  "avocode" : {
      "userSelector": "User's Full Name",
      "projectSelector": "Project_name_to_match_against"
  },
  "workingDir" "/an/absolute/path|default|wordpress",
  "tasks" : [
    {
      "name" : "stylus",
      "input": "relative/path/to/stylus/folder/from/workingDir",
      "output": "relative/path/to/stylesheets/folder/from/workingDir"
    },
    {
      "name" : "pug-php",
      "input": "relative/path/to/pug/folder/from/workingDir",
      "output": "relative/path/to/php/folder/from/workingDir",
      "options": {
        "pretty": true
      }
    },
    {
      "name" : "jsx",
      "input": "relative/path/to/jsx/folder/from/workingDir",
      "options": {
        "ignore": ["glob/pattern/to/ignore", "**/node_modules/**"]
       }
    }
  ]
}
Config Details
  • All paths are relative to workingDir. workingDir is an absolute path.
  • workingDir when set to "default", uses the process.cwd() (the current working directory)
  • jsx, stylus, less, and js tasks support options.ignore field which is a glob pattern to exclude
Task Options
Task Names Details
pug-php additional helper functions are saved and included before compilation. compiles to .php files
pug-ejs additional helper functions are saved and included before compilation. compiles to .ejs files
pug-html additional helper functions are saved and included before compilation. compiles to .html files
stylus additional helper functions are included at compilation. compiles to css
stylus-bem additional helper functions are included at compilation. compiles to css. Read more about stylus-bem
sass compiles to css
compass compiles to css
less compiles less to css. will prompt for filename.
css minifies css with cssnano. Will rewrite files with .min.css extension. Accepts path to single file or folder relative to workingDir for input
js beautifies js, overwriting file
rjs bundles and minfies with requirejs. input path should be a path to a requirejs config build.js
webpack bundles with webpack. input path should be a path to a webpack config file
jsx compiles to .js in same directory as original .jsx file
html2pug compiles .html files to .pug files
php2pug compiles .php files to .pug files

weblee-utils's People

Contributors

khalidhoffman avatar

Watchers

James Cloos avatar  avatar

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.