All Projects → Dynatrace → Sketchmine

Dynatrace / Sketchmine

Licence: mit
Tools to validate, generate and analyse sketch files from web pages

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Sketchmine

Ts Monorepo
Template for setting up a TypeScript monorepo
Stars: ✭ 459 (+302.63%)
Mutual labels:  rollup, lerna, jest, monorepo
Modern Monorepo Boilerplate
Modern Monorepo Boilerplate with Lerna, TypeScript, React/CRA, HMR, Jest, ESLint/TypeScript.
Stars: ✭ 127 (+11.4%)
Mutual labels:  lerna, jest, monorepo
Entria Fullstack
Monorepo Playground with GraphQL, React, React Native, Relay Modern, TypeScript and Jest
Stars: ✭ 434 (+280.7%)
Mutual labels:  lerna, jest, monorepo
Lerna Yarn Workspaces Monorepo
🐉 A Monorepo with multiple packages and a shared build, test, and release process.
Stars: ✭ 201 (+76.32%)
Mutual labels:  lerna, jest, monorepo
Pectin
Rollup-related tools for incremental transpilation of packages in Lerna-based monorepos
Stars: ✭ 50 (-56.14%)
Mutual labels:  rollup, lerna, monorepo
ng-mono-repo-starter
Angular Mono Repo Starter
Stars: ✭ 79 (-30.7%)
Mutual labels:  jest, lerna, monorepo
Lerna Changelog
📖 PR-based changelog generator with monorepo support
Stars: ✭ 611 (+435.96%)
Mutual labels:  lerna, monorepo
Next Right Now
Flexible production-grade boilerplate with Next.js 10, Vercel and TypeScript. Includes multiple opt-in presets using Storybook, Airtable, GraphQL, Analytics, CSS-in-JS, Monitoring, End-to-end testing, Internationalization, CI/CD and SaaS B2B multi single-tenancy (monorepo) support
Stars: ✭ 671 (+488.6%)
Mutual labels:  jest, monorepo
Lerna
Splitting up large codebases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories becomes complicated very quickly.
Stars: ✭ 31,079 (+27162.28%)
Mutual labels:  lerna, monorepo
Svelte Tailwind Extension Boilerplate
A Chrome extension boilerplate built with Svelte, TailwindCSS, Jest, and Rollup.
Stars: ✭ 26 (-77.19%)
Mutual labels:  rollup, jest
Lerna Yarn Workspaces Example
How to build TypeScript mono-repo project with yarn and lerna
Stars: ✭ 787 (+590.35%)
Mutual labels:  lerna, monorepo
Angular6 Monorepo Experiment
A monorepo experiment using Angular-CLI and Lerna
Stars: ✭ 15 (-86.84%)
Mutual labels:  lerna, monorepo
Ultra Runner
🏃⛰ Ultra fast monorepo script runner and build tool
Stars: ✭ 496 (+335.09%)
Mutual labels:  lerna, monorepo
Sketch Find And Replace
Sketch plugin to do a find and replace on text within layers
Stars: ✭ 693 (+507.89%)
Mutual labels:  sketch, ux
Opensource
Delivering delightful digital solutions. Open Source packages with combined ~85M/month downloads, semantically versioned following @conventional-commits. Fully powered by Jest, @Babel TypeScript, @Airbnb @ESLint + @Prettier, @YarnPKG + @Lerna independent versioning, GH @Actions & automated dep updates with @RenovateBot.
Stars: ✭ 459 (+302.63%)
Mutual labels:  jest, monorepo
Download Your Travelmap
free your travelmap
Stars: ✭ 22 (-80.7%)
Mutual labels:  rollup, jest
Eslint Plugin Monorepo
ESLint Plugin for monorepos
Stars: ✭ 56 (-50.88%)
Mutual labels:  lerna, monorepo
Vitamin Web
Decathlon Design System libraries for web applications
Stars: ✭ 70 (-38.6%)
Mutual labels:  lerna, monorepo
Flow Mono Cli
A command line interface that aims to solve a few issues while working with flow typed codebases in a mono-repo.
Stars: ✭ 84 (-26.32%)
Mutual labels:  lerna, monorepo
Mercury Parser
📜 Extract meaningful content from the chaos of a web page
Stars: ✭ 4,025 (+3430.7%)
Mutual labels:  rollup, jest

Github banner for sketchmine

Build Status lerna jest made with sketchmine

What is Sketchmine?

Sketchmine is a toolkit for creating, validating, and maintaining Sketch and Sketch symbol files. Most parts are used to generate Sketch symbol libraries out of Angular components. See Stefan Baumgartner and Katrin Freihofner's talk at AngularConnect to learn more about our workflow and what you can do with Sketchmine.

Youtube

But there's more. Sketchmine can also be used to validate Sketch files against a self defined ruleset. To make sure all fonts, colours and other variables follow your design system.

The parts

Getting started

Architecture

Sketchmine follows a mono-repo approach. All officially maintained modules and dependencies are in the same repository.

The tool for managing the mono-repo @sketchmine has been extracted out as Lerna

Dependency graph

Dependency graph of the sketchmine mono repository

Installation

To start contributing and developing you have to run yarn install to install all the necessary dependencies. after that you can switch to any package in the ./packages folder and start to get your hands dirty 👷🏼‍.

If you want to run tasks across all packages, you'll find Lerna to be very useful. You can use the NPM scripts in the root package folder or you can execute all tasks with the lerna run build command to execute the yarn build command in every package. For further information, check out the Lerna documentation.

How to get up and running

You have several options for getting started with the library. If you want to develop locally, skip ahead to the Run without Docker section. If you need to develop something on the CI/CD Docker image, decide if you want to use docker-compose, which is the easy way, or if you want to use plain Docker without composer (this is how Jenkins uses Docker).

Docker: the Jenkins way 🐳

  1. Build the image
docker build \
  -t ${YOUR_TAG} \
  --build-arg GIT_PASS=$GIT_PASS \
  --build-arg GIT_USER=$GIT_USER \
  --build-arg GIT_BRANCH=${ANGULAR_COMPONENTS_BRANCH} \
  .
  1. Run the image

It's important that you set the environment variable -e DOCKER=true for the headless Chrome tasks like the sketch-generator and the library. Additionally, you can set a second variable like -e DEBUG=true to see verbose logging.

# mount angular components into docker image
docker run -it -v $(pwd)/_tmp/:/lib/_tmp/ -e DOCKER=true --cap-add=SYS_ADMIN ${container} ls -lah _tmp

# generate library
docker run -it -v $(pwd)/_tmp/:/lib/_tmp/ -e DOCKER=true --cap-add=SYS_ADMIN ${container} node dist/library

# use validation
docker run -it -v $(pwd)/_tmp/:/lib/_tmp/ -e DOCKER=true --cap-add=SYS_ADMIN ${container} node dist/sketch-validator --file="/path/to/file.sketch"

Run with docker-compose

To get started with docker-compose, create the following file:

touch .env
echo 'GIT_PASS=${password}\nGIT_USER\n=${user}\nGIT_BRANCH=feat/poc-sketch' > .env

Then run docker-compose up.

Run without Docker

To run without Docker in a local development environment, begin by running:

sh postinstall.sh

This step will prepare everything for you so you can start developing. The Angular components will be checked out to the _tmp directory and the library app shell will be moved in the correct location.

If you run the library, node dist/library and the .sketch file will be generated automatically. 🤘🏻

Docker registry

Following each successful master build of a new Docker image, the library is generated and deployed to the Docker registry. You can view the list of available tags in the Docker registry tag list.

Clean up your docker images and containers

After this commands every image and container has to be pulled again and created. Clean reset if the hard drive is messed up.

docker stop $(docker ps -a -q)
docker rm -v $(docker ps -a -q)
docker rmi $(docker images -q)

Available commands

npm run build           # build all the parts
npm run build:dev       # build with watch flag
npm run test            # run all the unit tests and e2e tests
npm run lint            # lint the project
node dist/${part}       # run the specified part of the library

Debugging

There are some debugging variables you can use to modify console output. They're specified in the .vscode/launch.json file, to be parsed while debugging with VSCode. The environment Variable of process.env.SKETCH = 'open-close' opens and closes the Sketch app automatically on a MacOS machine.

process.env.DEBUG = 'true';
process.env.DEBUG_SVG = 'true';
process.env.DEBUG_BROWSER = 'true';
process.env.DEBUG_TRAVERSER = 'true';
process.env.SKETCH = 'open-close';

Open and close sketch.app on MacOS for easier development.

process.env.SKETCH = 'open-close';

Testing

Because testing is so important and ensures good quality code, we at Dynatrace use Jest as our testing library. Jest ships with a built-in mocking library. To gain confidence with the testing syntax, see the Jest documentation. Jest follows the Jasmine convention.

The files must contain the pattern **/*.test.ts for unit tests and, for end-to-end testing, **/*.e2e.ts. All tests should stay in the tests folder. Even though it's possible to place tests in the src folder if there's good reason.

To execute the tests, run yarn test. This will run the Jest test and provide you with coverage for the package.

Important

All tests should be wrapped in a describe method with the prefix of the package: [sketch-builder] › ... like the following example:

//... import statements

describe('[${package}] › ${folder} › ${description of the suite}', () => {

// .. your tests should be placed here.

});

Maintainers

Lukas Holzer
Lara Aigmüller

License

MIT license — copyright 2019 Dynatrace Austria GmbH

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].