mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
refactor(*): convert to babel and generation to lib, es, dist folders (#2)
* refactor(*): convert to babel and generation to lib, es, dist * chore(*): remove generated files * fix(*): lint run command
This commit is contained in:
committed by
GitHub
parent
d22a2895a4
commit
32a7fb51da
@@ -0,0 +1,4 @@
|
||||
dist
|
||||
es
|
||||
lib
|
||||
test
|
||||
@@ -0,0 +1,5 @@
|
||||
package-lock.json
|
||||
coverage
|
||||
dist
|
||||
lib
|
||||
es
|
||||
@@ -0,0 +1,7 @@
|
||||
package-lock.json
|
||||
coverage
|
||||
src
|
||||
!dist
|
||||
!lib
|
||||
!es
|
||||
*.test.js
|
||||
@@ -0,0 +1,48 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/JiLiZART/bbob/compare/@bbob/preset-html5@1.0.6...@bbob/preset-html5@1.1.0) (2018-08-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* react render support, move some helper functions to plugin-helper ([1a84968](https://github.com/JiLiZART/bbob/commit/1a84968))
|
||||
* **preset-html5:** add basic preset with tests ([18ab61b](https://github.com/JiLiZART/bbob/commit/18ab61b))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.0.6"></a>
|
||||
## [1.0.6](https://github.com/JiLiZART/bbob/compare/@bbob/preset-html5@1.0.5...@bbob/preset-html5@1.0.6) (2018-07-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-html5
|
||||
|
||||
<a name="1.0.5"></a>
|
||||
## [1.0.5](https://github.com/JiLiZART/bbob/compare/@bbob/preset-html5@1.0.4...@bbob/preset-html5@1.0.5) (2018-07-11)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-html5
|
||||
|
||||
<a name="1.0.4"></a>
|
||||
## [1.0.4](https://github.com/JiLiZART/bbob/compare/@bbob/preset-html5@1.0.3...@bbob/preset-html5@1.0.4) (2018-07-10)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-html5
|
||||
|
||||
<a name="1.0.3"></a>
|
||||
## [1.0.3](https://github.com/JiLiZART/bbob/compare/@bbob/preset-html5@1.0.2...@bbob/preset-html5@1.0.3) (2018-07-10)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @bbob/preset-html5
|
||||
@@ -0,0 +1 @@
|
||||
Preset to render BBCode to HTML tags
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "@bbob/preset-react",
|
||||
"version": "1.1.0",
|
||||
"description": "React preset to transform BBCode to React Components",
|
||||
"keywords": [
|
||||
"bbcode",
|
||||
"preset",
|
||||
"react",
|
||||
"bbode",
|
||||
"transform"
|
||||
],
|
||||
"dependencies": {
|
||||
"@bbob/preset-html5": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bbob/core": "^1.1.0"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
"jsnext:main": "es/index.js",
|
||||
"browser": "dist/index.js",
|
||||
"browserName": "BbobPresetReact",
|
||||
"homepage": "https://github.com/JiLiZART/bbob",
|
||||
"author": "Nikolay Kostyurin <jilizart@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/JiLiZART/bbob/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/JiLiZART/bbob.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build:commonjs": "../../node_modules/.bin/cross-env BABEL_ENV=commonjs ../../node_modules/.bin/babel src --out-dir lib",
|
||||
"build:es": "../../node_modules/.bin/cross-env BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es",
|
||||
"build:umd": "../../node_modules/.bin/cross-env BABEL_ENV=rollup NODE_ENV=development ../../node_modules/.bin/rollup --config ../../rollup.config.js",
|
||||
"build": "npm run build:commonjs && npm run build:es && npm run build:umd",
|
||||
"test": "../../node_modules/.bin/jest --",
|
||||
"cover": "../../node_modules/.bin/jest --coverage",
|
||||
"lint": "../../node_modules/.bin/eslint .",
|
||||
"size": "../../node_modules/.bin/size-limit"
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "lib/index.js"
|
||||
}
|
||||
],
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"lib",
|
||||
"src",
|
||||
"es"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import presetHTML5 from '@bbob/preset-html5';
|
||||
|
||||
export default presetHTML5.extend(tags => ({
|
||||
...tags,
|
||||
|
||||
b: (...args) => ({
|
||||
...tags.b(...args),
|
||||
attrs: {
|
||||
style: { fontWeight: 'bold' },
|
||||
},
|
||||
}),
|
||||
|
||||
i: (...args) => ({
|
||||
...tags.b(...args),
|
||||
attrs: {
|
||||
style: { fontStyle: 'italic' },
|
||||
},
|
||||
}),
|
||||
|
||||
u: (...args) => ({
|
||||
...tags.b(...args),
|
||||
attrs: {
|
||||
style: { textDecoration: 'underline' },
|
||||
},
|
||||
}),
|
||||
|
||||
s: (...args) => ({
|
||||
...tags.b(...args),
|
||||
attrs: {
|
||||
style: { textDecoration: 'line-through' },
|
||||
},
|
||||
}),
|
||||
}));
|
||||
@@ -0,0 +1,7 @@
|
||||
import preset from '../src'
|
||||
|
||||
describe('@bbob/preset-react', () => {
|
||||
test('is a function', () => {
|
||||
expect(preset).toBeInstanceOf(Function)
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user