remark-loader
Advanced tools
Comparing version 0.3.2 to 1.0.0-rc.0
@@ -5,2 +5,19 @@ # Change Log | ||
<a name="1.0.0-rc.0"></a> | ||
# [1.0.0-rc.0](https://github.com/skipjack/remark-loader/compare/v0.3.2...v1.0.0-rc.0) (2019-06-10) | ||
### Chores | ||
* remove react specific code ([f4e64c4](https://github.com/skipjack/remark-loader/commit/f4e64c4)), closes [#1](https://github.com/skipjack/remark-loader/issues/1) | ||
### BREAKING CHANGES | ||
* The `react` option has been removed. Our implementation | ||
was extremely hacky and led to a bunch of pitfalls. Please use MDX as an | ||
alternative. | ||
<a name="0.3.2"></a> | ||
@@ -7,0 +24,0 @@ ## [0.3.2](https://github.com/skipjack/remark-loader/compare/v0.3.1...v0.3.2) (2018-02-06) |
{ | ||
"name": "remark-loader", | ||
"version": "0.3.2", | ||
"version": "1.0.0-rc.0", | ||
"description": "Load markdown through remark with some react-specific features.", | ||
@@ -28,6 +28,4 @@ "homepage": "", | ||
"loader-utils": "^1.1.0", | ||
"react": "^15.6.1", | ||
"remark": "^8.0.0", | ||
"remark-html": "^6.0.1", | ||
"remark-react": "^4.0.0", | ||
"vfile-reporter": "^4.0.0" | ||
@@ -34,0 +32,0 @@ }, |
const Utils = require('loader-utils') | ||
const HTMLLoader = require('html-loader') | ||
const Parse = require('./parse.js') | ||
const Build = require('./build.js') | ||
const parse = require('./parse.js') | ||
@@ -15,11 +14,10 @@ /** | ||
Parse(content, options) | ||
// TODO: Refactor this hack -- we should probably just intercept images in the tree | ||
parse(content, options) | ||
// @todo we should probably just intercept images in the tree | ||
// or recommend that the `html-loader` be chained | ||
.then(processed => Object.assign({}, processed, { | ||
content: HTMLLoader(processed.content).replace('module.exports = ', 'export default ') | ||
content: HTMLLoader(processed.content) | ||
})) | ||
// TODO: Ideally this should be enabled via remark-react or another plugin (discuss with the author) | ||
.then(resolved => options.react ? Build(resolved) : resolved) | ||
.then(resolved => callback(null, resolved.content)) | ||
.catch(callback) | ||
}; |
const FrontMatter = require('front-matter') | ||
const Remark = require('remark') | ||
const RemarkHTML = require('remark-html') | ||
const RemarkReact = require('remark-react') | ||
const React = require('react') | ||
const Report = require('vfile-reporter') | ||
@@ -27,3 +25,3 @@ | ||
}, Remark()) | ||
.use(RemarkHTML) // RECONSIDER: options.output === 'html' ? RemarkHTML : RemarkReact) | ||
.use(RemarkHTML) | ||
.process(parsed.body, (err, file) => { | ||
@@ -30,0 +28,0 @@ let result = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
8242
8
53
79
- Removedreact@^15.6.1
- Removedremark-react@^4.0.0
- Removed@mapbox/hast-util-table-cell-style@0.1.3(transitive)
- Removedasap@2.0.6(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedencoding@0.1.13(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhast-to-hyperscript@4.0.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-nan@1.3.2(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedmdast-util-to-hast@3.0.4(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedpromise@7.3.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@15.7.0(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedremark-react@4.0.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)