GithubHelp home page GithubHelp logo

pack's Introduction

pack

Godoc Report Tests Coverage Sponsor

Packs the assets for your web server.

Installation

go get -u github.com/aerogo/pack/...

Usage

pack usage

Run pack in your project directory. It will scan your project directory recursively to compile .pixy, .scarlet and .js files resulting in a components package in your root directory. You can then import the components package in your project to access all of your assets.

Pack is silent by default. Use pack -v to produce verbose output.

Performance

Pack uses parallel compilation via job queues and is therefore extremely fast, much faster than the popular webpack.

Components

Since components is a generated directory you should list this directory in your .gitignore file.

CSS

import "github.com/YOUR_ORG/YOUR_REPO/components/css"
css.Bundle()

Returns the CSS bundle which is a string of CSS containing all styles.

JS

import "github.com/YOUR_ORG/YOUR_REPO/components/js"
js.Bundle()

Returns the JS bundle which is a string of JS containing all scripts.

Templates

import "github.com/YOUR_ORG/YOUR_REPO/components"

Templates are registered as public functions in the components package and can be called directly. All components are global, thus you can call a component from one file in another file without any import directives. Components return an HTML string but they use a single strings.Builder via pooling and streaming under the hood, which is extremely fast.

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

pack's People

Contributors

akyoto avatar dependabot-support avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

pack's Issues

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.