Giter VIP home page Giter VIP logo

atlasexample's Introduction

AtlasExample

Create atlas.workspace file using atlas init.

Modify this file as needed (there are multiple options described in the docs: https://nim-lang.org/docs/atlas.html). For example, in this case I choose to have my dependencies in a deps folder.

Create a local project :

mkdir ProjectA/
cd ProjectA/
nimble init

Note that I find the src/ folder confusing and recommend against using it, so I will modify my nimble file by removing the srcDir and "flattening" the repo first.

Then I will modify the nimble file with my dependencies. In this case, I added threading, arraymancer, timelog.

Then I run atlas install ./ProjectA.nimble. This will :

  • Clone your dependencies in deps/ folder
  • Create a local nim.cfg which update --path options

You can check that dependencies are found by importing them in the tests. Note that other projects will not be aware of ProjectA dependencies when setup that way.

Create a "workspace" project:

For ProjectA/ the nim.cfg files was locally inside the folder. Using atlas you can also create a "workspace" nimble file, that all sub-project should be able to find and depend on.

For example :

atlas use norm
atlas use db_connector

This will create AtlasExample.nimble and nim.cfg.

Now, because norm was added to the workspace, all project will be aware of it. This is the closest equivalent to nimble develop.

Locking your dependencies

To create the atlas.lock file:

cd deps/
atlas pin

Commit the lock file created.

If you need to recreate the same workspace, just use atlas rep command:

cd deps/
atlas rep

To update every dependency and the lock file simply run :

atlas updateDeps
cd deps/
atlas pin

atlasexample's People

Contributors

clonkk 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.