Skip to content

Commit 47c0c8a

Browse files
committed
chore(release): adding 0.1.1
1 parent f2201ef commit 47c0c8a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1517
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "stage-0", "react"]
3+
}

.eslintignore

Whitespace-only changes.

.eslintrc.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
var ecmaFeatures = {
2+
'jsx': true,
3+
'arrowFunctions': true,
4+
'blockBindings': true,
5+
'defaultParams': true,
6+
'destructuring': true,
7+
'forOf': true,
8+
'generators': true,
9+
'objectLiteralComputedProperties': true,
10+
'objectLiteralShorthandMethods': true,
11+
'objectLiteralShorthandProperties': true,
12+
'experimentalObjectRestSpread': true,
13+
'restParams': true,
14+
'spread': true,
15+
'templateStrings': true,
16+
'modules': true,
17+
'classes': true
18+
};
19+
20+
var rules = {
21+
'comma-dangle': 0,
22+
'new-cap': 0,
23+
'arrow-body-style': 0,
24+
'prefer-template': 0,
25+
'no-underscore-dangle': 0,
26+
'object-shorthand': 0,
27+
'func-names': 0,
28+
'no-extra-parens': ['error', 'functions'],
29+
'dot-notation': 0,
30+
'max-len': 0,
31+
'camelcase': 0,
32+
'react/jsx-pascal-case': 0,
33+
'prefer-const': 0,
34+
'react/jsx-filename-extension': 0,
35+
'linebreak-style': 0,
36+
'react/require-extension': 0
37+
};
38+
39+
module.exports = {
40+
'extends': 'airbnb',
41+
'env': {
42+
'browser': true,
43+
'node': true,
44+
'es6': true
45+
},
46+
'globals': {
47+
'describe': true,
48+
'it': true
49+
},
50+
'plugins': [
51+
'react'
52+
],
53+
'parserOptions': {
54+
'sourceType': 'module',
55+
'ecmaFeatures': ecmaFeatures
56+
},
57+
'ecmaFeatures': ecmaFeatures,
58+
rules: rules,
59+
extensions: ['', '.js', '.jsx']
60+
};

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ jspm_packages
3535

3636
# Optional REPL history
3737
.node_repl_history
38+
39+
/coverage
40+
/dist
41+
/build
42+
/lib

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<a name="0.1.1"></a>
2+
## 0.1.1 (2016-10-28)
3+
4+
5+
6+
<a name="0.1.0"></a>
7+
# [0.1.0](#)
8+
9+
Init the project.

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
# bbcode-to-react
3+
4+
A utility for turning raw BBCode into React elements.
5+
6+
## Installation
7+
8+
Install `bbcode-to-react` and __peer dependencies__ via NPM
9+
10+
```sh
11+
npm install --save bbcode-to-react react
12+
```
13+
14+
Import `bbcode-to-react`, example:
15+
16+
```js
17+
import { Parser } from 'bbcode-to-react';
18+
19+
const react = parser.toReact('[b]strong[/b]');
20+
```
21+
22+
23+
## Development
24+
25+
Install dependencies:
26+
27+
```sh
28+
npm install
29+
```
30+
31+
Run examples at [http://localhost:8080/](http://localhost:8080/) with webpack dev server:
32+
33+
```sh
34+
npm start
35+
```
36+
37+
Run tests & coverage report:
38+
39+
```sh
40+
npm test
41+
```
42+
43+
Watch tests:
44+
45+
```sh
46+
npm run test-watch
47+
```

package.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"name": "bbcode-to-react",
3+
"version": "0.1.1",
4+
"description": "A utility for turning raw BBCode into React elements. ",
5+
"main": "lib/index.js",
6+
"scripts": {
7+
"report-coverage": "coveralls < ./coverage/lcov.info",
8+
"test": "react-scripts test --env=jsdom",
9+
"cover": "npm test -- --coverage",
10+
"start": "npm run build",
11+
"build": "cross-env WEBPACK_BUILD=production webpack --progress --colors && webpack --progress --colors",
12+
"prebuild": "babel src --out-dir lib --ignore src/__tests__/",
13+
"create-release": "npm test && sh ./scripts/release",
14+
"publish-release": "npm test && sh ./scripts/publish",
15+
"lint": "eslint src"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git+ssh://git@github.com/JimLiu/bbcode-to-react.git"
20+
},
21+
"files": [
22+
"LICENSE",
23+
"README.md",
24+
"CHANGELOG.md",
25+
"lib",
26+
"dist"
27+
],
28+
"keywords": [
29+
"bbcode",
30+
"react",
31+
"bbcode parser"
32+
],
33+
"contributors": [
34+
"Junmin Liu (https://github.com/jimliu)"
35+
],
36+
"license": "MIT",
37+
"bugs": {
38+
"url": "https://github.com/JimLiu/bbcode-to-react/issues"
39+
},
40+
"homepage": "https://github.com/JimLiu/bbcode-to-react#readme",
41+
"dependencies": {},
42+
"peerDependencies": {
43+
"react": "^0.14.0 || ^15.0.0"
44+
},
45+
"devDependencies": {
46+
"babel-cli": "^6.14.0",
47+
"babel-loader": "^6.2.2",
48+
"babel-preset-es2015": "^6.14.0",
49+
"babel-preset-react": "^6.11.1",
50+
"babel-preset-react-app": "^0.2.1",
51+
"babel-preset-stage-0": "^6.5.0",
52+
"bootstrap": "^4.0.0-alpha.5",
53+
"clean-webpack-plugin": "^0.1.8",
54+
"conventional-changelog-cli": "^1.1.1",
55+
"conventional-recommended-bump": "^0.3.0",
56+
"copy-webpack-plugin": "^3.0.1",
57+
"coveralls": "^2.11.12",
58+
"cross-env": "^2.0.0",
59+
"enzyme": "^2.4.1",
60+
"eslint": "^3.2.2",
61+
"eslint-config-airbnb": "^10.0.0",
62+
"eslint-plugin-import": "^1.12.0",
63+
"eslint-plugin-jsx-a11y": "^2.0.1",
64+
"eslint-plugin-react": "^6.0.0",
65+
"eslint-plugin-standard": "^2.0.0",
66+
"json-loader": "^0.5.4",
67+
"react": "^15.3.0",
68+
"react-dom": "^15.3.0",
69+
"react-prism": "4.0.0",
70+
"react-router": "^2.6.1",
71+
"react-scripts": "^0.7.0",
72+
"webpack": "^1.12.13"
73+
}
74+
}

scripts/publish

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
VERSION=$(node -p -e "require('./package.json').version")
6+
CURRENT_BRANCH="$(git symbolic-ref --short -q HEAD)"
7+
8+
success() {
9+
echo -e "\033[32;1m$1"
10+
}
11+
12+
error() {
13+
echo -e "\033[31;1m$1"
14+
}
15+
16+
if [ -z "$CURRENT_BRANCH" ]; then
17+
error "Not in a branch. Stopping deploy."
18+
exit 1
19+
fi
20+
21+
if [ -z "$VERSION" ]; then
22+
error "Unable to get current npm version of this package"
23+
exit 1
24+
fi
25+
26+
git checkout master
27+
git pull
28+
npm install
29+
npm run build
30+
git tag -a $VERSION -m "release $VERSION"
31+
git push --set-upstream origin $CURRENT_BRANCH
32+
git push --tags
33+
34+
npm publish
35+
36+
success "published $VERSION to npm"

scripts/release

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
BUMP_TYPE=$1
6+
7+
git checkout master
8+
git pull
9+
npm install
10+
11+
CURRENT_BRANCH="$(git symbolic-ref --short -q HEAD)"
12+
13+
success() {
14+
echo -e "\033[32;1m$1"
15+
}
16+
17+
error() {
18+
echo -e "\033[31;1m$1"
19+
}
20+
21+
if [ -z "$CURRENT_BRANCH" ]; then
22+
error "Not in a branch. Stopping release."
23+
exit 1
24+
fi
25+
26+
if [ -z "$BUMP_TYPE" ]; then
27+
echo "Grabbing recommended bump type..."
28+
BUMP_TYPE="$(node_modules/.bin/conventional-recommended-bump -p angular)"
29+
fi
30+
31+
if [ -z "$BUMP_TYPE" ]; then
32+
error "Unable to set the type of version bump"
33+
exit 1
34+
fi
35+
36+
echo "==> Bumping version"
37+
VERSION="$(npm version --no-git-tag-version $BUMP_TYPE | sed 's/v//g')"
38+
39+
echo "==> Updating Changelog"
40+
node_modules/.bin/conventional-changelog -i CHANGELOG.md -o CHANGELOG.md -p angular
41+
42+
echo "==> Cleaning Build directory"
43+
rm -rf ./dist
44+
45+
echo "==> Creating build files"
46+
npm run build
47+
48+
echo "==> Committing changes"
49+
50+
git checkout -b "release-$VERSION"
51+
git add --all
52+
git commit --message "chore(release): adding $VERSION"
53+
git push --set-upstream origin "release-$VERSION"
54+
55+
success "release-$VERSION branch has been pushed"

src/__tests__/.eslintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"env": {
3+
"jasmine": true
4+
},
5+
"rules": {
6+
"import/no-unresolved": 0,
7+
"import/no-extraneous-dependencies": 0,
8+
"react/no-multi-comp": 0,
9+
"react/prop-types": 0,
10+
"react/no-find-dom-node": 0
11+
}
12+
}

0 commit comments

Comments
 (0)