GithubHelp home page GithubHelp logo

johanlahti / builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 996 KB

A simple code mergerer and compressor (using third party libraries) that works for JS and CSS files etc.

License: Apache License 2.0

builder's Introduction

Builder

###Introduction

Builder is a very simple code merger tool that I use for building/compressing code for medium-large projects. The tool has three objectives:

  • Convert SASS/SCSS to CSS
  • Merge many JS / many CSS files into one file (e.g. code.min.js and code.min.css)
  • Compress and optimize the code (using Yahoos yui-compiler)

###Scope

The builder is released under the Apache Software License 2.0. Copyright: Malmö City.

The product uses a number of third-party libraries, such as yui compiler etc. These are not included in the sMap product. The copyright of these libraries belongs to their respective authors and are protected by their own license.

The builder package (i.e. the contents of this repository) consists of the builder product on one hand, and the required third-party libraries on the other.

###Requirements

This tool requires:

  • Python

Optional:

  • YUI compiler for minifying and optimizing the code
  • SASS for converting SCSS files into CSS files

###Get started

To get started, follow these steps:

  1. Clone or download the source code of this repository
  2. Download the latest YUI compiler
  3. Open the file config_env.json and set the yuiPath to the YUI compiler's location (.jar file)
  4. Open the file config_sources.json and add the paths to the files you want to compress
  5. Execute the python script build.py using python build.py

This will output 4 files:

  • A merged JS file (all JS files merged into one)
  • A merged CSS file (all CSS files merged into one)
  • A minified JS file (a minified version of the merged JS file)
  • A minified CSS file (a minified version of the merged CSS file)

For more options, read below.

###Support

Note that this tool was originally developed for a specific project and might needs some adaptation to fit your needs. I am working on making it more generic and improving the documentation.

###Contact

johan.lahti (at) malmo.se

builder's People

Contributors

johanlahti avatar

Watchers

 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.