From c7395d5d4e9261973cf6af6fcf6eef3b339ea011 Mon Sep 17 00:00:00 2001 From: Akira Sudoh Date: Tue, 7 Aug 2018 23:45:51 +0900 Subject: [PATCH] chore: clean-up root-level project files (#1006) --- .babelrc | 13 - .../CODE_OF_CONDUCT.md | 21 +- .../CONTRIBUTING.md | 99 ++-- .github/ISSUE_TEMPLATE.md | 29 +- .github/PULL_REQUEST_TEMPLATE.md | 23 +- .github/SUPPORT.md | 7 + .prettierrc | 5 - .travis.yml | 18 +- ISSUE_TEMPLATE.md | 45 -- LICENSE.md => LICENSE | 0 README.md | 12 +- demo/js/components/CodeExample/CodeExample.js | 3 +- package.json | 72 +-- results/summary_2017-04-27-11-54-46GMT.json | 25 - yarn.lock | 491 ++++++++++++------ 15 files changed, 477 insertions(+), 386 deletions(-) delete mode 100644 .babelrc rename CODE_OF_CONDUCT.md => .github/CODE_OF_CONDUCT.md (56%) rename docs/contributing.md => .github/CONTRIBUTING.md (75%) create mode 100644 .github/SUPPORT.md delete mode 100644 .prettierrc delete mode 100644 ISSUE_TEMPLATE.md rename LICENSE.md => LICENSE (100%) delete mode 100644 results/summary_2017-04-27-11-54-46GMT.json diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 0391d3903e9f..000000000000 --- a/.babelrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "presets": [ - [ - "env", - { - "modules": false, - "targets": { - "browsers": ["last 1 version", "ie >= 11"] - } - }] - ], - "plugins": ["transform-class-properties", "transform-object-rest-spread", "dev-expression"] -} diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 56% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md index 50ba2f6998e8..9d8124736338 100644 --- a/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -4,13 +4,12 @@ This is a place to ask questions, work through any challenges, and share ideas a ### TLDR; -* **Be respectful & understanding.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior or poor manners. It is important that we resolve disagreements and differing views constructively. - +- **Be respectful & understanding.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior or poor manners. It is important that we resolve disagreements and differing views constructively. * **Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. +### General -### General Communication through any of Carbon's channels (GitHub, emails, Twitter, Slack) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. We promise to extend courtesy and respect to everyone involved in this project, regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to Carbon to do the same. @@ -20,18 +19,16 @@ If any member of the community violates this Code of Conduct, the maintainers of If you are subjected to or witness unacceptable behavior, or have any other concerns, please communicate with us directly via carbon@us.ibm.com. ### Slack -1. Please, no `@here` or `@channel` unless it is a bug that is **breaking production code.** We have communities in many different time zones, and we would hate to disrupt someone not at the office. -2. There's no need to notify the Carbon team that you have made an issue in Carbon's GitHub repositories. We check these several times a day, so we promise we'll address your issue as soon as we can. -3. Reserve direct messages for sensitive discussions, such as privacy, legal, or HR reasons. Otherwise, we encourage posting in public channels so people with the same questions can benefit. -4. If you have a pressing bug fix, it is best to make a PR directly to get your issues addressed. -5. `#carbon-components`: This channel is for questions about Carbon Components only. It is not the place to ask general coding questions. Instead, use a dev community like [StackOverflow](https://stackoverflow.com/). -6. `#carbon-design-system`: Please post any design questions with an in-context screen shot (i.e. screen shot of the whole UI you are designing) with background as to what you are trying to accomplish in this flow. We welcome in-progress work to get community design feedback as well. - +1. Please, no `@here` or `@channel` unless it is a bug that is **breaking production code.** We have communities in many different time zones, and we would hate to disrupt someone not at the office. +2. There's no need to notify the Carbon team that you have made an issue in Carbon's GitHub repositories. We check these several times a day, so we promise we'll address your issue as soon as we can. +3. Reserve direct messages for sensitive discussions, such as privacy, legal, or HR reasons. Otherwise, we encourage posting in public channels so people with the same questions can benefit. +4. If you have a pressing bug fix, it is best to make a PR directly to get your issues addressed. +5. `#carbon-components`: This channel is for questions about Carbon Components only. It is not the place to ask general coding questions. Instead, use a dev community like [StackOverflow](https://stackoverflow.com/). +6. `#carbon-design-system`: Please post any design questions with an in-context screen shot (i.e. screen shot of the whole UI you are designing) with background as to what you are trying to accomplish in this flow. We welcome in-progress work to get community design feedback as well. -
+
If you have suggestions to improve this Code of Conduct, please submit an issue or PR. - This Code of Conduct was adopted from the [Angular Project](https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md) and [Todo Open Code of Conduct](http://todogroup.org/opencodeofconduct/). diff --git a/docs/contributing.md b/.github/CONTRIBUTING.md similarity index 75% rename from docs/contributing.md rename to .github/CONTRIBUTING.md index 9e8396299125..e042131c36d6 100644 --- a/docs/contributing.md +++ b/.github/CONTRIBUTING.md @@ -3,8 +3,9 @@ ## Requirements Set up your SSH Key GitHub Enterprise account and install node.js 4 or higher. -* [Generating SSH Keys - GitHub](https://help.github.com/articles/generating-ssh-keys/) -* [`nvm` (Node Version Manager)](https://github.com/creationix/nvm) to use the `Node 6`. + +- [Generating SSH Keys - GitHub](https://help.github.com/articles/generating-ssh-keys/) +- [`nvm` (Node Version Manager)](https://github.com/creationix/nvm) to use the `Node 6`. Contributing to carbon-components requires that you can run this repo locally on your computer. @@ -16,7 +17,7 @@ Prefix all class names with `#{$prefix}--` in SCSS, which is replaced with `bx-- and design systems inheriting Carbon can override. This prefix prevents potential conflicts with class names from the user. -__HTML__ +**HTML** ```html ``` -__SCSS__ +**SCSS** ```scss .#{$prefix}--inline-notification { @@ -53,6 +54,7 @@ A nested element can use a new block name as long as the styles are independent ``` + :point_up: The `#{$prefix}--component-button` class implies that this button has independent styles from its parent. Generally, it's preferred to start a new block. @@ -68,7 +70,7 @@ Avoid names with multiple `__element` names: All components belong in `src/components` in their own folder. -Name files and folders using __singular__ form; not plural. +Name files and folders using **singular** form; not plural. ``` button @@ -82,18 +84,18 @@ Also note that all variants of a component can live in a single HBS, SCSS and JS For example, while there are many button variants (primary, secondary, etc.), they're all contained in those single source files in the button folder. Component variants can be specified by either: - * Adding an item to `variants` in `.config.js` file (In this case, a `.hbs` file whose basename is exactly the same as the component name should be defined) - * Adding a `.hbs` file to component directory (Note: If there is a `.hbs` file whose basename is exactly the same as the component name, other `.hbs` files has to be in `componentname--variantname.hbs` format) -* `.hbs` files are rendered with the data given via `variants[n].context` property (see below) -* Supported properties in `.config.js` are the following: - * [`default`](https://fractal.build/guide/components/configuration#default) - * [`variants`](https://fractal.build/guide/components/configuration#variant-properties) - An array of objects with the following properties: - * `name` - * `label` - * `notes` - * `context` - * (`preview` - Unlike [Fractal](https://fractal.build/guide/components/configuration#preview), this property should point to a `.hbs` file under `demo` directory or `src` directory, *without* `@` symbol) +- Adding an item to `variants` in `.config.js` file (In this case, a `.hbs` file whose basename is exactly the same as the component name should be defined) +- Adding a `.hbs` file to component directory (Note: If there is a `.hbs` file whose basename is exactly the same as the component name, other `.hbs` files has to be in `componentname--variantname.hbs` format) +- `.hbs` files are rendered with the data given via `variants[n].context` property (see below) +- Supported properties in `.config.js` are the following: + - [`default`](https://fractal.build/guide/components/configuration#default) + - [`variants`](https://fractal.build/guide/components/configuration#variant-properties) - An array of objects with the following properties: + - `name` + - `label` + - `notes` + - `context` + - (`preview` - Unlike [Fractal](https://fractal.build/guide/components/configuration#preview), this property should point to a `.hbs` file under `demo` directory or `src` directory, _without_ `@` symbol) ## Start Contributing @@ -103,9 +105,9 @@ Go to [carbon-components](https://github.com/IBM/carbon-components) and click th ### 2. Clone Your Fork: -1. Go to your [GitHub Repositories](https://github.com/settings/repositories). -1. Click on `[your_github_username]/carbon-components`. -1. Click on the `Clone or Download` button and copy the URL from the `Clone with SSH` option. It should start with `git@github.com...` +1. Go to your [GitHub Repositories](https://github.com/settings/repositories). +1. Click on `[your_github_username]/carbon-components`. +1. Click on the `Clone or Download` button and copy the URL from the `Clone with SSH` option. It should start with `git@github.com...` In your terminal: @@ -131,14 +133,15 @@ git remote -v ``` When you do `git remote -v`, you'll see these remotes: -* `origin`: connection to your fork -* `upstream`: connection to the original repo. + +- `origin`: connection to your fork +- `upstream`: connection to the original repo. ### 4. Work in a Branch -* Always work in a branch. -* Submit pull requests from a branch. -* All commits must follow the convention outlined [here](https://github.com/conventional-changelog/conventional-changelog/blob/v0.5.3/conventions/angular.md). +- Always work in a branch. +- Submit pull requests from a branch. +- All commits must follow the convention outlined [here](https://github.com/conventional-changelog/conventional-changelog/blob/v0.5.3/conventions/angular.md). ### 5. Start the server @@ -152,7 +155,6 @@ yarn dev Once it's done building, you can start editing source code or creating new components. The system is set up to automatically bundle your changes/additions. Visit http://localhost:3000 to see the changes happen on the fly. - ### 6. Test your JavaScript code If you're contributing to our JavaScript code, test your changes by running our test commands: @@ -181,9 +183,9 @@ gulp test:unit -f tests/spec/fab_spec.js Other options for testing are: -* `-d`/`--debug`: Stop generating code coverage report. Useful to debug your code when running test. -* `-k`/`--keepalive`: Keep running test runner even after test ends. Test will restart running when you make changes to any test files or any files under test. -* `-v`/`--verbose`: Let Karma emit detailed log. +- `-d`/`--debug`: Stop generating code coverage report. Useful to debug your code when running test. +- `-k`/`--keepalive`: Keep running test runner even after test ends. Test will restart running when you make changes to any test files or any files under test. +- `-v`/`--verbose`: Let Karma emit detailed log. ### 7. Test your HTML/CSS code for a11y @@ -191,12 +193,12 @@ If you're contributing to our HTML/CSS code, a11y compliance of your code should To do so - First, (if you haven't done already) set up an auth token for a11y rules, by: -1. Create AAT token, by: - 1. Go to https://aat.mybluemix.net/auth/ - 1. Enter IBM ID/password as you log into Bluemix - 1. Accept user agreement - 1. Hit Copy Authentication Token button -1. `> sed -e "s|\${NPM_TOKEN}|(The token obtained in above step)|g" < .aat.yml.src > .aat.yml` +1. Create AAT token, by: +1. Go to https://aat.mybluemix.net/auth/ +1. Enter IBM ID/password as you log into Bluemix +1. Accept user agreement +1. Hit Copy Authentication Token button +1. `> sed -e "s|\${NPM_TOKEN}|(The token obtained in above step)|g" < .aat.yml.src > .aat.yml` Then you can test your changes by running our test commands: @@ -219,12 +221,14 @@ The a11y test may report potential issues that should be handled in application- When you're at a good stopping place and you're ready for feedback from other contributors and maintainers, **push your commits to your fork**: #### Commit Tip -> __Writing commit messages__ + +> **Writing commit messages** > > - `` indicates the type of commit that's being made. This can be: `feat`, `fix`, `perf`, `docs`, `chore`, `style`, `refactor` > - `` The scope could be anything specifying place of the commit change or the thing(s) that changed. > -> __Commit message format:__ +> **Commit message format:** + ``` (): @@ -233,7 +237,7 @@ When you're at a good stopping place and you're ready for feedback from other co