-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Home,posts):make parsed md from files render
- reverted back to using ng2-html-to-markdown
- Loading branch information
Jason Hodges
committed
Aug 21, 2017
1 parent
253b4ed
commit 18f52bc
Showing
43 changed files
with
765 additions
and
251 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const _ = require("lodash"); | ||
const { RawSource } = require("webpack-sources"); | ||
const POSTS_DIR = "./src/assets/_posts/"; | ||
|
||
// https://survivejs.com/webpack/extending/plugins/ | ||
// function LoopMarkdownPlugin(options) { | ||
// this.options = _.extend( | ||
// { | ||
// template: POSTS_DIR + "template.html", | ||
// cache: true, | ||
// compile: true, | ||
// inject: true, | ||
// hash: false, | ||
// minify: false, | ||
// showErrors: true | ||
// }, | ||
// options | ||
// ); | ||
// } | ||
|
||
class LoopMarkdownPlugin { | ||
constructor(options) { | ||
this.options = options; | ||
} | ||
apply(compiler) { | ||
|
||
const { name } = this.options; | ||
|
||
compiler.plugin('emit', (compilation, callback) => { | ||
console.log("Loop Markdown Plugin!", this.options); | ||
compilation.assets[name] = new RawSource('some raw source'); | ||
callback(); | ||
}); | ||
} | ||
} | ||
|
||
module.exports = LoopMarkdownPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.