Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): switch to kcd-scripts #34

Merged
merged 1 commit into from Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .npmrc
@@ -1,2 +1,2 @@
registry=http://registry.npmjs.org/
save-exact=true
package-lock=false
21 changes: 7 additions & 14 deletions .travis.yml
Expand Up @@ -2,21 +2,14 @@ sudo: false
language: node_js
cache:
directories:
- node_modules
- ~/.npm
notifications:
email: false
node_js:
- '8'
- '6'
- '4'
before_install:
- npm i -g npm@^5.3.0
script:
- npm start validate
node_js: '8'
install: npm install
script: npm run validate
after_success:
- npm i -g codecov semantic-release
- codecov
- semantic-release pre && npm publish && semantic-release post
- npx codecov
- npx -p semantic-release@7 -c "semantic-release pre && npm publish && semantic-release post"
branches:
only:
- master
only: master
72 changes: 36 additions & 36 deletions CONTRIBUTING.md
@@ -1,9 +1,5 @@
# Contributing

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this *free* series
Expand All @@ -13,61 +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 [`nps`][nps] 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/babel-plugin-preval.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 "contributors.add <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. If you need to edit the `.all-contributorsrc` file by hand that's fine
too, just run `npm start contributors.generate` to regenerate the table.
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]: ./other/ROADMAP.md
[nps]: https://npmjs.com/package/nps
[issues]: https://github.com/kentcdodds/babel-plugin-preval/issues
2 changes: 1 addition & 1 deletion LICENSE
@@ -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
68 changes: 0 additions & 68 deletions package-scripts.js

This file was deleted.

96 changes: 23 additions & 73 deletions package.json
Expand Up @@ -8,86 +8,36 @@
},
"main": "dist/index.js",
"scripts": {
"start": "nps",
"test": "nps test",
"commitmsg": "opt --in commit-msg --exec \"validate-commit-msg\"",
"precommit": "lint-staged && opt --in pre-commit --exec \"npm start validate\""
},
"files": [
"dist",
"macro.js"
],
"keywords": [
"babel",
"babel-plugin",
"eval",
"precompile"
],
"add-contributor": "kcd-scripts contributors add",
"build": "kcd-scripts build",
"lint": "kcd-scripts lint",
"test": "kcd-scripts test",
"test:update": "npm test -- --updateSnapshot --coverage",
"validate": "kcd-scripts validate",
"precommit": "kcd-scripts precommit"
},
"files": ["dist", "macro.js"],
"keywords": ["babel", "babel-plugin", "eval", "precompile"],
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "MIT",
"dependencies": {
"babel-core": "^6.25.0",
"babel-register": "^6.25.0",
"babylon": "^6.17.4",
"babel-core": "^6.26.0",
"babel-register": "^6.26.0",
"babylon": "^6.18.0",
"require-from-string": "^1.2.1"
},
"devDependencies": {
"all-contributors-cli": "^4.3.0",
"ast-pretty-print": "^2.0.0",
"babel-cli": "^6.24.1",
"babel-jest": "^20.0.3",
"babel-macros": "0.5.0",
"babel-plugin-tester": "^3.2.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-inline-environment-variables": "0.1.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.5.1",
"babel-register": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"eslint": "^4.1.1",
"eslint-config-kentcdodds": "^12.4.0",
"eslint-plugin-babel": "4.1.1",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jest": "20.0.3",
"husky": "^0.14.2",
"jest": "^20.0.4",
"lint-staged": "^4.0.0",
"nps": "^5.3.1",
"nps-utils": "^1.2.0",
"opt-cli": "^1.5.1",
"prettier-eslint-cli": "^4.0.2",
"validate-commit-msg": "^2.12.1"
},
"lint-staged": {
"*.js": [
"prettier-eslint --write --print-width=80",
"git add"
]
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js"
},
"jest": {
"testEnvironment": "node",
"testPathIgnorePatterns": [
"/node_modules/",
"/fixtures/"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"src/macros.js"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
"eslintIgnore": ["node_modules", "coverage", "dist"],
"babel": {
"presets": "kcd-scripts/babel"
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
"devDependencies": {
"ast-pretty-print": "^2.0.0",
"babel-macros": "^0.5.2",
"babel-plugin-tester": "^4.0.0",
"kcd-scripts": "^0.2.3"
},
"repository": {
"type": "git",
Expand Down