GithubHelp home page GithubHelp logo

doytsujin / jsonnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/jsonnet

0.0 1.0 0.0 41.68 MB

Jsonnet - The data templating language

Home Page: http://jsonnet.org

License: Apache License 2.0

C 2.41% Python 4.80% CSS 0.26% HTML 0.88% C++ 31.35% Shell 1.99% Makefile 0.41% CMake 0.71% Java 0.49% Dockerfile 0.02% Jsonnet 56.28% Starlark 0.40%

jsonnet's Introduction

Jsonnet - The data templating language

Build Status

For an introduction to Jsonnet and documentation, visit our website.

This repository contains the original implementation. You can also try go-jsonnet, a newer implementation which in some cases is orders of magnitude faster.

Visit our discussion forum.

Packages

Jsonnet is available on Homebrew:

brew install jsonnet

Jsonnet is available on MSYS2:

pacman -S mingw-w64-clang-i686-jsonnet
pacman -S mingw-w64-clang-x86_64-jsonnet
pacman -S mingw-w64-i686-jsonnet
pacman -S mingw-w64-x86_64-jsonnet
pacman -S mingw-w64-ucrt-x86_64-jsonnet

The Python binding is on pypi:

pip install jsonnet

You can also download and install Jsonnet using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install jsonnet

The Jsonnet port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Building Jsonnet

You can use either GCC or Clang to build Jsonnet. Note that on recent versions of macOS, /usr/bin/gcc and /usr/bin/g++ are actually Clang, so there is no difference.

Makefile

To build Jsonnet with GCC, run:

make

To build Jsonnet with Clang, run:

make CC=clang CXX=clang++

To run the output binary, run:

./jsonnet

To run the reformatter, run:

./jsonnetfmt

Bazel

Bazel builds are also supported. Install Bazel if it is not installed already. Then, run the following command to build with GCC:

bazel build -c opt //cmd:all

To build with Clang, use one of these two options:

env CC=clang CXX=clang++ bazel build -c opt //cmd:all

# OR

bazel build -c opt --action_env=CC=clang --action_env=CXX=clang++ //cmd:all

This builds the jsonnet and jsonnetfmt targets defined in cmd/BUILD. To launch the output binaries, run:

bazel-bin/cmd/jsonnet
bazel-bin/cmd/jsonnetfmt

Cmake

cmake . -Bbuild
cmake --build build --target run_tests

Contributing

See the contributing page on our website.

Developing Jsonnet

Running tests

To run the comprehensive suite:

make test

Locally serving the website

You need a doc/js/libjsonnet.wasm which can either be downloaded from the production website:

wget https://jsonnet.org/js/libjsonnet.wasm -O doc/js/libjsonnet.wasm

Or you can build it yourself, which requires checking out go-jsonnet. See the README.md in that repo for instructions.

Then, from the root of the repository you can generate and serve the website using Jekyll:

tools/scripts/serve_docs.sh

This should the website on localhost:8200, automatically rebuild when you change any underlying files, and automatically refresh your browser when that happens.

The standard library is documented in a structured format in doc/_stdlib_gen/stdlib-content.jsonnet. The HTML (input for Jekyll) is regenerated using the following command:

tools/scripts/update_web_content.sh

jsonnet's People

Contributors

sparkprime avatar sbarzowski avatar davidzchen avatar mikedanese avatar rohitjangid avatar benley avatar refi64 avatar oconnorr avatar loverszhaokai avatar ketchupbomb avatar scr-oath avatar timp87 avatar hanazuki avatar dmuir-g avatar mortenmj avatar duologic avatar osher avatar yegle avatar rhowe avatar cdluminate avatar redbaron avatar hanyucui avatar deepgoel17 avatar camh- avatar tejesh-raut avatar spencels avatar gburiola avatar toge avatar sneivandt avatar neeke 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.