Skip to content

Commit

Permalink
Migrate rubin-style-dictionary into squareone
Browse files Browse the repository at this point in the history
This makes https://github.com/lsst-sqre/rubin-style-dictionary a package
within the squareone monorepo. Squareone, the app, now depends up
rubin-style-dictionary via the workspace, so it always uses the latest
version of rubin-style-dictionary.

rubin-style-dictionary hooks into the build task in turbo repo.
  • Loading branch information
jonathansick committed Aug 2, 2023
1 parent a234866 commit fbf0373
Show file tree
Hide file tree
Showing 85 changed files with 4,714 additions and 7,788 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
with:
version: 8

- name: Authenticate GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${NPM_PKG_TOKEN}" > ~/.npmrc
env:
NPM_PKG_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up node
uses: actions/setup-node@v3
with:
Expand All @@ -74,6 +68,7 @@ jobs:
if: >
startsWith(github.ref, 'refs/tags/') || startsWith(github.head_ref, 'tickets/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# dependencies
/node_modules
**/node_modules
/.pnp
.pnp.js

Expand All @@ -17,6 +18,7 @@

# production
/build
dist/

# misc
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package.json
yarn.lock
package-lock.json
pnpm-lock.yaml
.next
docs/_build
.nova
Expand Down
2 changes: 0 additions & 2 deletions apps/squareone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ RUN pnpm install turbo --global

WORKDIR /app

RUN echo "//npm.pkg.github.com/:_authToken=${GH_PKG_TOKEN}" > ~/.npmrc

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
Expand Down
2 changes: 1 addition & 1 deletion apps/squareone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@fortawesome/fontawesome-svg-core": "^6.3.0",
"@fortawesome/free-solid-svg-icons": "^6.3.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@lsst-sqre/rubin-style-dictionary": "^0.4.0",
"@lsst-sqre/rubin-style-dictionary": "workspace:*",
"@reach/alert": "^0.17.0",
"@reach/menu-button": "^0.17.0",
"ajv": "^8.11.0",
Expand Down
106 changes: 106 additions & 0 deletions packages/rubin-style-dictionary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
node_modules

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
45 changes: 45 additions & 0 deletions packages/rubin-style-dictionary/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##########
Change log
##########

0.4.0 (2022-12-01)
==================

Added "crop" variants of all full-size and intermediate-size Rubin imagotype assets.
For example, ``assets/rubin-imagotype/rubin-imagotype-color-on-white-crop.svg`` is a cropped version of ``assets/rubin-imagotype/rubin-imagotype-color-on-white.svg``.
The original imagotypes included a default margin.
These new "crop" variants are cropped right to the art, so that the imagotype can align with other content in CSS/HTML layouts.

0.3.0 (2021-05-06)
==================

- Added image assets from the Rubin Visual Identity, including imagotypes (full scale, intermediate, and favicon), watermarks, and partner logos.
The full and intermediate-scale imagotypes in this distribution are additionally cropped so that the clearance corresponds to the desired "N" spacing.

These files can be imported from the NPM package as regular static assets.
Additionally, these assets are distributed in JSON files as Base 64-encoded strings.

- Support for theming with next-themes.

- Initial design tokens from components originating in the Squareone application (https://github.com/lsst-sqre/rsp-squareone).

- Fixed ``color.green.500`` to be the correct color from the Visual Identity Manual (previously it was the same as ``color.purple.500``).

- Development dependencies:

- Updated lodash to 4.17.21
- Updated style-dictionary to 3.0.0-rc.8

0.2.1 (2021-02-17)
==================

This version features a revised organization of design tokens:

- Global design tokens are abstract values taken from the Rubin Visual Identity Manual, such as colors.
- Component design tokens tie the global tokens to semantically relevant components, such as the color of text in a button.
- Component design tokens can be themed.

0.1.0 (2021-01-27)
==================

This initial release of rubin-style-dictionary demonstrates how design tokens from the Rubin Visual Identity Manual can be encoded with Style Dictionary and exported to formats ready to use in applications.
21 changes: 21 additions & 0 deletions packages/rubin-style-dictionary/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Association of Universities for Research in Astronomy, Inc. (AURA)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions packages/rubin-style-dictionary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[![CI](https://github.com/lsst-sqre/rubin-style-dictionary/actions/workflows/ci.yaml/badge.svg)](https://github.com/lsst-sqre/rubin-style-dictionary/actions/workflows/ci.yaml) [![Docs](https://img.shields.io/badge/style--dictionary-lsst.io-blue)](https://style-dictionary.lsst.io)

# rubin-style-dictionary

The rubin-style-dictionary is a distribution of design tokens that can be readily used in Rubin Observatory websites and apps. These tokens are encoded from the [Rubin Visual Identity Manual](https://docushare.lsst.org/docushare/dsweb/Get/Document-37294/20210212%20Visual%20Identity%20Manual%20%e2%80%94V7.pdf), and include colors, typography, sizing, and assets. In addition to the core tokens, rubin-style-dictionary also includes derived tokens for specific reusable components, from buttons to navigation bars. These component tokens can be "themed," for example to provide a light and dark color palette.

[Learn more in the Rubin Style Dictionary documentation.](https://style-dictionary.lsst.io)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fbf0373

Please sign in to comment.