Skip to content

Commit

Permalink
chore(build): move to kcd-scripts (kentcdodds#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds authored Sep 8, 2017
1 parent 0d7d653 commit 097c2d4
Show file tree
Hide file tree
Showing 15 changed files with 384 additions and 269 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Thanks for your interest in the project. I appreciate bugs filed and PRs submitted!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Please fill out this template with all the relevant information so we can
understand what's going on and fix the issue.
I'll probably ask you to submit the fix (after giving some direction). If you've
never done that before, that's great! Check this free short video tutorial to
learn how: http://kcd.im/pull-request
-->

- `rtl-css-js` version:
- `node` version:
- `npm` (or `yarn`) version:

Relevant code or config

```javascript

```

What you did:



What happened:

<!-- Please provide the full error message/screenshots/anything -->

Reproduction repository:

<!--
If possible, please create a repository that reproduces the issue with the
minimal amount of code possible.
-->

Problem description:



Suggested solution:
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).
If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request
Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->
**What**:

<!-- Why are these changes necessary? -->
**Why**:

<!-- How were these changes implemented? -->
**How**:

<!-- Have you done all of these things? -->
**Checklist**:
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->

<!-- feel free to add additional comments -->
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
node_modules
.nyc_output
coverage
dist
.opt-in
.opt-out
.DS_Store
.next
.eslintcache

# these cause more harm than good
# when working with contributors
package-lock.json
yarn.lock
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
registry=http://registry.npmjs.org/
save-exact=true
package-lock=false
20 changes: 7 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@ sudo: false
language: node_js
cache:
directories:
- node_modules
- ~/.npm
notifications:
email: false
node_js:
- '6'
before_install:
- npm i -g npm@^3.0.0
before_script:
- npm prune
script:
- npm start validate
node_js: '8'
install: npm install
script: npm run validate
after_success:
- npm start report-coverage
- npm start release
- npx codecov
- npx -p semantic-release@7 -c "semantic-release pre && npm publish && semantic-release post"
branches:
only:
- master
only: master
66 changes: 36 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,65 @@ Thanks for being willing to contribute!

1. Fork and clone the repo
2. `$ npm install` to install dependencies
3. `$ npm start validate` to validate you've got it working
3. `$ npm run validate` to validate you've got it working
4. Create a branch for your PR

This project uses [`p-s`][p-s] and you can run `npm start` to see what scripts are available.
> Tip: Keep your `master` branch pointing at the original repository and make
> pull requests from branches on your fork. To do this, run:
>
> ```
> git remote add upstream https://github.com/kentcdodds/rtl-css-js.git
> git fetch upstream
> git branch --set-upstream-to=upstream/master master
> ```
>
> This will add the original repository as a "remote" called "upstream,"
> Then fetch the git information from that remote, then set your local `master`
> branch to use the upstream master branch whenever you run `git pull`.
> Then you can make all of your pull request branches based on this `master`
> branch. Whenever you want to update your version of `master`, do a regular
> `git pull`.
## Add yourself as a contributor
This project follows the [all contributors][all-contributors] specification. To add yourself to the table of
contributors on the README.md, please use the automated script as part of your PR:
This project follows the [all contributors][all-contributors] specification.
To add yourself to the table of contributors on the `README.md`, please use the
automated script as part of your PR:
```console
npm start addContributor <YOUR_GITHUB_USERNAME>
npm run add-contributor
```
Follow the prompt. If you've already added yourself to the list and are making a new type of contribution, you can run
it again and select the added contribution type.
Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
If you've already added yourself to the list and are making
a new type of contribution, you can run it again and select the added
contribution type.

## Committing and Pushing changes

This project uses [`semantic-release`][semantic-release] to do automatic releases and generate a changelog based on the
commit history. So we follow [a convention][convention] for commit messages. Please follow this convention for your
commit messages.

You can use `commitizen` to help you to follow [the convention][convention]

Once you are ready to commit the changes, please use the below commands

1. `git add <files to be comitted>`
2. `$ npm start commit`

... and follow the instruction of the interactive prompt.
Please make sure to run the tests before you commit your changes. You can run
`npm run test:update` which will update any snapshots that need updating.
Make sure to include those changes (if they exist) in your commit.

### opt into git hooks

There are git hooks set up with this project that are automatically installed when you install dependencies. They're
really handy, but are turned off by default (so as to not hinder new contributors). You can opt into these by creating
a file called `.opt-in` at the root of the project and putting this inside:
There are git hooks set up with this project that are automatically installed
when you install dependencies. They're really handy, but are turned off by
default (so as to not hinder new contributors). You can opt into these by
creating a file called `.opt-in` at the root of the project and putting this
inside:

```
commit-msg
pre-commit
```

## Help needed

Please checkout the [ROADMAP.md][ROADMAP] and raise an issue to discuss
any of the items in the want to do or might do list.
Please checkout the [the open issues][issues]

Also, please watch the repo and respond to questions/bug reports/feature requests! Thanks!
Also, please watch the repo and respond to questions/bug reports/feature
requests! Thanks!

[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[semantic-release]: https://npmjs.com/package/semantic-release
[convention]: https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
[all-contributors]: https://github.com/kentcdodds/all-contributors
[ROADMAP]: ./ROADMAP.md
[p-s]: https://npmjs.com/package/p-s
[issues]: https://github.com/kentcdodds/rtl-css-js/issues
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2016 Kent C. Dodds
Copyright (c) 2017 Kent C. Dodds

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 0 additions & 55 deletions package-scripts.js

This file was deleted.

69 changes: 16 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,30 @@
{
"name": "rtl-css-js",
"version": "0.0.0-semantically-released.0",
"description": "RTL conversion for CSS in JS objects",
"main": "dist/index.js",
"description": "Right To Left conversion for CSS in JS objects",
"main": "dist/rtl-css-js.cjs.js",
"jsnext:main": "dist/rtl-css-js.es.js",
"module": "dist/rtl-css-js.es.js",
"scripts": {
"start": "nps",
"test": "nps test",
"commitmsg": "opt --in commit-msg --exec \"validate-commit-msg\"",
"precommit": "opt --in pre-commit --exec \"npm start validate\""
"add-contributor": "kcd-scripts contributors add",
"build": "kcd-scripts build --browser --environment BUILD_NAME:rtlCSSJS",
"lint": "kcd-scripts lint",
"test": "kcd-scripts test",
"test:update": "npm run test -s -- --coverage --updateSnapshot",
"validate": "kcd-scripts validate",
"precommit": "kcd-scripts precommit"
},
"files": [
"dist"
],
"keywords": [],
"files": ["dist"],
"keywords": ["css-in-js", "ltr", "rtl", "cssjanus"],
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"all-contributors-cli": "^3.0.6",
"babel-cli": "^6.14.0",
"babel-core": "^6.18.2",
"babel-jest": "^17.0.2",
"babel-loader": "^6.2.7",
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-stage-2": "^6.13.0",
"babel-register": "^6.14.0",
"codecov": "^1.0.1",
"commitizen": "^2.8.6",
"cz-conventional-changelog": "^1.2.0",
"eslint": "^3.10.2",
"eslint-config-kentcdodds": "^11.0.0",
"husky": "^0.11.7",
"jest-cli": "^17.0.2",
"opt-cli": "^1.5.1",
"p-s": "^3.0.3",
"rimraf": "^2.5.4",
"semantic-release": "^6.3.2",
"validate-commit-msg": "^2.8.0",
"webpack": "^1.13.3"
"kcd-scripts": "^0.6.0"
},
"eslintConfig": {
"extends": [
"kentcdodds",
"kentcdodds/jest"
]
},
"jest": {
"testEnvironment": "node",
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
"extends": "./node_modules/kcd-scripts/eslint.js"
},
"eslintIgnore": ["node_modules", "coverage", "dist"],
"repository": {
"type": "git",
"url": "https://github.com/kentcdodds/rtl-css-js.git"
Expand Down
Loading

0 comments on commit 097c2d4

Please sign in to comment.