@@ -18,16 +18,6 @@ module.exports = {
1818 LATEST_VERSION_NAME ,
1919
2020 options : {
21- nodeAssets : {
22- 'highlight.js' : {
23- public : {
24- include : [ 'styles/monokai.css' ]
25- } ,
26- vendor : {
27- include : [ 'styles/monokai.css' ]
28- }
29- }
30- } ,
3121 svgJar : {
3222 sourceDirs : [
3323 'public' ,
@@ -91,6 +81,17 @@ module.exports = {
9181 throw new Error ( `ember-cli-addon-docs only currently works with addons, not applications` ) ;
9282 }
9383
84+ includer . options . includeFileExtensionInSnippetNames = includer . options . includeFileExtensionInSnippetNames || false ;
85+ includer . options . snippetSearchPaths = includer . options . snippetSearchPaths || [ 'tests/dummy/app' ] ;
86+ includer . options . snippetRegexes = Object . assign ( { } , {
87+ begin : / { { # (?: d o c s - s n i p p e t | d e m o .e x a m p l e ) \s n a m e = (?: " | ' ) ( \S + ) (?: " | ' ) / ,
88+ end : / { { \/ (?: d o c s - s n i p p e t | d e m o .e x a m p l e ) } } / ,
89+ } , includer . options . snippetRegexes ) ;
90+ includer . options . includehighlightJS = false ;
91+ includer . options . includeHighlightStyle = false ;
92+ includer . options . snippetExtensions = [ 'js' , 'css' , 'scss' , 'hbs' , 'md' , 'text' , 'json' , 'handlebars' , 'htmlbars' , 'html' , 'diff' ] ;
93+
94+ // This must come after we add our own options above, or else other addons won't see them.
9495 this . _super . included . apply ( this , arguments ) ;
9596
9697 const hasPlugins = this . project . addons . some ( function ( addon ) {
@@ -106,23 +107,11 @@ module.exports = {
106107 this . addonOptions = Object . assign ( { } , includer . options [ 'ember-cli-addon-docs' ] ) ;
107108 this . addonOptions . projects = Object . assign ( { } , this . addonOptions . projects ) ;
108109
109- includer . options . includeFileExtensionInSnippetNames = includer . options . includeFileExtensionInSnippetNames || false ;
110- includer . options . snippetSearchPaths = includer . options . snippetSearchPaths || [ 'tests/dummy/app' ] ;
111- includer . options . snippetRegexes = Object . assign ( { } , {
112- begin : / { { # (?: d o c s - s n i p p e t | d e m o .e x a m p l e ) \s n a m e = (?: " | ' ) ( \S + ) (?: " | ' ) / ,
113- end : / { { \/ (?: d o c s - s n i p p e t | d e m o .e x a m p l e ) } } / ,
114- } , includer . options . snippetRegexes ) ;
115-
116110 let importer = findImporter ( this ) ;
117111
118112 importer . import ( 'vendor/lunr/lunr.js' , {
119113 using : [ { transformation : 'amd' , as : 'lunr' } ]
120114 } ) ;
121-
122- // importer.import('vendor/highlightjs-styles/default.css');
123- // importer.import('vendor/styles/highlightjs-styles/default.css');
124- // importer.import('vendor/highlight.js/styles/monokai.css');
125- // importer.import('vendor/highlightjs-styles/github.css');
126115 } ,
127116
128117 createDeployPlugin ( ) {
@@ -180,7 +169,7 @@ module.exports = {
180169 treeForVendor ( vendor ) {
181170 return new MergeTrees ( [
182171 vendor ,
183- this . _highlightJSTree ( ) ,
172+ // this._highlightJSTree(),
184173 this . _lunrTree ( )
185174 ] . filter ( Boolean ) ) ;
186175 } ,
0 commit comments