Skip to content

Commit

Permalink
Deploying to gh-pages from @ f5c55cd 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sikhote committed Nov 7, 2024
1 parent 0f3c054 commit 4ff112d
Show file tree
Hide file tree
Showing 641 changed files with 64,279 additions and 26,489 deletions.
35 changes: 35 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export default {
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [0, 'always'],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],

'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [0, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'chore',
'revert',
'build',
'WIP'
]
]
}
};
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*.{js,css,scss}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100
14 changes: 14 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build/*.js
config/*.js
dist-docs/
dist/
test/

node_modules/

backstop_data/html_report/
src/**/__tests__/*.spec.js
src/**/dist/*.js
src/**/examples/

src/components/icon/comps/*
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"root": true,
"parser": "vue-eslint-parser",
"parserOptions": {
"sourceType": "module",
"parser": "@typescript-eslint/parser"
},
"env": {
"browser": true
},
"extends": [
"plugin:vue/strongly-recommended",
"eslint:recommended",
"@vue/typescript/recommended"
],
"rules": {
"no-use-before-define": 0,
"vue/require-default-prop": 0,
"vue/attributes-order": 0,
"vue/no-multiple-template-root": 0,
"max-len": ["error", {
"code": 100,
"ignoreComments": true,
"ignoreTrailingComments": true
}],
"vue/multiline-html-element-content-newline": 0,
"@typescript-eslint/no-explicit-any": 0
}
}
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Numerous always-ignore extensions
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.zip
*~

# OS or Editor folders
._*
.cache
.DS_Store
.idea
*.iml
.classpath
.metadata
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
nbproject
Thumbs.db
.vscode
jsconfig.json

# Folders to ignore
node_modules
dist-docs
dist

# Test results
.nyc_output
backstop_data/bitmaps_reference
backstop_data/bitmaps_backup
backstop_data/bitmaps_test
backstop_data/html_report
test/e2e/reports
test/unit/coverage
coverage/

# Build assets
**/dist/*
src/**/styles/themes/*

src/**/package-lock\.json
unmigrated/

## Dev output for hosting
pages
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
18 changes: 18 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "ignore",
"vueIndentScriptAndStyle": false,
"endOfLine": "auto",
"singleAttributePerLine": true
}
14 changes: 14 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# built files
public/
dist/
dist-docs/
backstop_data/

node_modules/

src/css/settings/brandai.pcss
*.md
*.js
*.svg
*.json
*.bak
19 changes: 19 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "stylelint-config-recommended-scss",
"ignoreFiles": [
"**/*.js",
"**/*.snap",
"**/*.vars.pcss"
],
"plugins": [
"stylelint-scss"
],
"rules": {
"at-rule-disallowed-list": ["debug"],
"no-empty-source": null,
"no-descending-specificity": null,
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["global"]
}]
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Recreational Equipment, Inc.

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.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# REI Cedar Style Framework!
[![codecov](https://codecov.io/gh/rei/rei-cedar/branch/master/graph/badge.svg)](https://codecov.io/gh/rei/rei-cedar)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)


Welcome to REI's style framework! The overall goals of this project are to provide a common scaffolding for UI elements,
and a set of themes that build on this scaffolding. We started this project in 2015 as a fork of
[Bootstrap](http://getbootstrap.com/).
The project has evolved into what it is today, and will continue to grow to fit our expanding needs. Feel free to watch
the Cedar grow and learn from what we are doing, or jump in and provide some recommendations.

## Using Cedar

See the [Cedar docs](https://cedar.rei.com) for usage instructions.

## Getting Started

### Install

Clone the project.

`npm install`

### Run

`npm run dev`

Runs locally for development. Has hot reloading, and other nice things related to development.

## Testing

### Code Tests

`npm run unit`

Runs unit tests.

`npm run watch`

Runs unit tests in watch mode. This also allows you to inspect snapshot discrepancies and regenerate the snapshots if appropriate.

`npm run e2e`

Runs [Nightwatch](http://nightwatchjs.org/) end-to-end tests and Axe a11y tests.

Tests run using Chromedriver. To upgrade Chromedriver, determine the latest version of Chrome and Puppeteer that are compatible by visiting [this](https://pptr.dev/supported-browsers) page.

`npm run test`

Runs both unit and e2e/accessibility tests.

## Publishing Prerelease Components

`npm run prerelease`

Publishes package to npm with a prerelease tag. You must increment the component's version manually prior to publishing. `--dry-run` flag will run the prerelease process without publishing to npm.

## Commits

This project is Commitizen friendly. To install: `npm install -g commitizen`
When creating a pull request run `git cz` rather than `git commit` and follow the prompts.

This projects Changelogs are generated.
- Generate the Changelog: `npm run changelog`
7 changes: 7 additions & 0 deletions browserTargets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default [
'Chrome >= 111',
'Firefox >= 121',
'iOS >= 15.6',
'Safari >= 15.6',
'Edge >= 120',
];
49 changes: 49 additions & 0 deletions build/component-variables-transfer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const path = require('path');
const fs = require('fs-extra');
const glob = require('glob');

const DEST_REPO_NAME = 'rei-cedar-component-variables';
const DEST_PATH = 'dist/scss';
const SUPPORTED_COMPONENTS = [
/* global vars */
'options.vars.scss',
/* component vars */
'CdrButton.vars.scss',
'CdrCard.vars.scss',
'CdrChip.vars.scss',
'CdrBreadcrumb.vars.scss',
'CdrFormGroup.vars.scss',
'CdrFormError.vars.scss',
'CdrGrid.vars.scss',
'CdrLabelStandalone.vars.scss',
'CdrLabelWrapper.vars.scss',
'CdrRadio.vars.scss',
'CdrCheckbox.vars.scss',
'CdrLink.vars.scss',
'CdrInput.vars.scss',
'CdrSelect.vars.scss',
'CdrSkeleton.vars.scss',
'CdrList.vars.scss',
'CdrTable.vars.scss'
];

const destMixinsDir = path.join(__dirname, `../../${DEST_REPO_NAME + path.sep + DEST_PATH}`);

// get vars files
const files = glob.sync('./**/*.vars.scss', { ignore: ['../**/node_modules/**'] });

// copy vars files
files.forEach((f) => {
const fname = path.basename(f).replace(/^_/, ''); // remove `_` prefix from global vars files
if (!SUPPORTED_COMPONENTS.includes(fname)) return console.log(`skipping ${fname}`);
const outDest = `${destMixinsDir}/${fname}`;
fs.copySync(f, outDest);
console.log(`copied ${fname} to ${outDest}`)
});

/* iterate over SUPPORTED_COMPONENTS to ensure that vars are loaded in correct order */
const indexFile = SUPPORTED_COMPONENTS.map(fname => `@import "./${fname}";`).join('\n');
const singleFile = SUPPORTED_COMPONENTS.map(fname => fs.readFileSync(`${destMixinsDir}/${fname}`, 'utf8')).join('\n');

fs.outputFileSync(`${destMixinsDir}/index.scss`, indexFile);
fs.outputFileSync(`${destMixinsDir}/cedar-component-variables.scss`, singleFile);
12 changes: 12 additions & 0 deletions build/copy-css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copy cdr-fonts and cdr-reset to root folder.
// Cedar 15 expects these files to be in root.
// For 16, it would be helpful to remove this and have all styles in /style.

const path = require('path');
const fs = require('fs-extra');

const DIST = 'dist';

['cdr-fonts.css', 'cdr-reset.css'].forEach(file => {
fs.copyFileSync(path.join(DIST, '/style', file), path.join(DIST, file));
})
Loading

0 comments on commit 4ff112d

Please sign in to comment.